LeanMachineLearning

Bandits.iIndepFun_snd_apply_prod_streamMeasure🔗

Lemma

From the authors

Under a product measure μ.prod (streamMeasure ν), the entries of the reward array are independent.

Types
  • 𝓐 : Type u_1m𝓐 : MeasurableSpace 𝓐A measurable space is a space equipped with a σ-algebra.
  • 𝓡 : Type u_2m𝓡 : MeasurableSpace 𝓡
  • Ω : Type u_3mΩ : MeasurableSpace Ω
Given
  • μ : 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.
  • ν : 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.
Then
ProbabilityTheory.iIndepFun (fun p ω => ω.2 p.1 p.2) (μ.prod (streamMeasure ν))
A family of functions defined on the same space Ω and taking values in possibly different spaces, each with a measurable space structure, is independent if the family of measurable space structures…
Code
lemma iIndepFun_snd_apply_prod_streamMeasure {Ω : Type*} {mΩ : MeasurableSpace Ω} (μ : Measure Ω)
    [IsProbabilityMeasure μ] (ν : Kernel 𝓐 𝓡) [IsMarkovKernel ν] :
    iIndepFun (fun (p : ℕ × 𝓐) (ω : Ω × (ℕ → 𝓐 → 𝓡)) ↦ ω.2 p.1 p.2)
      (μ.prod (streamMeasure ν))
Proof
by
  have h_snd : (μ.prod (streamMeasure ν)).map Prod.snd = streamMeasure ν := Measure.snd_prod
  rw [iIndepFun_iff_map_fun_eq_infinitePi_map (fun _ ↦ by fun_prop)]
  calc (μ.prod (streamMeasure ν)).map (fun ω (i : ℕ × 𝓐) ↦ ω.2 i.1 i.2)
  _ = ((μ.prod (streamMeasure ν)).map Prod.snd).map (fun z (i : ℕ × 𝓐) ↦ z i.1 i.2) := by
    rw [Measure.map_map (by fun_prop) measurable_snd]
    rfl
  _ = Measure.infinitePi fun i : ℕ × 𝓐 ↦ (streamMeasure ν).map (fun z ↦ z i.1 i.2) := by
    rw [h_snd]
    exact (iIndepFun_iff_map_fun_eq_infinitePi_map (fun _ ↦ by fun_prop)).1
      (iIndepFun_eval_streamMeasure ν)
  _ = Measure.infinitePi fun i : ℕ × 𝓐 ↦
      (μ.prod (streamMeasure ν)).map (fun ω ↦ ω.2 i.1 i.2) := by
    refine congrArg _ (funext fun i ↦ ?_)
    conv_lhs => rw [← h_snd]
    rw [Measure.map_map (by fun_prop) measurable_snd]
    rfl

Meaning last changed in v4.35.0-rc2-1-g61e506b (2026-09-22), the 2th 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: 1 project declarations, 16 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.