LeanMachineLearning

Bandits.indepFun_history_reward_cond๐Ÿ”—

Lemma

From the authors

Conditionally on the event that the action at time n is b and that b was pulled k times before, the reward at time n is independent of the history before time n and of the action at time n.

Types
  • ๐“ : Type u_1m๐“ : MeasurableSpace ๐“A measurable space is a space equipped with a ฯƒ-algebra.DecidableEq ๐“MeasurableSingletonClass ๐“A typeclass mixin for MeasurableSpaces such that each singleton is measurable.
  • ฮฉ : Type u_2mฮฉ : MeasurableSpace ฮฉ
Given
  • O : โ„• โ†’ ฮฉ โ†’ Unit
  • A : โ„• โ†’ ฮฉ โ†’ ๐“
  • R : โ„• โ†’ ฮฉ โ†’ โ„
  • P : MeasureTheory.Measure ฮฉA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsProbabilityMeasure PA measure ฮผ is called a probability measure if ฮผ univ = 1.
  • alg : Learning.Algorithm Unit ๐“ โ„A stochastic, sequential algorithm.
  • ฮฝ : ProbabilityTheory.Kernel ๐“ โ„A kernel from a measurable space ฮฑ to another measurable space ฮฒ is a measurable function ฮบ : ฮฑ โ†’ Measure ฮฒ.ProbabilityTheory.IsMarkovKernel ฮฝA kernel is a Markov kernel if every measure in its image is a probability measure.
  • n : โ„•
  • b : ๐“
  • k : โ„•
Then
ProbabilityTheory.IndepFun (fun x => ((Learning.history O A R n x, O n x), A n x)) (R n)
  P[|{x | A n x = b โˆง Learning.pullCount A b n x = k}]
Two functions are independent if the two measurable space structures they generate are independent.
Code
lemma indepFun_history_reward_cond (h : IsAlgEnvSeq O A R alg (stationaryEnv ฮฝ) P)
    (n : โ„•) (b : ๐“) (k : โ„•) :
    (fun x โ†ฆ ((history O A R n x, O n x), A n x))
      โŸ‚แตข[P[|{x | A n x = b โˆง pullCount A b n x = k}]] R n
Proof
by
  rw [setOf_action_eq_and_pullCount_eq_eq_preimage (O := O) (R' := R)]
  exact h.indepFun_history_action_feedback_cond_stationaryEnv n
    (measurableSet_snd_eq_and_pullCount'_eq n b k) fun u hu โ†ฆ hu.1

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10), the 3th 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: 9 project declarations, 44 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.