File: Mathlib/Probability/Distributions/Gaussian.lean

full_name: ProbabilityTheory.gaussianPDFReal
code: /-- Probability density function of the gaussian distribution with mean `μ` and variance `v`. -/
noncomputable
def gaussianPDFReal (μ : ℝ) (v : ℝ≥0) (x : ℝ) : ℝ 
goal: ℝ

full_name: ProbabilityTheory.gaussianPDFReal_def
code: lemma gaussianPDFReal_def (μ : ℝ) (v : ℝ≥0) :
    gaussianPDFReal μ v =
      fun x ↦ (Real.sqrt (2 * π * v))⁻¹ * rexp (- (x - μ)^2 / (2 * v)) 
goal: ProbabilityTheory.gaussianPDFReal μ v = fun x => (√(2 * π * ↑v))⁻¹ * rexp (-(x - μ) ^ 2 / (2 * ↑v))

full_name: ProbabilityTheory.gaussianPDFReal_zero_var
code: @[simp]
lemma gaussianPDFReal_zero_var (m : ℝ) : gaussianPDFReal m 0 = 0 
goal: ProbabilityTheory.gaussianPDFReal m 0 = 0

full_name: ProbabilityTheory.gaussianPDFReal_pos
code: /-- The gaussian pdf is positive when the variance is not zero. -/
lemma gaussianPDFReal_pos (μ : ℝ) (v : ℝ≥0) (x : ℝ) (hv : v ≠ 0) : 0 < gaussianPDFReal μ v x 
goal: 0 < ProbabilityTheory.gaussianPDFReal μ v x

full_name: ProbabilityTheory.gaussianPDFReal_nonneg
code: /-- The gaussian pdf is nonnegative. -/
lemma gaussianPDFReal_nonneg (μ : ℝ) (v : ℝ≥0) (x : ℝ) : 0 ≤ gaussianPDFReal μ v x 
goal: 0 ≤ ProbabilityTheory.gaussianPDFReal μ v x

full_name: ProbabilityTheory.measurable_gaussianPDFReal
code: /-- The gaussian pdf is measurable. -/
lemma measurable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDFReal μ v) 
goal: Measurable (ProbabilityTheory.gaussianPDFReal μ v)

full_name: ProbabilityTheory.stronglyMeasurable_gaussianPDFReal
code: /-- The gaussian pdf is strongly measurable. -/
lemma stronglyMeasurable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) :
    StronglyMeasurable (gaussianPDFReal μ v) 
goal: MeasureTheory.StronglyMeasurable (ProbabilityTheory.gaussianPDFReal μ v)

full_name: ProbabilityTheory.integrable_gaussianPDFReal
code: lemma integrable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) :
    Integrable (gaussianPDFReal μ v) 
goal: MeasureTheory.Integrable (ProbabilityTheory.gaussianPDFReal μ v) MeasureTheory.volume

full_name: ProbabilityTheory.lintegral_gaussianPDFReal_eq_one
code: /-- The gaussian distribution pdf integrates to 1 when the variance is not zero.  -/
lemma lintegral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (h : v ≠ 0) :
    ∫⁻ x, ENNReal.ofReal (gaussianPDFReal μ v x) = 1 
goal: ∫⁻ (x : ℝ), ENNReal.ofReal (ProbabilityTheory.gaussianPDFReal μ v x) = 1

full_name: ProbabilityTheory.integral_gaussianPDFReal_eq_one
code: /-- The gaussian distribution pdf integrates to 1 when the variance is not zero.  -/
lemma integral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    ∫ x, gaussianPDFReal μ v x = 1 
goal: ∫ (x : ℝ), ProbabilityTheory.gaussianPDFReal μ v x = 1

full_name: ProbabilityTheory.gaussianPDFReal_sub
code: lemma gaussianPDFReal_sub {μ : ℝ} {v : ℝ≥0} (x y : ℝ) :
    gaussianPDFReal μ v (x - y) = gaussianPDFReal (μ + y) v x 
goal: ProbabilityTheory.gaussianPDFReal μ v (x - y) = ProbabilityTheory.gaussianPDFReal (μ + y) v x

full_name: ProbabilityTheory.gaussianPDFReal_add
code: lemma gaussianPDFReal_add {μ : ℝ} {v : ℝ≥0} (x y : ℝ) :
    gaussianPDFReal μ v (x + y) = gaussianPDFReal (μ - y) v x 
goal: ProbabilityTheory.gaussianPDFReal μ v (x + y) = ProbabilityTheory.gaussianPDFReal (μ - y) v x

full_name: ProbabilityTheory.gaussianPDFReal_inv_mul
code: lemma gaussianPDFReal_inv_mul {μ : ℝ} {v : ℝ≥0} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :
    gaussianPDFReal μ v (c⁻¹ * x) = |c| * gaussianPDFReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) x 
goal: ProbabilityTheory.gaussianPDFReal μ v (c⁻¹ * x) = |c| * ProbabilityTheory.gaussianPDFReal (c * μ) (⟨c ^ 2, ⋯⟩ * v) x

