Skip to content

Commit 462e91f

Browse files
RemyDegenneBeibeiX0
authored andcommitted
feat: gaussianReal_ext_iff (leanprover-community#30414)
Two real Gaussian distributions are equal iff they have the same mean and variance. Co-authored-by: Remy Degenne <remydegenne@gmail.com>
1 parent 3e3b0b7 commit 462e91f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • Mathlib/Probability/Distributions/Gaussian

Mathlib/Probability/Distributions/Gaussian/Real.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,17 @@ lemma memLp_id_gaussianReal' (p : ℝ≥0∞) (hp : p ≠ ∞) : MemLp id p (gau
537537

538538
end Moments
539539

540+
/-- Two real Gaussian distributions are equal iff they have the same mean and variance. -/
541+
lemma gaussianReal_ext_iff {μ₁ μ₂ : ℝ} {v₁ v₂ : ℝ≥0} :
542+
gaussianReal μ₁ v₁ = gaussianReal μ₂ v₂ ↔ μ₁ = μ₂ ∧ v₁ = v₂ := by
543+
refine ⟨fun h ↦ ?_, by rintro ⟨rfl, rfl⟩; rfl⟩
544+
rw [← integral_id_gaussianReal (μ := μ₁) (v := v₁),
545+
← integral_id_gaussianReal (μ := μ₂) (v := v₂), h]
546+
simp only [integral_id_gaussianReal, true_and]
547+
suffices (v₁ : ℝ) = v₂ by simpa
548+
rw [← variance_id_gaussianReal (μ := μ₁) (v := v₁),
549+
← variance_id_gaussianReal (μ := μ₂) (v := v₂), h]
550+
540551
section LinearMap
541552

542553
variable {μ : ℝ} {v : ℝ≥0}

0 commit comments

Comments
 (0)