LeanMachineLearning

Bandits.indepFun_rewardByCount๐Ÿ”—

Lemma

From the authors

Two distinct rewards by count are independent.

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.Countable ๐“A type ฮฑ is countable if there exists an injective map ฮฑ โ†’ โ„•.
  • ฮฉ : 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.
  • a : ๐“
  • b : ๐“
  • m : โ„•
  • n : โ„•
Assuming
Then
ProbabilityTheory.IndepFun (Learning.rewardByCount A R a m) (Learning.rewardByCount A R b n) (P.prod (streamMeasure ฮฝ))
Two functions are independent if the two measurable space structures they generate are independent.
Code
lemma indepFun_rewardByCount (h : IsAlgEnvSeq O A R alg (stationaryEnv ฮฝ) P)
    {a b : ๐“} {m n : โ„•} (hm : m โ‰  0) (hn : n โ‰  0) (hne : (a, m) โ‰  (b, n)) :
    rewardByCount A R a m โŸ‚แตข[๐”“] rewardByCount A R b n
Proof
(iIndepFun_rewardByCount h).indepFun (i := โŸจ(a, m), hmโŸฉ) (j := โŸจ(b, n), hnโŸฉ)
    fun h_eq โ†ฆ hne (congrArg Subtype.val h_eq)

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: 12 project declarations, 70 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.