Learning.stepsUntil_eq_leastGE
No docstring.
Learning.stepsUntil_eq_leastGE.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} {m : โ} (a : ๐) (hm : m โ 0) : stepsUntil A a m = MeasureTheory.leastGE (fun n ฯ => pullCount A a (n + 1) ฯ) mLearning.stepsUntil_eq_leastGE.{u_1, u_3} {๐ : Type u_1} {ฮฉ : Type u_3} [DecidableEq ๐] {A : โ โ ฮฉ โ ๐} {m : โ} (a : ๐) (hm : m โ 0) : stepsUntil A a m = MeasureTheory.leastGE (fun n ฯ => pullCount A a (n + 1) ฯ) m
Code
lemma stepsUntil_eq_leastGE (a : ๐) (hm : m โ 0) :
stepsUntil A a m = leastGE (fun n (ฯ : ฮฉ) โฆ pullCount A a (n + 1) ฯ) mProof
by
classical
ext ฯ
rw [stepsUntil_eq_dite]
unfold leastGE hittingAfter
simp only [Nat.bot_eq_zero, zero_le, Set.mem_Ici, true_and]
have h_iff : (โ s, pullCount A a (s + 1) ฯ = m) โ (โ s, m โค pullCount A a (s + 1) ฯ) := by
refine โจfun โจs, hsโฉ โฆ โจs, hs.geโฉ, fun โจs, hsโฉ โฆ ?_โฉ
exact exists_pullCount_eq_of_le hs hm
by_cases h_exists : โ s, m โค pullCount A a (s + 1) ฯ
swap; ยท simp_rw [h_iff]; simp [h_exists]
rw [ite_eq_left h_exists, dite_eq_left]
swap; ยท rwa [h_iff]
simp only [ENat.some_eq_natCast, Nat.cast_inj]
rw [Nat.find_eq_iff]
constructor
ยท apply le_antisymm
ยท by_contra! h_contra
obtain โจs, hsโฉ : โ s, pullCount A a (s + 1) ฯ = m := exists_pullCount_eq_of_le h_contra.le hm
rw [โ hs] at h_contra
refine h_contra.not_ge ?_
gcongr
exact csInf_le (by simp) (by simp)
ยท exact Nat.sInf_mem (s := {j | m โค pullCount A a (j + 1) ฯ}) h_exists
ยท intro n hn h_contra
refine hn.not_ge ?_
exact csInf_le (by simp) (by simp [h_contra])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, 29 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.