LeanMachineLearning

Bandits.hasLaw_rewardByCountUntil_zerošŸ”—

Lemma

From the authors

The law of the array rewardByCountUntil A R 0, which is a sub-array of the auxiliary array, is the product measure ⨂ (a, m), ν a.

Types
  • š“ : Type u_1mš“ : MeasurableSpace š“A measurable space is a space equipped with a σ-algebra.DecidableEq š“
  • Ī© : Type u_2mĪ© : MeasurableSpace Ī©
Given
  • A : ā„• → Ī© → š“
  • R : ā„• → Ī© → ā„
  • ν : 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.
  • μ : 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 μA measure μ is called a probability measure if μ univ = 1.
Then
ProbabilityTheory.HasLaw (Learning.rewardByCountUntil A R 0) (MeasureTheory.Measure.infinitePi fun p => ν p.1)
  (μ.prod (streamMeasure ν))
The predicate HasLaw X μ P registers the fact that the random variable X has law μ under the measure P, in other words that P.map X = μ.
Code
lemma hasLaw_rewardByCountUntil_zero (μ : Measure Ω) [IsProbabilityMeasure μ] :
    HasLaw (rewardByCountUntil A R 0) (Measure.infinitePi fun p : š“ Ɨ ā„• ↦ ν p.1)
      (μ.prod (streamMeasure ν))
Proof
have h_indep : iIndepFun (fun (p : š“ Ɨ ā„•) (ω : Ī© Ɨ (ā„• → š“ → ā„)) ↦ ω.2 (p.2 + 1) p.1)
      (μ.prod (streamMeasure ν)) :=
    (iIndepFun_snd_apply_prod_streamMeasure μ ν).precomp (g := fun p : š“ Ɨ ā„• ↦ (p.2 + 1, p.1))
      fun p q hpq ↦ Prod.ext (Prod.mk.inj hpq).2 (by have := (Prod.mk.inj hpq).1; omega)
  h_indep.hasLaw_infinitePi (fun p ↦ hasLaw_snd_apply_prod_streamMeasure μ ν _ _)
    (by fun_prop : Measurable fun (ω : Ī© Ɨ (ā„• → š“ → ā„)) (p : š“ Ɨ ā„•) ↦
      ω.2 (p.2 + 1) p.1).aemeasurable

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10).

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: 3 project declarations, 37 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.