full_name: ProbabilityTheory.gaussianPDFReal_mul
code: lemma gaussianPDFReal_mul {μ : ℝ} {v : ℝ≥0} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :
    gaussianPDFReal μ v (c * x)
      = |c⁻¹| * gaussianPDFReal (c⁻¹ * μ) (⟨(c^2)⁻¹, inv_nonneg.mpr (sq_nonneg _)⟩ * v) x 
goal: ProbabilityTheory.gaussianPDFReal μ v (c * x) =
  |c⁻¹| * ProbabilityTheory.gaussianPDFReal (c⁻¹ * μ) (⟨(c ^ 2)⁻¹, ⋯⟩ * v) x

full_name: ProbabilityTheory.gaussianPDF
code: /-- The pdf of a Gaussian distribution on ℝ with mean `μ` and variance `v`. -/
noncomputable
def gaussianPDF (μ : ℝ) (v : ℝ≥0) (x : ℝ) : ℝ≥0∞ 
goal: ℝ≥0∞

full_name: ProbabilityTheory.gaussianPDF_def
code: lemma gaussianPDF_def (μ : ℝ) (v : ℝ≥0) :
    gaussianPDF μ v = fun x ↦ ENNReal.ofReal (gaussianPDFReal μ v x) 
goal: ProbabilityTheory.gaussianPDF μ v = fun x => ENNReal.ofReal (ProbabilityTheory.gaussianPDFReal μ v x)

full_name: ProbabilityTheory.gaussianPDF_zero_var
code: @[simp]
lemma gaussianPDF_zero_var (μ : ℝ) : gaussianPDF μ 0 = 0 
goal: ProbabilityTheory.gaussianPDF μ 0 = 0

full_name: ProbabilityTheory.gaussianPDF_pos
code: lemma gaussianPDF_pos (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (x : ℝ) : 0 < gaussianPDF μ v x 
goal: 0 < ProbabilityTheory.gaussianPDF μ v x

full_name: ProbabilityTheory.measurable_gaussianPDF
code: @[measurability]
lemma measurable_gaussianPDF (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDF μ v) 
goal: Measurable (ProbabilityTheory.gaussianPDF μ v)

full_name: ProbabilityTheory.lintegral_gaussianPDF_eq_one
code: @[simp]
lemma lintegral_gaussianPDF_eq_one (μ : ℝ) {v : ℝ≥0} (h : v ≠ 0) :
    ∫⁻ x, gaussianPDF μ v x = 1 
goal: ∫⁻ (x : ℝ), ProbabilityTheory.gaussianPDF μ v x = 1

full_name: ProbabilityTheory.gaussianReal
code: /-- A Gaussian distribution on `ℝ` with mean `μ` and variance `v`. -/
noncomputable
def gaussianReal (μ : ℝ) (v : ℝ≥0) : Measure ℝ 
goal: MeasureTheory.Measure ℝ

full_name: ProbabilityTheory.gaussianReal_of_var_ne_zero
code: lemma gaussianReal_of_var_ne_zero (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    gaussianReal μ v = volume.withDensity (gaussianPDF μ v) 
goal: ProbabilityTheory.gaussianReal μ v = MeasureTheory.volume.withDensity (ProbabilityTheory.gaussianPDF μ v)

full_name: ProbabilityTheory.gaussianReal_zero_var
code: @[simp]
lemma gaussianReal_zero_var (μ : ℝ) : gaussianReal μ 0 = Measure.dirac μ 
goal: ProbabilityTheory.gaussianReal μ 0 = MeasureTheory.Measure.dirac μ

full_name: ProbabilityTheory.instIsProbabilityMeasureGaussianReal
code: instance instIsProbabilityMeasureGaussianReal (μ : ℝ) (v : ℝ≥0) :
    IsProbabilityMeasure (gaussianReal μ v) 
goal: MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.gaussianReal μ v)

full_name: ProbabilityTheory.gaussianReal_apply
code: lemma gaussianReal_apply (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :
    gaussianReal μ v s = ∫⁻ x in s, gaussianPDF μ v x 
goal: (ProbabilityTheory.gaussianReal μ v) s = ∫⁻ (x : ℝ) in s, ProbabilityTheory.gaussianPDF μ v x

full_name: ProbabilityTheory.gaussianReal_apply_eq_integral
code: lemma gaussianReal_apply_eq_integral (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :
    gaussianReal μ v s = ENNReal.ofReal (∫ x in s, gaussianPDFReal μ v x) 
goal: (ProbabilityTheory.gaussianReal μ v) s = ENNReal.ofReal (∫ (x : ℝ) in s, ProbabilityTheory.gaussianPDFReal μ v x)

full_name: ProbabilityTheory.gaussianReal_absolutelyContinuous
code: lemma gaussianReal_absolutelyContinuous (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    gaussianReal μ v ≪ volume 
goal: ProbabilityTheory.gaussianReal μ v ≪ MeasureTheory.volume

full_name: ProbabilityTheory.gaussianReal_absolutelyContinuous'
code: lemma gaussianReal_absolutelyContinuous' (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    volume ≪ gaussianReal μ v 
goal: MeasureTheory.volume ≪ ProbabilityTheory.gaussianReal μ v

full_name: ProbabilityTheory.rnDeriv_gaussianReal
code: lemma rnDeriv_gaussianReal (μ : ℝ) (v : ℝ≥0) :
    ∂(gaussianReal μ v)/∂volume =ₐₛ gaussianPDF μ v 
goal: (ProbabilityTheory.gaussianReal μ v).rnDeriv MeasureTheory.volume =ᵐ[MeasureTheory.volume]
  ProbabilityTheory.gaussianPDF μ v

full_name: MeasurableEmbedding.gaussianReal_comap_apply
code: lemma _root_.MeasurableEmbedding.gaussianReal_comap_apply (hv : v ≠ 0)
    {f : ℝ → ℝ} (hf : MeasurableEmbedding f)
    {f' : ℝ → ℝ} (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :
    (gaussianReal μ v).comap f s
      = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x)) 
goal: (MeasureTheory.Measure.comap f (ProbabilityTheory.gaussianReal μ v)) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * ProbabilityTheory.gaussianPDFReal μ v (f x))

full_name: MeasurableEquiv.gaussianReal_map_symm_apply
code: lemma _root_.MeasurableEquiv.gaussianReal_map_symm_apply (hv : v ≠ 0) (f : ℝ ≃ᵐ ℝ) {f' : ℝ → ℝ}
    (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :
    (gaussianReal μ v).map f.symm s
      = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x)) 
goal: (MeasureTheory.Measure.map (⇑f.symm) (ProbabilityTheory.gaussianReal μ v)) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * ProbabilityTheory.gaussianPDFReal μ v (f x))

full_name: ProbabilityTheory.gaussianReal_map_add_const
code: /-- The map of a Gaussian distribution by addition of a constant is a Gaussian. -/
lemma gaussianReal_map_add_const (y : ℝ) :
    (gaussianReal μ v).map (· + y) = gaussianReal (μ + y) v 
goal: MeasureTheory.Measure.map (fun x => x + y) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (μ + y) v

full_name: ProbabilityTheory.gaussianReal_map_const_add
code: /-- The map of a Gaussian distribution by addition of a constant is a Gaussian. -/
lemma gaussianReal_map_const_add (y : ℝ) :
    (gaussianReal μ v).map (y + ·) = gaussianReal (μ + y) v 
goal: MeasureTheory.Measure.map (fun x => y + x) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (μ + y) v

full_name: ProbabilityTheory.gaussianReal_map_const_mul
code: /-- The map of a Gaussian distribution by multiplication by a constant is a Gaussian. -/
lemma gaussianReal_map_const_mul (c : ℝ) :
    (gaussianReal μ v).map (c * ·) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) 
