LeanMachineLearning

Learning.rewardByCountUntil_congr๐Ÿ”—

Lemma

From the authors

rewardByCountUntil A R' t (x, z) p depends on z only through z (p.2 + 1) p.1.

Types
  • ๐“ : Type u_2DecidableEq ๐“
  • R : Type u_3
  • ฮฉ : Type u_4
Given
  • A : โ„• โ†’ ฮฉ โ†’ ๐“
  • R' : โ„• โ†’ ฮฉ โ†’ R
  • x : ฮฉ
  • z : โ„• โ†’ ๐“ โ†’ R
  • z' : โ„• โ†’ ๐“ โ†’ R
  • t : โ„•
  • p : ๐“ ร— โ„•
Assuming
  • hz : z (p.2 + 1) p.1 = z' (p.2 + 1) p.1
Then
rewardByCountUntil A R' t (x, z) p = rewardByCountUntil A R' t (x, z') p
Code
lemma rewardByCountUntil_congr {x : ฮฉ} {z z' : โ„• โ†’ ๐“ โ†’ R} (t : โ„•) (p : ๐“ ร— โ„•)
    (hz : z (p.2 + 1) p.1 = z' (p.2 + 1) p.1) :
    rewardByCountUntil A R' t (x, z) p = rewardByCountUntil A R' t (x, z') p
Proof
by
  induction t with
  | zero => exact hz
  | succ t ih =>
    simp only [rewardByCountUntil_add_one, Function.update_apply]
    split_ifs
    ยท rfl
    ยท exact ih

New in v4.34.0-rc2-31-g21d7e67 (2026-09-07), and its meaning has not changed since.

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, 23 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.