LeanMachineLearning

Bandits.reward_cond_action๐Ÿ”—

Lemma

No docstring.

๐Ÿ”—theorem
Bandits.reward_cond_action.{u_1, u_2} {๐“ : Type u_1} {ฮฉ : Type u_2} {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] [StandardBorelSpace ๐“] [Countable ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) (a : ๐“) (n : โ„•) (hฮผa : (MeasureTheory.Measure.map (fun ฯ‰ => A n (Prod.fst ฯ‰)) (MeasureTheory.Measure.prod P (streamMeasure ฮฝ))) {a} โ‰  0) : ๐“›[fun ฯ‰ => R n (Prod.fst ฯ‰) | fun ฯ‰ => A n (Prod.fst ฯ‰) in {a}; MeasureTheory.Measure.prod P (streamMeasure ฮฝ)] = ฮฝ a
Bandits.reward_cond_action.{u_1, u_2} {๐“ : Type u_1} {ฮฉ : Type u_2} {m๐“ : MeasurableSpace ๐“} {mฮฉ : MeasurableSpace ฮฉ} {A : โ„• โ†’ ฮฉ โ†’ ๐“} {R : โ„• โ†’ ฮฉ โ†’ โ„} {P : MeasureTheory.Measure ฮฉ} [MeasureTheory.IsProbabilityMeasure P] {alg : Learning.Algorithm ๐“ โ„} {ฮฝ : ProbabilityTheory.Kernel ๐“ โ„} [ProbabilityTheory.IsMarkovKernel ฮฝ] [StandardBorelSpace ๐“] [Countable ๐“] (h : Learning.IsAlgEnvSeq A R alg (Learning.stationaryEnv ฮฝ) P) (a : ๐“) (n : โ„•) (hฮผa : (MeasureTheory.Measure.map (fun ฯ‰ => A n (Prod.fst ฯ‰)) (MeasureTheory.Measure.prod P (streamMeasure ฮฝ))) {a} โ‰  0) : ๐“›[fun ฯ‰ => R n (Prod.fst ฯ‰) | fun ฯ‰ => A n (Prod.fst ฯ‰) in {a}; MeasureTheory.Measure.prod P (streamMeasure ฮฝ)] = ฮฝ a

Code

lemma reward_cond_action [Countable ๐“]
    (h : IsAlgEnvSeq A R alg (stationaryEnv ฮฝ) P) (a : ๐“) (n : โ„•)
    (hฮผa : (๐”“).map (fun ฯ‰ โ†ฆ A n ฯ‰.1) {a} โ‰  0) :
    ๐“›[fun ฯ‰ โ†ฆ R n ฯ‰.1 | fun ฯ‰ โ†ฆ A n ฯ‰.1 โ† a; ๐”“] = ฮฝ a
Proof
by
  have hA := h.measurable_action
  have hR := h.measurable_feedback
  have h_ra : ๐“›[fun ฯ‰ โ†ฆ R n ฯ‰.1 | fun ฯ‰ โ†ฆ A n ฯ‰.1; ๐”“] =แต[(๐”“).map (fun ฯ‰ โ†ฆ A n ฯ‰.1)] ฮฝ :=
    condDistrib_reward'' h n
  have h_eq := condDistrib_ae_eq_cond (ฮผ := ๐”“)
    (X := fun ฯ‰ โ†ฆ A n ฯ‰.1) (Y := fun ฯ‰ โ†ฆ R n ฯ‰.1) (by fun_prop) (by fun_prop)
  rw [Filter.EventuallyEq, ae_iff_of_countable] at h_ra h_eq
  specialize h_ra a hฮผa
  specialize h_eq a hฮผa
  rw [h_ra] at h_eq
  exact h_eq.symm

Actions: Source ยท Open Issue

Meaning last changed in v4.34.0-rc2-1-g439785b (2026-08-23), the 4th 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: 7 project declarations, 63 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.