Closed form of the multivariate Gaussian KL divergence (M3b). For positive-definite covariances S₁, S₂, KL(N(m₁,S₁) ‖ N(m₂,S₂)) = ½ ( log(det S₂ / det S₁) + tr(S₂⁻¹ S₁) + ⟪m₁-m₂, S₂⁻¹(m₁-m₂)⟫ - d ).
The whitening reduction (klDivReal_multivariateGaussian_whiten) sends the pair to a KL against the standard Gaussian (klDivReal_multivariateGaussian_stdGaussian); the three scalar invariants of the whitened covariance (det_whitened, trace_whitened, normSq_cfcSqrt_inv_apply) then identify the arguments.
∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m₁ m₂ : EuclideanSpace ℝ ι) {S₁ S₂ : Matrix ι ι ℝ},
S₁.PosDef →
S₂.PosDef →
InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian m₁ S₁)
(ProbabilityTheory.multivariateGaussian m₂ S₂) =
1 / 2 *
(Real.log (S₂.det / S₁.det) + (S₂⁻¹ * S₁).trace + (m₁ - m₂).ofLp ⬝ᵥ S₂⁻¹.mulVec (m₁.ofLp - m₂.ofLp) -
↑(Fintype.card ι))- DeclProbabilityTheory.klDivReal_multivariateGaussianDeclaration kindtheorem
∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m₁ m₂ : EuclideanSpace ℝ ι) {S₁ S₂ : Matrix ι ι ℝ}, S₁.PosDef → S₂.PosDef → InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian m₁ S₁) (ProbabilityTheory.multivariateGaussian m₂ S₂) = 1 / 2 * (Real.log (S₂.det / S₁.det) + (S₂⁻¹ * S₁).trace + (m₁ - m₂).ofLp ⬝ᵥ S₂⁻¹.mulVec (m₁.ofLp - m₂.ofLp) - ↑(Fintype.card ι)) - DeclProbabilityTheory.trace_whitenedDeclaration kindtheorem
tr C(S₁,S₂) = tr(S₂⁻¹ S₁).∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {S₁ S₂ : Matrix ι ι ℝ}, S₁.PosDef → S₂.PosDef → ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁ * ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁).conjTranspose).trace = (S₂⁻¹ * S₁).traceUses
- DeclProbabilityTheory.posDef_whitenedDeclaration kindtheorem
The whitened covariance
(√S₂⁻¹ √S₁)(√S₂⁻¹ √S₁)ᴴis positive-definite (its factor is invertible).∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {S₁ S₂ : Matrix ι ι ℝ}, S₁.PosDef → S₂.PosDef → ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁ * ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁).conjTranspose).PosDef - DeclProbabilityTheory.normSq_cfcSqrt_inv_applyDeclaration kindtheorem
The whitening map preserves the quadratic form:
‖√S₂⁻¹ v‖² = ⟪v, S₂⁻¹ v⟫.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {S₂ : Matrix ι ι ℝ}, S₂.PosDef → ∀ (v : EuclideanSpace ℝ ι), ‖(Matrix.toEuclideanCLM (CFC.sqrt S₂)⁻¹) v‖ ^ 2 = v.ofLp ⬝ᵥ S₂⁻¹.mulVec v.ofLpUses
- DeclProbabilityTheory.conjTranspose_cfcSqrt_invDeclaration kindtheorem
The inverse of a functional-calculus square root is self-adjoint.
∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (S : Matrix ι ι ℝ), (CFC.sqrt S)⁻¹.conjTranspose = (CFC.sqrt S)⁻¹ - DeclProbabilityTheory.conjTranspose_cfcSqrtDeclaration kindtheorem
The functional-calculus square root of a matrix is self-adjoint.
∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (S : Matrix ι ι ℝ), (CFC.sqrt S).conjTranspose = CFC.sqrt S - DeclProbabilityTheory.cfcSqrt_inv_mul_selfDeclaration kindtheorem
(√S)⁻¹ (√S)⁻¹ = S⁻¹for positive-definiteS.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {S : Matrix ι ι ℝ}, S.PosDef → (CFC.sqrt S)⁻¹ * (CFC.sqrt S)⁻¹ = S⁻¹ - DeclProbabilityTheory.klDivReal_multivariateGaussian_whitenDeclaration kindtheorem
Whitening reduction of the multivariate Gaussian KL. For positive-definite
S₂, pushing both measures through the whitening equivalence(gaussianAffineEquiv m₂ hS₂).symmreduces the KL divergence of two multivariate Gaussians to a KL against the standard Gaussian, with whitened mean√S₂⁻¹ (m₁ − m₂)and covariance(√S₂⁻¹ √S₁)(√S₂⁻¹ √S₁)ᴴ.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m₁ m₂ : EuclideanSpace ℝ ι) (S₁ S₂ : Matrix ι ι ℝ), S₂.PosDef → InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian m₁ S₁) (ProbabilityTheory.multivariateGaussian m₂ S₂) = InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian ((Matrix.toEuclideanCLM (CFC.sqrt S₂)⁻¹) (m₁ - m₂)) ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁ * ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁).conjTranspose)) (ProbabilityTheory.stdGaussian (EuclideanSpace ℝ ι))Uses
- DeclProbabilityTheory.multivariateGaussian_eq_map_gaussianAffineEquivDeclaration kindtheorem
multivariateGaussian m Sis the pushforward of the standard Gaussian by the affine equivalencegaussianAffineEquiv m hS.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m : EuclideanSpace ℝ ι) {S : Matrix ι ι ℝ} (hS : S.PosDef), ProbabilityTheory.multivariateGaussian m S = MeasureTheory.Measure.map (⇑(ProbabilityTheory.gaussianAffineEquiv m hS)) (ProbabilityTheory.stdGaussian (EuclideanSpace ℝ ι)) - DeclProbabilityTheory.gaussianAffineEquiv_applyDeclaration kindtheorem
gaussianAffineEquiv m hSis the affine mapz ↦ m + √S z.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m : EuclideanSpace ℝ ι) {S : Matrix ι ι ℝ} (hS : S.PosDef) (z : EuclideanSpace ℝ ι), (ProbabilityTheory.gaussianAffineEquiv m hS) z = m + (Matrix.toEuclideanCLM (CFC.sqrt S)) z - DeclProbabilityTheory.gaussianAffineEquiv_symm_applyDeclaration kindtheorem
The whitening map: the inverse of
gaussianAffineEquiv m hSisz ↦ √S⁻¹ (z - m).∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (m : EuclideanSpace ℝ ι) {S : Matrix ι ι ℝ} (hS : S.PosDef) (z : EuclideanSpace ℝ ι), (ProbabilityTheory.gaussianAffineEquiv m hS).symm z = (Matrix.toEuclideanCLM (CFC.sqrt S)⁻¹) (z - m) - DeclProbabilityTheory.klDivReal_multivariateGaussian_stdGaussianDeclaration kindtheorem
Closed form of the multivariate Gaussian KL against the standard Gaussian. For a positive-definite covariance
C,klDivReal (N(w, C)) (stdGaussian) = ½ ( -log det C + tr C + ‖w‖² - d ).∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (w : EuclideanSpace ℝ ι) {C : Matrix ι ι ℝ}, C.PosDef → InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian w C) (ProbabilityTheory.stdGaussian (EuclideanSpace ℝ ι)) = 1 / 2 * (-Real.log C.det + C.trace + ‖w‖ ^ 2 - ↑(Fintype.card ι))Uses
- DeclProbabilityTheory.normSq_toEuclideanCLM_of_isometryDeclaration kindtheorem
An orthogonal change of variables preserves the Euclidean norm: if
Mᴴ M = 1then‖toEuclideanCLM M w‖² = ‖w‖².∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {M : Matrix ι ι ℝ}, M.conjTranspose * M = 1 → ∀ (w : EuclideanSpace ℝ ι), ‖(Matrix.toEuclideanCLM M) w‖ ^ 2 = ‖w‖ ^ 2 - DeclProbabilityTheory.map_multivariateGaussian_affineDeclaration kindtheorem
General affine image of a multivariate Gaussian. For positive-semidefinite covariance
S, the affine pushforwardx ↦ a + B xofmultivariateGaussian μ Sis the multivariate Gaussian with transported meana + B μand congruent covarianceB * S * Bᴴ. This is the covariance- transport engine of the diagonalization step: an orthogonalB = Uᵀsends the whitened covariance to its eigenvalue diagonalUᵀ S U. Proved by composing the two affine maps and reducing to the standard-Gaussian imagemap_stdGaussian_affine, using√S · √Sᴴ = √S · √S = S.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (a μ : EuclideanSpace ℝ ι) (B S : Matrix ι ι ℝ), S.PosSemidef → MeasureTheory.Measure.map (fun x => a + (Matrix.toEuclideanCLM B) x) (ProbabilityTheory.multivariateGaussian μ S) = ProbabilityTheory.multivariateGaussian (a + (Matrix.toEuclideanCLM B) μ) (B * S * B.conjTranspose) - DeclProbabilityTheory.klDivReal_multivariateGaussian_diagonal_stdGaussianDeclaration kindtheorem
KL of a diagonal multivariate Gaussian against the standard Gaussian, tensorized. For strictly positive diagonal covariance
d > 0,klDivReal (mvG μ (diagonal d)) stdGaussian = ∑ᵢ ½(-log dᵢ + dᵢ + μᵢ² - 1), the coordinatewise sum of the scalar Gaussian-Gaussian KL closed forms. This is the diagonalized-and-tensorized leg of the multivariate Gaussian KL closed form.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (μ : EuclideanSpace ℝ ι) (d : ι → ℝ), (∀ (i : ι), 0 < d i) → InformationTheory.klDivReal (ProbabilityTheory.multivariateGaussian μ (Matrix.diagonal d)) (ProbabilityTheory.stdGaussian (EuclideanSpace ℝ ι)) = ∑ i, 1 / 2 * (-Real.log (d i) + d i + μ.ofLp i ^ 2 - 1)Uses
- DeclProbabilityTheory.multivariateGaussian_diagonal_eq_map_piDeclaration kindtheorem
A diagonal multivariate Gaussian is a pushed-forward product of scalar Gaussians. For
d ≥ 0,multivariateGaussian μ (diagonal d)is the image undertoLp 2of the product measure∏ᵢ gaussianReal μᵢ dᵢ.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (μ : EuclideanSpace ℝ ι) (d : ι → ℝ), (∀ (i : ι), 0 ≤ d i) → ProbabilityTheory.multivariateGaussian μ (Matrix.diagonal d) = MeasureTheory.Measure.map (WithLp.toLp 2) (MeasureTheory.Measure.pi fun i => ProbabilityTheory.gaussianReal (μ.ofLp i) (d i).toNNReal) - DeclProbabilityTheory.map_stdGaussian_affineDeclaration kindtheorem
The affine image
z ↦ a + B zof the standard Gaussian onEuclideanSpace ℝ ιis the multivariate Gaussian with meanaand covarianceB * Bᴴ.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (a : EuclideanSpace ℝ ι) (B : Matrix ι ι ℝ), MeasureTheory.Measure.map (fun z => a + (Matrix.toEuclideanCLM B) z) (ProbabilityTheory.stdGaussian (EuclideanSpace ℝ ι)) = ProbabilityTheory.multivariateGaussian a (B * B.conjTranspose) - DeclProbabilityTheory.inner_adjoint_toEuclideanCLMDeclaration kindtheorem
The real inner product of the two adjoint images
(toEuclideanCLM B)ᴴ xand(toEuclideanCLM B)ᴴ yequals the quadratic formx ⬝ᵥ (B * Bᴴ) *ᵥ y.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (B : Matrix ι ι ℝ) (x y : EuclideanSpace ℝ ι), inner ℝ ((ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B)) x) ((ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B)) y) = x.ofLp ⬝ᵥ (B * B.conjTranspose).mulVec y.ofLp - DeclProbabilityTheory.adjoint_toEuclideanCLMDeclaration kindtheorem
The adjoint of
toEuclideanCLM BistoEuclideanCLM Bᴴ:toEuclideanCLMis a star algebra equivalence, so it carries the matrix conjugate transpose to the operator adjoint.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (B : Matrix ι ι ℝ), ContinuousLinearMap.adjoint (Matrix.toEuclideanCLM B) = Matrix.toEuclideanCLM B.conjTranspose - DeclInformationTheory.klDiv_gaussianReal_ne_topDeclaration kindtheorem
Finiteness of the one-dimensional Gaussian-Gaussian KL divergence. For variance parameters
v₁ ≠ 0,v₂ ≠ 0, theℝ≥0∞-valuedklDiv (N(m₁, v₁)) (N(m₂, v₂))is finite. This is the integrability side-condition thatklDivReal_pirequires per coordinate: the log-likelihood ratio isP-a.e. an explicit quadratic, whose square-integrability againstP = N(m₁, v₁)is the finiteness of the second moment.∀ {m₁ m₂ : ℝ} {v₁ v₂ : NNReal}, v₁ ≠ 0 → v₂ ≠ 0 → InformationTheory.klDiv (ProbabilityTheory.gaussianReal m₁ v₁) (ProbabilityTheory.gaussianReal m₂ v₂) ≠ ⊤ - DeclInformationTheory.klDivReal_pi'Declaration kindtheorem
KL tensorization for
klDivRealover an arbitrary finite product (generalFintypeindex): the real-valued analogue ofklDiv_pi'.∀ {ι : Type u_3} [inst : Fintype ι] {X : ι → Type u_4} {mX : (i : ι) → MeasurableSpace (X i)} (P Q : (i : ι) → MeasureTheory.Measure (X i)) [∀ (i : ι), MeasureTheory.IsProbabilityMeasure (P i)] [∀ (i : ι), MeasureTheory.IsProbabilityMeasure (Q i)], (∀ (i : ι), (P i).AbsolutelyContinuous (Q i)) → (∀ (i : ι), InformationTheory.klDiv (P i) (Q i) ≠ ⊤) → InformationTheory.klDivReal (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) = ∑ i, InformationTheory.klDivReal (P i) (Q i) - DeclInformationTheory.klDiv_pi'Declaration kindtheorem
KL tensorization over an arbitrary finite product (general
Fintypeindex). Reduces to theFin-indexedklDiv_piby reindexing throughι ≃ Fin (card ι).∀ {ι : Type u_3} [inst : Fintype ι] {X : ι → Type u_4} {mX : (i : ι) → MeasurableSpace (X i)} (P Q : (i : ι) → MeasureTheory.Measure (X i)) [∀ (i : ι), MeasureTheory.IsProbabilityMeasure (P i)] [∀ (i : ι), MeasureTheory.IsProbabilityMeasure (Q i)], InformationTheory.klDiv (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) = ∑ i, InformationTheory.klDiv (P i) (Q i) - DeclInformationTheory.klDiv_piDeclaration kindtheorem
KL tensorization over a finite product, indexed by
Fin (n+1):klDiv (Measure.pi P) (Measure.pi Q) = ∑ i, klDiv (P i) (Q i).∀ {n : ℕ} {X : Fin n → Type u_3} {mX : (i : Fin n) → MeasurableSpace (X i)} (P Q : (i : Fin n) → MeasureTheory.Measure (X i)) [∀ (i : Fin n), MeasureTheory.IsProbabilityMeasure (P i)] [∀ (i : Fin n), MeasureTheory.IsProbabilityMeasure (Q i)], InformationTheory.klDiv (MeasureTheory.Measure.pi P) (MeasureTheory.Measure.pi Q) = ∑ i, InformationTheory.klDiv (P i) (Q i)Used by
- DeclInformationTheory.klDiv_prodDeclaration kindtheorem
Binary KL tensorization. For probability measures,
klDiv (μ.prod ν) (μ'.prod ν') = klDiv μ μ' + klDiv ν ν'.∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (μ μ' : MeasureTheory.Measure α) (ν ν' : MeasureTheory.Measure β) [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsProbabilityMeasure μ'] [MeasureTheory.IsProbabilityMeasure ν] [MeasureTheory.IsProbabilityMeasure ν'], InformationTheory.klDiv (μ.prod ν) (μ'.prod ν') = InformationTheory.klDiv μ μ' + InformationTheory.klDiv ν ν'Used by
- DeclInformationTheory.klDiv_prod_same_leftDeclaration kindtheorem
Two products sharing the same first marginal reduce to the second-coordinate KL:
klDiv (μ.prod ν) (μ.prod ν') = klDiv ν ν'.∀ {α : Type u_1} {β : Type u_2} {mα : MeasurableSpace α} {mβ : MeasurableSpace β} (μ : MeasureTheory.Measure α) (ν ν' : MeasureTheory.Measure β) [MeasureTheory.IsProbabilityMeasure μ] [MeasureTheory.IsFiniteMeasure ν] [MeasureTheory.IsFiniteMeasure ν'], InformationTheory.klDiv (μ.prod ν) (μ.prod ν') = InformationTheory.klDiv ν ν'Used by
- DeclInformationTheory.klDiv_map_equivDeclaration kindtheorem
KL invariance under a measurable equivalence (
ℝ≥0∞-valued). For finite measuresμ,νand a measurable equivalencee : α ≃ᵐ β,klDiv (μ.map e) (ν.map e) = klDiv μ ν.∀ {α : Type u_1} {β : Type u_2} [inst : MeasurableSpace α] [inst_1 : MeasurableSpace β] (e : α ≃ᵐ β) (μ ν : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] [MeasureTheory.IsFiniteMeasure ν], InformationTheory.klDiv (MeasureTheory.Measure.map (⇑e) μ) (MeasureTheory.Measure.map (⇑e) ν) = InformationTheory.klDiv μ ν - DeclInformationTheory.llr_map_equivDeclaration kindtheorem
The log-likelihood ratio is invariant (a.e.) under pushforward by a measurable equivalence:
llr (μ.map e) (ν.map e) (e x) =ᵐ[ν] llr μ ν x.∀ {α : Type u_1} {β : Type u_2} [inst : MeasurableSpace α] [inst_1 : MeasurableSpace β] (e : α ≃ᵐ β) (μ ν : MeasureTheory.Measure α) [MeasureTheory.SigmaFinite μ] [MeasureTheory.SigmaFinite ν], (fun x => MeasureTheory.llr (MeasureTheory.Measure.map (⇑e) μ) (MeasureTheory.Measure.map (⇑e) ν) (e x)) =ᵐ[ν] MeasureTheory.llr μ ν - DeclInformationTheory.klDivReal_eq_toReal_klDivDeclaration kindtheorem
For probability measures with
P ≪ Q, the ℝ-valued KL equals(Mathlib.klDiv P Q).toReal. Both measures have total mass 1, so the Mathlib correction term vanishes.∀ {α : Type u_1} [inst : MeasurableSpace α] (P Q : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure P] [MeasureTheory.IsProbabilityMeasure Q], P.AbsolutelyContinuous Q → InformationTheory.klDivReal P Q = (InformationTheory.klDiv P Q).toReal - DeclInformationTheory.integrand_eq_llrDeclaration kindtheorem
The integrand
log ((P.rnDeriv Q x).toReal)is definitionally Mathlib's log-likelihood ratiollr P Q x.∀ {α : Type u_1} [inst : MeasurableSpace α] (P Q : MeasureTheory.Measure α), (fun x => Real.log (P.rnDeriv Q x).toReal) = MeasureTheory.llr P Q - DeclInformationTheory.klDivReal_gaussianRealDeclaration kindtheorem
Closed form of the 1-D Gaussian-Gaussian KL divergence. For variance parameters
v₁ ≠ 0,v₂ ≠ 0,KL( N(m₁, v₁) ‖ N(m₂, v₂) ) = ½ ( log(v₂/v₁) + (v₁ + (m₁-m₂)²)/v₂ - 1 ).∀ {m₁ m₂ : ℝ} {v₁ v₂ : NNReal}, v₁ ≠ 0 → v₂ ≠ 0 → InformationTheory.klDivReal (ProbabilityTheory.gaussianReal m₁ v₁) (ProbabilityTheory.gaussianReal m₂ v₂) = 1 / 2 * (Real.log (↑v₂ / ↑v₁) + (↑v₁ + (m₁ - m₂) ^ 2) / ↑v₂ - 1)Uses
- DeclInformationTheory.rnDeriv_gaussianReal_ratioDeclaration kindtheorem
The Radon-Nikodym derivative of one real Gaussian w.r.t. another is, volume-a.e., the ratio of their densities.
∀ {m₁ m₂ : ℝ} {v₁ v₂ : NNReal}, v₁ ≠ 0 → v₂ ≠ 0 → (ProbabilityTheory.gaussianReal m₁ v₁).rnDeriv (ProbabilityTheory.gaussianReal m₂ v₂) =ᵐ[MeasureTheory.volume] fun x => ProbabilityTheory.gaussianPDF m₁ v₁ x / ProbabilityTheory.gaussianPDF m₂ v₂ x - DeclInformationTheory.log_gaussianPDFRealDeclaration kindtheorem
log (gaussianPDFReal m v x) = -½ log(2πv) - (x - m)²/(2v)forv ≠ 0.∀ {m₁ : ℝ} {v₁ : NNReal}, v₁ ≠ 0 → ∀ (x : ℝ), Real.log (ProbabilityTheory.gaussianPDFReal m₁ v₁ x) = -(1 / 2) * Real.log (2 * Real.pi * ↑v₁) - (x - m₁) ^ 2 / (2 * ↑v₁) - DeclInformationTheory.integral_sq_sub_constDeclaration kindtheorem
∫ (x - m₂)² ∂gaussianReal m₁ v₁ = v₁ + (m₁ - m₂)²(bias-variance split).∀ {m₁ m₂ : ℝ} {v₁ : NNReal}, ∫ (x : ℝ), (x - m₂) ^ 2 ∂ProbabilityTheory.gaussianReal m₁ v₁ = ↑v₁ + (m₁ - m₂) ^ 2 - DeclInformationTheory.integral_sub_mean_selfDeclaration kindtheorem
∫ (x - m₁) ∂gaussianReal m₁ v₁ = 0.∀ {m₁ : ℝ} {v₁ : NNReal}, ∫ (x : ℝ), x - m₁ ∂ProbabilityTheory.gaussianReal m₁ v₁ = 0 - DeclInformationTheory.integral_sq_sub_mean_selfDeclaration kindtheorem
∫ (x - m₁)² ∂gaussianReal m₁ v₁ = v₁.∀ {m₁ : ℝ} {v₁ : NNReal}, ∫ (x : ℝ), (x - m₁) ^ 2 ∂ProbabilityTheory.gaussianReal m₁ v₁ = ↑v₁ - DeclInformationTheory.klDivReal_map_measurableEquivDeclaration kindtheorem
KL invariance under a measurable equivalence. For
σ-finite measuresP,Qonαand a measurable equivalencee : α ≃ᵐ β,klDivReal (P.map e) (Q.map e) = klDivReal P Q.∀ {α : Type u_1} {β : Type u_2} [inst : MeasurableSpace α] [inst_1 : MeasurableSpace β] (e : α ≃ᵐ β) (P Q : MeasureTheory.Measure α) [MeasureTheory.SigmaFinite P] [MeasureTheory.SigmaFinite Q], InformationTheory.klDivReal (MeasureTheory.Measure.map (⇑e) P) (MeasureTheory.Measure.map (⇑e) Q) = InformationTheory.klDivReal P Q - DeclProbabilityTheory.det_whitenedDeclaration kindtheorem
det C(S₁,S₂) = det S₁ / det S₂.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {S₁ S₂ : Matrix ι ι ℝ}, S₁.PosDef → S₂.PosDef → ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁ * ((CFC.sqrt S₂)⁻¹ * CFC.sqrt S₁).conjTranspose).det = S₁.det / S₂.det - DeclProbabilityTheory.isUnit_det_cfcSqrtDeclaration kindtheorem
For a positive-definite matrix
S, the functional-calculus square root has invertible determinant:(CFC.sqrt S).det ^ 2 = S.det > 0, so the sqrt is itself invertible.∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (S : Matrix ι ι ℝ), S.PosDef → IsUnit (CFC.sqrt S).det - HypothesishS₁
S₁.PosDef
- HypothesishS₂
S₂.PosDef
- DefinitionInformationTheory.klDivRealdef
ℝ-valued KL divergence. Returns 0 when
Pis not absolutely continuous with respect toQ(by convention; theℝ≥0∞-valuedklDivreturns⊤in that case).{α : Type u_1} → [inst : MeasurableSpace α] → MeasureTheory.Measure α → MeasureTheory.Measure α → ℝ - DefinitionProbabilityTheory.gaussianAffineEquivdef
The defining affine map
z ↦ m + √S zofmultivariateGaussian m S, as a measurable equivalence for positive-definiteS(whose functional-calculus square root is invertible).{ι : Type u_1} → [Fintype ι] → [DecidableEq ι] → EuclideanSpace ℝ ι → {S : Matrix ι ι ℝ} → S.PosDef → EuclideanSpace ℝ ι ≃ᵐ EuclideanSpace ℝ ι - DefinitionProbabilityTheory.toEuclideanCLEdef
An invertible matrix as a continuous linear equivalence on
EuclideanSpace ℝ ι.{ι : Type u_1} → [inst : Fintype ι] → [inst_1 : DecidableEq ι] → (M : Matrix ι ι ℝ) → IsUnit M.det → EuclideanSpace ℝ ι ≃L[ℝ] EuclideanSpace ℝ ι - DefinitionProbabilityTheory.toLpMeasurableEquivdef
The Euclidean identification
toLp 2 : (ι → ℝ) → EuclideanSpace ℝ ιas a measurable equivalence, used to transport the tensorization ofMeasure.piontoEuclideanSpace.{ι : Type u_1} → [Fintype ι] → (ι → ℝ) ≃ᵐ EuclideanSpace ℝ ι
Verification
- Replay
- accepted
- Axioms
- Classical.choiceQuot.soundpropext
- Statement identity
- not-applicable
- Substrate
- Lean 4 kernel v4.31.0
- Dictionary pin
- design-lab@5802df4 · initial
- Frozen export
- 40c078c5fc77
- Verified
- 2026-09-24T00:00:00Z