goal: MeasureTheory.Measure.map (fun x => c * x) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

full_name: ProbabilityTheory.gaussianReal_map_mul_const
code: /-- The map of a Gaussian distribution by multiplication by a constant is a Gaussian. -/
lemma gaussianReal_map_mul_const (c : ℝ) :
    (gaussianReal μ v).map (· * c) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) 
goal: MeasureTheory.Measure.map (fun x => x * c) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

full_name: ProbabilityTheory.gaussianReal_add_const
code: /-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `X + y`
has Gaussian law with mean `μ + y` and variance `v`. -/
lemma gaussianReal_add_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (y : ℝ) :
    Measure.map (fun ω ↦ X ω + y) ℙ = gaussianReal (μ + y) v 
goal: MeasureTheory.Measure.map (fun ω => X ω + y) MeasureTheory.volume = ProbabilityTheory.gaussianReal (μ + y) v

full_name: ProbabilityTheory.gaussianReal_const_add
code: /-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `y + X`
has Gaussian law with mean `μ + y` and variance `v`. -/
lemma gaussianReal_const_add {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (y : ℝ) :
    Measure.map (fun ω ↦ y + X ω) ℙ = gaussianReal (μ + y) v 
goal: MeasureTheory.Measure.map (fun ω => y + X ω) MeasureTheory.volume = ProbabilityTheory.gaussianReal (μ + y) v

full_name: ProbabilityTheory.gaussianReal_const_mul
code: /-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `c * X`
has Gaussian law with mean `c * μ` and variance `c^2 * v`. -/
lemma gaussianReal_const_mul {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :
    Measure.map (fun ω ↦ c * X ω) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) 
goal: MeasureTheory.Measure.map (fun ω => c * X ω) MeasureTheory.volume =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

full_name: ProbabilityTheory.gaussianReal_mul_const
code: /-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `X * c`
has Gaussian law with mean `c * μ` and variance `c^2 * v`. -/
lemma gaussianReal_mul_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :
    Measure.map (fun ω ↦ X ω * c) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v) 
goal: MeasureTheory.Measure.map (fun ω => X ω * c) MeasureTheory.volume =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)