Bandits.ArrayModel.hist_congr
No docstring.
Bandits.ArrayModel.hist_congr.{u_1, u_2} {π : Type u_1} {R : Type u_2} {mπ : MeasurableSpace π} {mR : MeasurableSpace R} [Nonempty π] [StandardBorelSpace π] [DecidableEq π] (alg : Learning.Algorithm π R) (n : β) {Ο Ο' : probSpace π R} (hΟ1 : β i β€ n, Prod.fst Ο i = Prod.fst Ο' i) (hΟ2 : β (i : β) (a : π), i < Learning.pullCount (action alg) a (n + 1) Ο β Prod.snd Ο i a = Prod.snd Ο' i a) : hist alg Ο n = hist alg Ο' nBandits.ArrayModel.hist_congr.{u_1, u_2} {π : Type u_1} {R : Type u_2} {mπ : MeasurableSpace π} {mR : MeasurableSpace R} [Nonempty π] [StandardBorelSpace π] [DecidableEq π] (alg : Learning.Algorithm π R) (n : β) {Ο Ο' : probSpace π R} (hΟ1 : β i β€ n, Prod.fst Ο i = Prod.fst Ο' i) (hΟ2 : β (i : β) (a : π), i < Learning.pullCount (action alg) a (n + 1) Ο β Prod.snd Ο i a = Prod.snd Ο' i a) : hist alg Ο n = hist alg Ο' n
Code
lemma hist_congr (alg : Algorithm π R) (n : β) {Ο Ο' : probSpace π R}
(hΟ1 : β i β€ n, Ο.1 i = Ο'.1 i)
(hΟ2 : β i a, i < pullCount (action alg) a (n + 1) Ο β Ο.2 i a = Ο'.2 i a) :
hist alg Ο n = hist alg Ο' nProof
by
induction n with
| zero =>
simp only [zero_add, pullCount_one] at hΟ2
simp_rw [hist_zero]
ext i : 1
simp only [le_refl, hΟ1, Prod.mk.injEq, true_and]
refine hΟ2 0 _ ?_
simp [action, hΟ1]
| succ n hn =>
simp_rw [hist_add_one_eq_IicSuccProd]
specialize hn fun i hin β¦ hΟ1 i (by grind)
have h_hist : hist alg Ο n = hist alg Ο' n := by
refine hn fun i a hi β¦ hΟ2 i a (hi.trans_le ?_)
exact pullCount_mono _ (by lia) _
have h_action : action alg (n + 1) Ο = action alg (n + 1) Ο' := by
simp_rw [action_add_one_eq]
rw [h_hist, hΟ1 _ le_rfl]
congr 3
simp only [reward_add_one, h_hist, h_action]
refine hΟ2 _ _ ?_
rw [pullCount_add_one, h_action]
simp only [βreduceIte]
rw [pullCount_eq_pullCount' (R' := reward alg) (by simp)]
simp only [Nat.add_one_sub_one]
rw [β h_hist, hist_eq]
change pullCount' n (fun i β¦ (action alg i Ο, reward alg i Ο)) (action alg (n + 1) Ο') <
pullCount' n (fun i β¦ (action alg i Ο, reward alg i Ο)) (action alg (n + 1) Ο') + 1
grindActions: Source Β· Open Issue
Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 5th recorded change.
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: 10 project declarations, 78 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.