Mathlib.Probability.Kernel
Kernel-measure probability helpers: graph-map product identities and composition-product assembly lemmas for conditional-law arguments.
CompProdAssembly 2 core · 1 supporting This file packages recurring measure-kernel assembly steps for composition products. ★ compProd_eq_of_inner_ae_kernel★ compProd_eq_of_inner_ae
Composition-product assembly lemmas
This file packages recurring measure-kernel assembly steps for composition products. The main lemmas turn an almost-everywhere equality of inner kernels on a product space into equality of the resulting outer composition products:
* compProd_eq_of_inner_ae: the inner kernels are mixed against a fixed s-finite measure;
* compProd_eq_of_inner_ae_kernel: the inner kernels are mixed against an indexed s-finite
kernel;
* compProd_map_snd_apply: the second-coordinate marginal of a kernel composition product
is the bind of the section of the inner kernel against the outer kernel value.
These results isolate the Fubini-style steps that otherwise require repeating
Measure.ext_prod, compProd_apply_prod, ae_ae_of_ae_compProd, and
lintegral_congr_ae.
CompProd assembly from an a.e. inner equality, indexed-integrator form. Consider two Markov-style kernels KL, KR from a base space to an outer space, each built by mixing the section at a base point of an inner kernel — fL, respectively fR, on the product of the base space and an intermediate space — against a fixed intermediate kernel κ evaluated at that point: KL a equals the section fL(a,·) composed with κ a and KR a equals the section fR(a,·) composed with κ a. If the inner kernels fL and fR agree almost everywhere with respect to the composition product of the base measure ν and κ, then the composition products ν ⊗ₘ KL and ν ⊗ₘ KR are equal.
Formal statement
Proof (Lean source)
CompProd assembly from an a.e. inner equality. Consider two Markov-style kernels KL, KR from a base space to an outer space, each built by mixing the section at a base point of an inner kernel — fL, respectively fR, on the product of the base space and an intermediate space — against a fixed intermediate measure μ: KL a equals the section fL(a,·) composed with μ and KR a equals the section fR(a,·) composed with μ. If the inner kernels fL and fR agree almost everywhere with respect to the composition product of the base measure ν with the constant-μ kernel, then the composition products ν ⊗ₘ KL and ν ⊗ₘ KR are equal.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
compProd_map_snd_applytheorem — Snd-marginal of a composition product, pointwise (disintegration backbone).Proof (Lean source)
theorem compProd_map_snd_apply {α β γ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] (κ₁ : Kernel α β) (κ₂ : Kernel (α × β) γ) [IsSFiniteKernel κ₁] [IsSFiniteKernel κ₂] (a : α) : ((κ₁ ⊗ₖ κ₂).map snd) a = (κ₂.sectR a) ∘ₘ (κ₁ a) := by rw [Kernel.map_apply _ measurable_snd, Kernel.compProd_apply_eq_compProd_sectR, ← Measure.snd, Measure.snd_compProd]
GraphMapProd 2 core · 2 supporting If νₗ is an s-finite measure on γ and Φ : β × γ → δ is measurable, then pushing a product measure α ⊗ νₗ forward along the *graph map* (o, l) ↦ (o, Φ (o, l)) produces a composition product α.compProd κ, where the disinte ★ map_graph_prod_eq_compProd
The graph push-forward of a product measure is a composition product
If νₗ is an s-finite measure on γ and Φ : β × γ → δ is measurable, then
pushing a product measure α ⊗ νₗ forward along the graph map
(o, l) ↦ (o, Φ (o, l)) produces a composition product α.compProd κ, where the
disintegration kernel κ o = νₗ.map (fun l => Φ (o, l)) reads the first
coordinate as a parameter and pushes the γ-marginal through the slice of Φ.
This is the abstract measure-theoretic core of "exogenous noise plus a structural
mechanism gives an environment-invariant conditional law": the predictor marginal
is α, the exogenous-noise law is νₗ, the mechanism is Φ, and the resulting
conditional law of the response given the predictor is the kernel κ.
The structural-mechanism kernel κ o = νₗ.map (Φ (o, ·)): at each value o of the first coordinate, push the γ-marginal νₗ through the slice l ↦ Φ (o, l). Built as the deterministic-times-constant product kernel (Kernel.id ×ₖ Kernel.const β νₗ) mapped through Φ.
Graph push-forward of a product measure is a composition product. For an s-finite measure α on a first factor, an s-finite measure νₗ on a second factor, and a measurable mechanism map Φ combining the two factors into a third space, pushing the product measure α.prod νₗ forward along the graph map (o, l) ↦ (o, Φ (o, l)) equals the composition product of α with the mechanism kernel that sends each value o of the first coordinate to the pushforward of νₗ through the slice l ↦ Φ (o, l).
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
mechanismKernel_applytheorem — Pointwise value of mechanismKernel: κ o = νₗ.map (fun l => Φ (o, l)).hypothesesconclusionmechanismKernel νₗ Φ o = νₗ.map (fun l => Φ (o, l))Proof (Lean source)
theorem mechanismKernel_apply (νₗ : Measure γ) [SFinite νₗ] {Φ : β × γ → δ} (hΦ : Measurable Φ) (o : β) : mechanismKernel νₗ Φ o = νₗ.map (fun l => Φ (o, l)) := by unfold mechanismKernel rw [ProbabilityTheory.Kernel.map_apply _ hΦ, ProbabilityTheory.Kernel.prod_apply, ProbabilityTheory.Kernel.id_apply, ProbabilityTheory.Kernel.const_apply, MeasureTheory.Measure.dirac_prod, MeasureTheory.Measure.map_map hΦ measurable_prodMk_left] rfl -
instIsMarkovKernelMechanismKerneltheorem — The mechanism kernel is Markov when the exogenous-noise law is a probability measure and the mechanism is measurable.hypothesesconclusionIsMarkovKernel (mechanismKernel νₗ Φ)Proof (Lean source)
theorem instIsMarkovKernelMechanismKernel (νₗ : Measure γ) [IsProbabilityMeasure νₗ] {Φ : β × γ → δ} (hΦ : Measurable Φ) : IsMarkovKernel (mechanismKernel νₗ Φ) := by unfold mechanismKernel exact ProbabilityTheory.Kernel.IsMarkovKernel.map _ hΦ
ProductCondDistrib 2 core · 0 supporting Let ρ be a finite base measure on α, and let κ : Kernel α β and η : Kernel α γ be Markov kernels. ★ condDistrib_fst_of_compProd_prod★ condDistrib_snd_of_compProd_prod
Conditional distributions for product kernels
Let ρ be a finite base measure on α, and let κ : Kernel α β and
η : Kernel α γ be Markov kernels. After sampling (B, C) from the product kernel
Kernel.prod κ η over the base coordinate, the conditional distribution of B given the
base coordinate is κ, and the conditional distribution of C given the base coordinate
is η.
The public theorems condDistrib_fst_of_compProd_prod and
condDistrib_snd_of_compProd_prod record these two coordinate conditionals for
Measure.compProd ρ (Kernel.prod κ η).
For the joint law formed by combining a finite base measure ρ with the product of two Markov kernels κ and η, the conditional distribution of the first product-kernel coordinate given the base coordinate equals κ, for ρ-almost every base point.
Formal statement
Proof (Lean source)
For the joint law formed by combining a finite base measure ρ with the product of two Markov kernels κ and η, the conditional distribution of the second product-kernel coordinate given the base coordinate equals η, for ρ-almost every base point.