Bandits.iIndepFun_snd_apply_prod_streamMeasure
From the authors
Under a product measure μ.prod (streamMeasure ν), the entries of the reward array are
independent.
-
𝓐 : Type u_1m𝓐 : MeasurableSpace 𝓐A measurable space is a space equipped with a σ-algebra. -
𝓡 : Type u_2m𝓡 : MeasurableSpace 𝓡 -
Ω : Type u_3mΩ : MeasurableSpace Ω
-
μ : 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.
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…MeasurableSpace : Type u_6 → Type u_6A measurable space is a space equipped with a σ-algebra.
MeasureTheory.IsProbabilityMeasure : {α : Type u_1} → {m0 : MeasurableSpace α} → MeasureTheory.Measure α → PropA measure `μ` is called a probability measure if `μ univ = 1`.
MeasureTheory.Measure : (α : Type u_5) → [MeasurableSpace α] → Type u_5A 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. The measure of a set `s`, denoted `μ s`, is an extended nonnegative real. The real-valued version is written `μ.real s`.
ProbabilityTheory.IsMarkovKernel : {α : Type u_1} →
{β : Type u_2} → {mα : MeasurableSpace α} → {mβ : MeasurableSpace β} → ProbabilityTheory.Kernel α β → PropA kernel is a Markov kernel if every measure in its image is a probability measure.
ProbabilityTheory.Kernel : (α : Type u_1) → (β : Type u_2) → [MeasurableSpace α] → [MeasurableSpace β] → Type (max u_1 u_2)A kernel from a measurable space `α` to another measurable space `β` is a measurable function `κ : α → Measure β`. The measurable space structure on `MeasureTheory.Measure β` is given by `MeasureTheory.Measure.instMeasurableSpace`. A map `κ : α → MeasureTheory.Measure β` is measurable iff `∀ s : Set β, MeasurableSet s → Measurable (fun a ↦ κ a s)`.
ProbabilityTheory.iIndepFun : {Ω : Type u_1} →
{ι : Type u_2} →
{_mΩ : MeasurableSpace Ω} →
{β : ι → Type u_6} →
[m : (x : ι) → MeasurableSpace (β x)] →
((x : ι) → Ω → β x) → autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.iIndepFun._auto_1 → PropA 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 they generate on `Ω` is independent. For a function `g` with codomain having measurable space structure `m`, the generated measurable space structure is `MeasurableSpace.comap g m`.
MeasureTheory.Measure.prod : {α : Type u_4} →
{β : Type u_5} →
[inst : MeasurableSpace α] →
[inst_1 : MeasurableSpace β] → MeasureTheory.Measure α → MeasureTheory.Measure β → MeasureTheory.Measure (α × β)The binary product of measures. They are defined for arbitrary measures, but we basically prove all properties under the assumption that at least one of them is s-finite.
Bandits.streamMeasure : {𝓐 : Type u_1} →
{𝓡 : Type u_2} →
{m𝓐 : MeasurableSpace 𝓐} →
{m𝓡 : MeasurableSpace 𝓡} → ProbabilityTheory.Kernel 𝓐 𝓡 → MeasureTheory.Measure (ℕ → 𝓐 → 𝓡)Measure of an infinite stream of rewards from each action.Go to its page
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]
rflMeaning 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.