LeanMachineLearning

Bandits.sumRewards_eq_comp๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.sumRewards_eq_comp.{u_1, u_2} {๐“ : Type u_1} {ฮฉ : Type u_2} [DecidableEq ๐“] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {n : โ„•} {a : ๐“} : Learning.sumRewards A R a n = (fun p => โˆ‘ i โˆˆ Finset.range n, if Prod.fst (p i) = a then Prod.snd (p i) else 0) โˆ˜ Learning.trajectory A R
Bandits.sumRewards_eq_comp.{u_1, u_2} {๐“ : Type u_1} {ฮฉ : Type u_2} [DecidableEq ๐“] {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {n : โ„•} {a : ๐“} : Learning.sumRewards A R a n = (fun p => โˆ‘ i โˆˆ Finset.range n, if Prod.fst (p i) = a then Prod.snd (p i) else 0) โˆ˜ Learning.trajectory A R

Code

lemma sumRewards_eq_comp :
    sumRewards A R a n =
     (fun p โ†ฆ โˆ‘ i โˆˆ range n, if (p i).1 = a then (p i).2 else 0) โˆ˜ (trajectory A R)
Proof
by
  ext
  simp [sumRewards, trajectory]
  grind

Actions: Source ยท Open Issue

Meaning last changed in v4.34.0-rc2-14-gf86702d (2026-08-25), the 2th 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: 2 project declarations, 24 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.