Zulip Chat Archive

Stream: new members

Topic: Confusing "MeasurableSet" display


Iocta (Dec 27 2024 at 19:28):

import Mathlib

namespace MeasureTheory

open MeasurableSpace

variable {α : Type}

theorem generateFrom_mono' {s s' : Set (Set α)} (h : s  s') :
    generateFrom s  generateFrom s' := by
  intro t ht

displays as

ht : MeasurableSet t
 MeasurableSet t

which is confusing. If I use

  reduce at ht
  reduce

then I can see

ht : GenerateMeasurable s t
 GenerateMeasurable s' t

which is easier to understand. Is there a way to make this clearer display happen without me doing reduce every time?

Kevin Buzzard (Dec 27 2024 at 23:27):

If you hover over the terms you can see what's going on without unfolding

Iocta (Dec 27 2024 at 23:28):

I can't make it display like that normally?

Kevin Buzzard (Dec 27 2024 at 23:30):

set_option pp.implicit true or something like that should switch implicits on globally.

Iocta (Dec 27 2024 at 23:33):

set_option pp.explicit true is a little noisy but yeah that works

Kevin Buzzard (Dec 27 2024 at 23:43):

In general one would only expect one measurable space structure on a type so this isn't an issue. If you have more than one then I think it's just generally expected that you know what you're doing eg know the hover trick. Poor display will probably be the least of your worries -- typeclass synthesis being annoying will be more problematic


Last updated: May 02 2025 at 03:31 UTC