LeanMachineLearning

Bandits.ArrayModel.indepFun_snd_apply_truncRowπŸ”—

Lemma

From the authors

The reward Ο‰.2 m a is independent of truncRow a m, which reads only other coordinates.

Types
  • 𝓐 : Type u_1m𝓐 : MeasurableSpace 𝓐A measurable space is a space equipped with a Οƒ-algebra.DecidableEq 𝓐
  • 𝓑 : Type u_2m𝓑 : MeasurableSpace 𝓑
Given
  • Ξ½ : 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 : 𝓐
  • m : β„•
Then
ProbabilityTheory.IndepFun (fun Ο‰ => Ο‰.2 m a) (truncRow a m) (arrayMeasure Ξ½)
Two functions are independent if the two measurable space structures they generate are independent.
Code
lemma indepFun_snd_apply_truncRow (Ξ½ : Kernel 𝓐 𝓑) [IsMarkovKernel Ξ½] (a : 𝓐) (m : β„•) :
    (fun Ο‰ ↦ Ο‰.2 m a) βŸ‚α΅’[arrayMeasure Ξ½] (truncRow a m)
Proof
by
  let T : (β„• β†’ 𝓐 β†’ 𝓑) β†’ (β„• β†’ 𝓐 β†’ 𝓑) :=
    fun Ο‰ k b ↦ if b = a then Ο‰ (if k < m then k else m + 1 + k) b else Ο‰ k b
  have hT : Measurable[⨆ p ∈ {p : β„• Γ— 𝓐 | p β‰  (m, a)},
      MeasurableSpace.comap (fun Ο‰ : β„• β†’ 𝓐 β†’ 𝓑 ↦ Ο‰ p.1 p.2) inferInstance] T := by
    rw [measurable_iff_comap_le, MeasurableSpace.comap_pi]
    refine iSup_le fun k ↦ ?_
    rw [MeasurableSpace.comap_pi]
    refine iSup_le fun b ↦ ?_
    by_cases hb : b = a
    Β· simp only [T, hb, ↓reduceIte]
      refine le_iSupβ‚‚_of_le (if k < m then k else m + 1 + k, a) ?_ (le_of_eq rfl)
      simp only [Set.mem_ofPred_eq, ne_eq, Prod.mk.injEq, and_true]
      split_ifs <;> omega
    Β· simp only [T, hb, ↓reduceIte]
      exact le_iSupβ‚‚_of_le (k, b) (by simp [hb]) (le_of_eq rfl)
  have hTm : Measurable T :=
    hT.mono (iSupβ‚‚_le fun p _ ↦ Measurable.comap_le (by fun_prop)) le_rfl
  have h := (iIndepFun_eval_streamMeasure Ξ½).indepFun_of_measurable_iSup_comap
    (fun _ ↦ by fun_prop) (i := (m, a)) (by simp) hT
  exact h.snd_prod (ΞΌ := Measure.infinitePi fun _ ↦ volume) (by fun_prop) hTm

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