Zulip Chat Archive
Stream: mathlib4
Topic: Bad CoeFun instances on FiniteMeasure and ProbabilityMeasure
Eric Wieser (Nov 13 2023 at 01:01):
Should these have been ported into FunLike
instances, or would that have been a bad idea?
import Mathlib
open MeasureTheory
variable (Ω : Type*) [MeasurableSpace Ω] (P : FiniteMeasure Ω) (x : Set Ω) in
#check P x -- (fun s => ENNReal.toNNReal (↑↑↑P s)) x : NNReal
variable (Ω : Type*) [MeasurableSpace Ω] (P : ProbabilityMeasure Ω) (x : Set Ω) in
#check P x -- (fun s => ENNReal.toNNReal (↑↑↑P s)) x : NNReal
Even beta-reducing these to ENNReal.toNNReal (↑↑↑P x)
would help a little
Eric Wieser (Nov 13 2023 at 01:23):
I made #8375, though I'm seeing a failure in split_ifs
Eric Wieser (Nov 13 2023 at 01:24):
(who knows, maybe the cause is lean4#2414...) It's not, it's a failure to beta-reduce
Yury G. Kudryashov (Nov 13 2023 at 05:30):
BTW, the CoeFun
instance on Measure
should be turned into FunLike
too.
Eric Wieser (Nov 13 2023 at 09:47):
Feel free to adopt the PR above
Last updated: Dec 20 2023 at 11:08 UTC