Zulip Chat Archive
Stream: mathlib4
Topic: MeasureTheory/Constructions/AddChar.lean
Damiano Testa (Oct 31 2024 at 13:59):
docs#AddChar.instMeasurableSpace and docs#AddChar.instDiscreteMeasurableSpace take only an AddMonoid
assumption on A
. However, the module docs claims
This file endows `AddChar A M` with the discrete measurable space structure whenever `A` and `M`
are themselves discrete measurable spaces.
and the variables
[MeasurableSpace A] [DiscreteMeasurableSpace A] [MeasurableSpace M] [DiscreteMeasurableSpace M]
present in the file, do not actually make it into the definition. I suspect that something is off here, right?
I'll ping @Yaël Dillies as author of the file, but I have not investigated who actually introduced this.
Yaël Dillies (Oct 31 2024 at 14:16):
Indeed that's an accident
Damiano Testa (Oct 31 2024 at 14:18):
I noticed thanks to the linter that warned me of unused variable
s and when I saw the file I thought "here is a bug that I will have to fix", but now it seems that this is a bug for you! :smile:
Damiano Testa (Oct 31 2024 at 14:19):
I am not sure how to proceed, though, since I do not think that include
works with the "old" variable
inclusion mechanism that instance
s use.
Yaël Dillies (Oct 31 2024 at 14:20):
I think they can just be moved to the statements?
Damiano Testa (Oct 31 2024 at 14:22):
Ok, does this look alright?
namespace AddChar
variable {A M : Type*} [AddMonoid A] [Monoid M] [MeasurableSpace A] [MeasurableSpace M]
instance instMeasurableSpace [DiscreteMeasurableSpace A] [DiscreteMeasurableSpace M] :
MeasurableSpace (AddChar A M) :=
⊤
instance instDiscreteMeasurableSpace [DiscreteMeasurableSpace A] [DiscreteMeasurableSpace M] :
DiscreteMeasurableSpace (AddChar A M) :=
⟨fun _ ↦ trivial⟩
end AddChar
Damiano Testa (Oct 31 2024 at 14:23):
(I also checked that the linter does not complain about unused variables and hovers show that all variables are now included in the declarations.)
Damiano Testa (Oct 31 2024 at 14:25):
Last updated: May 02 2025 at 03:31 UTC