LeanMachineLearning

Bandits.hasLaw_reward_cond🔗

Lemma

From the authors

Conditionally on the event that the action at time t is b and that b was pulled k times before, the reward at time t has law ν b.

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.
  • t :
  • b : 𝓐
  • k :
Assuming
Then
ProbabilityTheory.HasLaw (R t) (ν b) P[|{x | A t x = bLearning.pullCount A b t x = k}]
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_reward_cond (h : IsAlgEnvSeq O A R alg (stationaryEnv ν) P) (t : ℕ) (b : 𝓐) (k : ℕ)
    (hP : P {x | A t x = b ∧ pullCount A b t x = k} ≠ 0) :
    HasLaw (R t) (ν b) (P[|{x | A t x = b ∧ pullCount A b t x = k}])
Proof
by
  rw [setOf_action_eq_and_pullCount_eq_eq_preimage (O := O) (R' := R)] at hP ⊢
  exact h.hasLaw_feedback_cond_stationaryEnv t (measurableSet_snd_eq_and_pullCount'_eq t b k)
    (fun u hu ↦ hu.1) hP

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, 53 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.