LeanMachineLearning

ProbabilityTheory.IndepFun.fst_prod🔗

Lemma

From the authors

If X and T are independent under μ, then under μ.prod ν the function X ∘ Prod.fst is independent of (T ∘ Prod.fst, Prod.snd).

Types
  • α : Type u_1mα : MeasurableSpace αA measurable space is a space equipped with a σ-algebra.
  • β : Type u_2mβ : MeasurableSpace β
  • γ : Type u_3mγ : MeasurableSpace γ
  • δ : Type u_4mδ : 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.SFinite μA measure is called s-finite if it is a countable sum of finite measures.
  • ν : MeasureTheory.Measure βMeasureTheory.IsProbabilityMeasure νA measure μ is called a probability measure if μ univ = 1.
  • X : α → γ
  • T : α → δ
Assuming
  • h : IndepFun X T μTwo functions are independent if the two measurable space structures they generate are independent.
  • hX : Measurable XA function f between measurable spaces is measurable if the preimage of every measurable set is measurable.
  • hT : Measurable T
Then
IndepFun (fun p => X p.1) (fun p => (T p.1, p.2)) (μ.prod ν)
Code
lemma IndepFun.fst_prod {μ : Measure α} [SFinite μ] {ν : Measure β} [IsProbabilityMeasure ν]
    {X : α → γ} {T : α → δ} (h : IndepFun X T μ) (hX : Measurable X) (hT : Measurable T) :
    IndepFun (fun p : α × β ↦ X p.1) (fun p ↦ (T p.1, p.2)) (μ.prod ν)
Proof
by
  rw [indepFun_iff_measure_inter_preimage_eq_mul]
  intro s t hs ht
  rw [indepFun_iff_measure_inter_preimage_eq_mul] at h
  have hXs : MeasurableSet ((fun p : α × β ↦ X p.1) ⁻¹' s) := hs.preimage (by fun_prop)
  have hYt : MeasurableSet ((fun p : α × β ↦ (T p.1, p.2)) ⁻¹' t) := ht.preimage (by fun_prop)
  rw [Measure.prod_apply_symm (hXs.inter hYt), Measure.prod_apply_symm hXs,
    Measure.prod_apply_symm hYt]
  have h_eq : ∀ y, μ ((fun x ↦ (x, y)) ⁻¹'
      ((fun p : α × β ↦ X p.1) ⁻¹' s ∩ (fun p ↦ (T p.1, p.2)) ⁻¹' t))
      = μ (X ⁻¹' s) * (μ.map T) ((fun x ↦ (x, y)) ⁻¹' t) := fun y ↦ by
    rw [Measure.map_apply hT (ht.preimage measurable_prodMk_right)]
    exact h s _ hs (ht.preimage measurable_prodMk_right)
  have h_eq' : ∀ y, μ ((fun x ↦ (x, y)) ⁻¹' ((fun p : α × β ↦ (T p.1, p.2)) ⁻¹' t))
      = (μ.map T) ((fun x ↦ (x, y)) ⁻¹' t) := fun y ↦ by
    rw [Measure.map_apply hT (ht.preimage measurable_prodMk_right)]
    rfl
  have h_eq'' : ∀ y, μ ((fun x ↦ (x, y)) ⁻¹' ((fun p : α × β ↦ X p.1) ⁻¹' s)) = μ (X ⁻¹' s) :=
    fun _ ↦ rfl
  simp_rw [h_eq, h_eq', h_eq'']
  rw [lintegral_const_mul _ (measurable_measure_prodMk_right ht), lintegral_const, measure_univ,
    mul_one]

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

Nothing to draw. Its statement rests on no other declaration in this project, and names nothing from a package left unaudited — so the graph is this declaration alone. That is the answer, not a missing picture.

Audit surface: 0 project declarations, 12 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.