Learning.measurable_stepsUntil
No docstring.
Learning.measurable_stepsUntil.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} {m๐ : MeasurableSpace ๐} {mฮฉ : MeasurableSpace ฮฉ} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} [MeasurableSingletonClass ๐] (hA : โ (n : โ), Measurable (A n)) (a : ๐) (m : โ) : Measurable (stepsUntil A a m)Learning.measurable_stepsUntil.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} {m๐ : MeasurableSpace ๐} {mฮฉ : MeasurableSpace ฮฉ} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} [MeasurableSingletonClass ๐] (hA : โ (n : โ), Measurable (A n)) (a : ๐) (m : โ) : Measurable (stepsUntil A a m)
Code
lemma measurable_stepsUntil [MeasurableSingletonClass ๐]
(hA : โ n, Measurable (A n)) (a : ๐) (m : โ) :
Measurable (stepsUntil A a m)Proof
by
classical
have h_union : {h' : ฮฉ | โ s, pullCount A a (s + 1) h' = m}
= โ s : โ, {h' | pullCount A a (s + 1) h' = m} := by ext; simp
have h_meas_set : MeasurableSet {h' : ฮฉ | โ s, pullCount A a (s + 1) h' = m} := by
rw [h_union]
refine MeasurableSet.iUnion fun s โฆ (measurableSet_singleton _).preimage ?_
exact measurable_pullCount hA a (s + 1)
suffices Measurable fun k โฆ if h : k โ {k' | โ s, pullCount A a (s + 1) k' = m}
then (Nat.find h : โโ) else โค by
convert this with ฯ
rw [stepsUntil_eq_dite a m ฯ]
rfl
refine Measurable.dite (s := {k' : ฮฉ | โ s, pullCount A a (s + 1) k' = m})
(f := fun x โฆ (Nat.find x.2 : โโ)) (g := fun _ โฆ โค) ?_ (by fun_prop) h_meas_set
refine Measurable.coe_nat_enat ?_
refine measurable_find _ fun k โฆ ?_
suffices MeasurableSet {x : ฮฉ | pullCount A a (k + 1) x = m} by
have : Subtype.val '' {x : {k' : ฮฉ |
โ s, pullCount A a (s + 1) k' = m} | pullCount A a (k + 1) (x : ฮฉ) = m}
= {x : ฮฉ | pullCount A a (k + 1) x = m} := by
ext x
simp only [Set.mem_ofPred_eq, Set.coe_ofPred, Set.mem_image, Subtype.exists, exists_and_left,
exists_prop, exists_eq_right_right, and_iff_left_iff_imp]
exact fun h โฆ โจ_, hโฉ
refine (MeasurableEmbedding.subtype_coe h_meas_set).measurableSet_image.mp ?_
rw [this]
exact (measurableSet_singleton _).preimage (by fun_prop)
exact (measurableSet_singleton _).preimage (by fun_prop)Actions: Source ยท Open Issue
Meaning last changed in v4.34.0-rc1-3-g2cf8f3b (2026-08-20).
Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file ยท open it in the Lean web editor.
Dependency graph
Audit surface: 2 project declarations, 28 external constants
โ Proved: no sorry anywhere in its closure
This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.