The standard bivariate normal CDF `N₂(a, b; r)`
For independent standard normals Z₁, Z₂ (the coordinates of N(0,1) ⊗ N(0,1)) and r ∈ [-1, 1], the Cholesky construction
X = r Z₂ + √(1 − r²) Z₁, Y = Z₂
gives a standard bivariate normal pair with correlation r, and N₂(a, b; r) = P(X ≤ a, Y ≤ b).
The Cholesky map is a continuous linear map, so bivariateNormalLaw r is Gaussian in Mathlib's sense (IsGaussian, via isGaussian_map and Mathlib's instance for products of Gaussian measures). A Gaussian measure is determined by its mean and covariance (Mathlib's characteristic-function Measure.ext_of_charFunDual with IsGaussian.charFunDual_eq'); on ℝ² this says that a centred Gaussian law with unit variances and covariance r is bivariateNormalLaw r (eq_bivariateNormalLaw). The swap symmetry is derived from it.
Main definitions
stdNormalPair: the law N(0,1) ⊗ N(0,1) of two independent standard normals on ℝ × ℝ.stdNormalVec: the law of a vector of independent standard normals indexed by a finite type.choleskyPair: the continuous linear map (z₁, z₂) ↦ (r z₂ + √(1 − r²) z₁, z₂).bivariateNormalLaw: the law of the Cholesky pair; for r² ≤ 1 the standard bivariate normal law with correlation r.bivariateNormalCDF: N₂(a, b; r) = P(X ≤ a, Y ≤ b) for the Cholesky pair (X, Y).gaussianPair: the Cholesky pair shifted and scaled, coordinate i being μᵢ + σᵢ Zᵢ.
Main results
stdNormalPair, map_linear_stdNormalPair: c Z₁ + d Z₂ ∼ N(0, c² + d²).stdNormalVec ι: the law N(0, 1)^ι of a vector of independent standard normals, and its IsGaussian instance (Mathlib's iIndepFun.hasGaussianLaw). Pushed to EuclideanSpace ℝ ι it is Mathlib's stdGaussian (map_pi_eq_stdGaussian).isGaussian_bivariateNormalLaw: the law of the Cholesky pair is Gaussian, for every r.covariance_fst_snd_bivariateNormalLaw, variance_snd_bivariateNormalLaw: Cov(X, Y) = r and Var Y = 1 for every r; variance_fst_bivariateNormalLaw: Var X = 1 for r² ≤ 1.map_fst_bivariateNormalLaw, map_snd_bivariateNormalLaw: both margins are N(0, 1), read off Mathlib's IsGaussian.map_eq_gaussianReal.eq_bivariateNormalLaw: a Gaussian law on ℝ² with centred coordinates, unit variances and covariance r (r² ≤ 1) is bivariateNormalLaw r.gaussianPair, hasGaussianLaw_gaussianPair, integral_gaussianPair, variance_gaussianPair, covariance_gaussianPair: (μ₀ + σ₀ X, μ₁ + σ₁ Y) is a Gaussian pair with means μ, variances σ² and covariance r σ₀ σ₁ (r² ≤ 1 for the variances), so every two-asset Gaussian model has a realization.bivariateGaussianHyp_bivariateNormalLaw, condExp_fst_bivariateNormalLaw: the pair satisfies the hypotheses BivariateGaussianHyp of Probability/Gaussian/BivariateGaussian.lean, so E[X | Y] = r Y almost surely.bivariateNormalLaw_map_swap, bivariateNormalCDF_comm: (Y, X) has the same law as (X, Y), so N₂(a, b; r) = N₂(b, a; r).bivariateNormalCDF_zero, bivariateNormalCDF_one, bivariateNormalCDF_neg_one: the independent, comonotone and countermonotone cases; posPart_Phi_sub_Phi: (Φ(t) − Φ(k))⁺ is the standard normal probability of (k, t].bivariateNormalCDF_flip_snd: N₂(a, b; r) + N₂(a, -b; -r) = Φ(a), the two-asset analogue of Phi_add_Phi_neg — the key algebraic ingredient behind exact two-asset closed forms (Stulz 1982, Heynen & Kat 1994/96) that package N₂(·,·;ρ) / N₂(·,·;-ρ) pairs.bivariateNormalCDF_neg_neg: N₂(-a, -b; r) = 1 - Φ(a) - Φ(b) + N₂(a, b; r), the joint survival identity, derived purely algebraically from bivariateNormalCDF_flip_snd, bivariateNormalCDF_comm and Phi_neg (no new measure-theoretic argument). Reading either side as the joint survival P(X > a, Y > b) is not stated here.
Outside r ∈ [-1, 1] the square root truncates to 0 and the construction is no longer the standard bivariate normal with correlation r (it degenerates to the law of (rY, Y), still with Cov(X, Y) = r but Var X = r²); every result that needs unit variances carries the hypothesis r ^ 2 ≤ 1.
Mathlib's ProbabilityTheory.multivariateGaussian lives on EuclideanSpace ℝ (Fin 2) rather than ℝ × ℝ; the identification of bivariateNormalLaw r with it is not stated here.
References
Tags
bivariate normal distribution, Cholesky construction, correlation, Gaussian vector, two-asset option, joint distribution function, MSC 60E05, MSC 60G15, JEL C02
Import neighbourhood
Above: what it imports. Below: what imports it.
Corpus entries
mf-bivariate-normal-gaussian-characterization · stochastic_foundations.json · full statement
A Standardized Gaussian Law on ℝ² Is the Bivariate Normal
If a Gaussian measure on ℝ² (Mathlib's IsGaussian) has centred coordinates with unit variances and covariance r, with r² ≤ 1, then it is the standard bivariate normal law with correlation r (the library's Cholesky construction bivariateNormalLaw r).
mf-gaussian-pair-any-moments · stochastic_foundations.json · full statement
A Gaussian Pair With Any Means, Volatilities and Correlation
For any means mu, scales sigma and correlation r with r^2 <= 1, the pair (mu_0 + sigma_0 X, mu_1 + sigma_1 Y), with (X, Y) the library's Cholesky pair bivariateNormalLaw r, is jointly Gaussian with means mu, variances sigma_i^2 and covariance r sigma_0 sigma_1. So every two-asset Gaussian model with these parameters has a realization.
Declarations 52
defMathFin.stdNormalPairsource Measure (ℝ × ℝ)
The law of two independent standard normals, N(0,1) ⊗ N(0,1). It is Gaussian by Mathlib's instance for products of Gaussian measures.
(ι : Type u_1) → [Fintype ι] → Measure (ι → ℝ)
The law of a vector of independent standard normals indexed by ι: Mathlib's product measure Measure.pi of N(0, 1). Its image under WithLp.toLp 2 is Mathlib's stdGaussian (EuclideanSpace ℝ ι) (map_pi_eq_stdGaussian).
theoremMathFin.isGaussian_stdNormalVec @[instance]source ∀ (ι : Type u_1) [Fintype ι], IsGaussian (stdNormalVec ι)
A vector of independent standard normals is Gaussian: Mathlib's iIndepFun.hasGaussianLaw applied to the coordinates of Measure.pi.
theoremMathFin.memLp_eval_stdNormalVecsource ∀ {ι : Type u_1} [Fintype ι] (i : ι), MemLp (fun w => w i) 2 (stdNormalVec ι)A coordinate of a vector of independent standard normals is square integrable.
ℝ → ℝ × ℝ →L[ℝ] ℝ × ℝ
The Cholesky map (z₁, z₂) ↦ (r z₂ + √(1 − r²) z₁, z₂), as a continuous linear map.
theoremMathFin.choleskyPair_apply @[simp]source ∀ (r : ℝ) (p : ℝ × ℝ), (choleskyPair r) p = (r * p.2 + √(1 - r ^ 2) * p.1, p.2)
theoremMathFin.measurable_choleskyPairsource ∀ (r : ℝ), Measurable ⇑(choleskyPair r)
defMathFin.bivariateNormalLawsource ℝ → Measure (ℝ × ℝ)
The law of the Cholesky pair. For r ^ 2 ≤ 1 it is the standard bivariate normal law with correlation r (eq_bivariateNormalLaw, map_fst_bivariateNormalLaw, covariance_fst_snd_bivariateNormalLaw); for r ^ 2 > 1 it is the law of (rY, Y).
theoremMathFin.instIsProbabilityMeasureProdRealBivariateNormalLaw @[instance]source ∀ (r : ℝ), IsProbabilityMeasure (bivariateNormalLaw r)
theoremMathFin.isGaussian_bivariateNormalLaw @[instance]source ∀ (r : ℝ), IsGaussian (bivariateNormalLaw r)
The Cholesky pair is Gaussian, for every r: the image of the Gaussian measure N(0,1) ⊗ N(0,1) under a continuous linear map (Mathlib's isGaussian_map).
defMathFin.bivariateNormalCDFsource ℝ → ℝ → ℝ → ℝ
The standard bivariate normal CDF N₂(a, b; r) = P(X ≤ a, Y ≤ b) for the Cholesky pair X = r Z₂ + √(1 − r²) Z₁, Y = Z₂.
theoremMathFin.bivariateNormalCDF_eq_lawsource ∀ (a b r : ℝ), bivariateNormalCDF a b r = (bivariateNormalLaw r).real (Set.Iic a ×ˢ Set.Iic b)
N₂(a, b; r) is the bivariateNormalLaw r-measure of the quadrant (-∞, a] × (-∞, b].
theoremMathFin.map_linear_stdNormalPairsource ∀ (c d : ℝ), Measure.map (fun p => c * p.1 + d * p.2) stdNormalPair = gaussianReal 0 (c ^ 2 + d ^ 2).toNNReal
A linear combination of independent standard normals: c Z₁ + d Z₂ ∼ N(0, c² + d²).
theoremMathFin.map_linear_bivariateNormalLaw'source ∀ (r c d : ℝ), Measure.map (fun q => c * q.1 + d * q.2) (bivariateNormalLaw r) = gaussianReal 0 ((c * √(1 - r ^ 2)) ^ 2 + (c * r + d) ^ 2).toNNReal
A linear functional of the Cholesky pair, for every r: c X + d Y ∼ N(0, (c √(1 − r²))² + (c r + d)²).
theoremMathFin.map_linear_bivariateNormalLawsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → ∀ (c d : ℝ), Measure.map (fun q => c * q.1 + d * q.2) (bivariateNormalLaw r) = gaussianReal 0 (c ^ 2 + 2 * c * d * r + d ^ 2).toNNRealA linear functional of the bivariate normal pair: c X + d Y ∼ N(0, c² + 2cdr + d²).
theoremMathFin.memLp_linear_bivariateNormalLawsource ∀ (r c d : ℝ), MemLp (fun q => c * q.1 + d * q.2) 2 (bivariateNormalLaw r)
c X + d Y ∈ L²(bivariateNormalLaw r), for every r.
theoremMathFin.memLp_fst_bivariateNormalLawsource ∀ (r : ℝ), MemLp Prod.fst 2 (bivariateNormalLaw r)
theoremMathFin.memLp_snd_bivariateNormalLawsource ∀ (r : ℝ), MemLp Prod.snd 2 (bivariateNormalLaw r)
theoremMathFin.integral_linear_bivariateNormalLawsource ∀ (r c d : ℝ), ∫ (q : ℝ × ℝ), c * q.1 + d * q.2 ∂bivariateNormalLaw r = 0
E[c X + d Y] = 0, for every r.
theoremMathFin.integral_fst_bivariateNormalLawsource ∀ (r : ℝ), ∫ (q : ℝ × ℝ), q.1 ∂bivariateNormalLaw r = 0
theoremMathFin.integral_snd_bivariateNormalLawsource ∀ (r : ℝ), ∫ (q : ℝ × ℝ), q.2 ∂bivariateNormalLaw r = 0
theoremMathFin.variance_linear_bivariateNormalLawsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → ∀ (c d : ℝ), variance (fun q => c * q.1 + d * q.2) (bivariateNormalLaw r) = c ^ 2 + 2 * c * d * r + d ^ 2Var[c X + d Y] = c ^ 2 + 2 c d r + d ^ 2 for r² ≤ 1.
theoremMathFin.variance_snd_bivariateNormalLawsource ∀ (r : ℝ), variance Prod.snd (bivariateNormalLaw r) = 1
Var Y = 1, for every r (Y = Z₂ never involves the root).
theoremMathFin.variance_fst_bivariateNormalLawsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → variance Prod.fst (bivariateNormalLaw r) = 1Var X = 1 for r² ≤ 1 (for r² > 1, X = rY and Var X = r²).
theoremMathFin.covariance_fst_snd_bivariateNormalLawsource ∀ (r : ℝ), covariance Prod.fst Prod.snd (bivariateNormalLaw r) = r
The parameter is the covariance: Cov(X, Y) = r, for every r (for r² > 1 the pair is (rY, Y), whose covariance is still r). With variance_fst_bivariateNormalLaw and variance_snd_bivariateNormalLaw, r is the correlation when r² ≤ 1.
theoremMathFin.map_fst_bivariateNormalLawsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → Measure.map Prod.fst (bivariateNormalLaw r) = gaussianReal 0 1The first margin X ∼ N(0, 1), read off Mathlib's IsGaussian.map_eq_gaussianReal (needs r ^ 2 ≤ 1: for |r| > 1 the junk-valued root makes X = r Y, which is not N(0, 1)).
theoremMathFin.map_snd_bivariateNormalLawsource ∀ (r : ℝ), Measure.map Prod.snd (bivariateNormalLaw r) = gaussianReal 0 1
The second margin Y = Z₂ ∼ N(0, 1), for every r, read off Mathlib's IsGaussian.map_eq_gaussianReal.
theoremMathFin.strongDual_prod_applysource ∀ (L : StrongDual ℝ (ℝ × ℝ)) (q : ℝ × ℝ), L q = L (1, 0) * q.1 + L (0, 1) * q.2
L q = L(1, 0) q₁ + L(0, 1) q₂ for a continuous linear functional on ℝ².
theoremMathFin.integral_id_prod_eqsource ∀ {μ : Measure (ℝ × ℝ)}, Integrable Prod.fst μ → Integrable Prod.snd μ → ∫ (x : ℝ × ℝ), id x ∂μ = (∫ (q : ℝ × ℝ), q.1 ∂μ, ∫ (q : ℝ × ℝ), q.2 ∂μ)The mean of a law on ℝ² with integrable coordinates is the pair of coordinate means.
theoremMathFin.variance_linear_of_memLpsource ∀ {μ : Measure (ℝ × ℝ)} [IsFiniteMeasure μ], MemLp Prod.fst 2 μ → MemLp Prod.snd 2 μ → ∀ (a b : ℝ), variance (fun q => a * q.1 + b * q.2) μ = a ^ 2 * variance Prod.fst μ + 2 * a * b * covariance Prod.fst Prod.snd μ + b ^ 2 * variance Prod.snd μThe variance of a X + b Y from the second moments of the coordinates.
theoremMathFin.variance_strongDualsource ∀ {μ : Measure (ℝ × ℝ)} [IsFiniteMeasure μ], MemLp Prod.fst 2 μ → MemLp Prod.snd 2 μ → ∀ (L : StrongDual ℝ (ℝ × ℝ)), variance (⇑L) μ = L (1, 0) ^ 2 * variance Prod.fst μ + 2 * L (1, 0) * L (0, 1) * covariance Prod.fst Prod.snd μ + L (0, 1) ^ 2 * variance Prod.snd μThe variance of a continuous linear functional on ℝ² from the second moments of the coordinates.
theoremMathFin.eq_bivariateNormalLawsource ∀ {μ : Measure (ℝ × ℝ)} [IsGaussian μ] {r : ℝ}, r ^ 2 ≤ 1 → ∫ (q : ℝ × ℝ), q.1 ∂μ = 0 → ∫ (q : ℝ × ℝ), q.2 ∂μ = 0 → variance Prod.fst μ = 1 → variance Prod.snd μ = 1 → covariance Prod.fst Prod.snd μ = r → μ = bivariateNormalLaw rA Gaussian law on ℝ² with standardized coordinates is the Cholesky law. If μ is Gaussian, its coordinates are centred with unit variances, and their covariance is r with r² ≤ 1, then μ = bivariateNormalLaw r. Both laws are Gaussian with the same mean and the same variance on every linear functional, so their characteristic functions agree (Mathlib's IsGaussian.charFunDual_eq' and Measure.ext_of_charFunDual).
theoremMathFin.bivariateNormalLaw_map_swapsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → Measure.map Prod.swap (bivariateNormalLaw r) = bivariateNormalLaw rExchangeability: for r ∈ [-1, 1], (Y, X) has the same law as (X, Y). The swapped law is Gaussian (the swap is a continuous linear equivalence) with the same moments, so eq_bivariateNormalLaw applies.
theoremMathFin.bivariateGaussianHyp_bivariateNormalLawsource ∀ (r : ℝ), BivariateGaussianHyp (bivariateNormalLaw r) Prod.fst Prod.snd 0 0 1 1 r
The Cholesky pair satisfies BivariateGaussianHyp (Probability/Gaussian/BivariateGaussian.lean) with means 0, σ_X = σ_Y = 1 and ρ = r, for every r. The structure does not constrain Var X; for r² > 1 the pair is (rY, Y) with Var X = r², and the hypotheses still hold.
theoremMathFin.condExp_fst_bivariateNormalLawsource ∀ (r : ℝ), (bivariateNormalLaw r)[Prod.fst | MeasurableSpace.comap Prod.snd inferInstance] =ᵐ[bivariateNormalLaw r] fun p => r * p.2
Regression of X on Y: for the Cholesky pair, E[X | Y] = r Y almost surely, for every r. The bivariate Gaussian conditional-expectation formula (BivariateGaussianHyp.conditional_expectation_formula) at bivariateGaussianHyp_bivariateNormalLaw.
theoremMathFin.bivariateNormalCDF_commsource ∀ (a b : ℝ) {r : ℝ}, r ^ 2 ≤ 1 → bivariateNormalCDF a b r = bivariateNormalCDF b a rSymmetry: N₂(a, b; r) = N₂(b, a; r) for r ∈ [-1, 1].
theoremMathFin.bivariateNormalCDF_zerosource ∀ (a b : ℝ), bivariateNormalCDF a b 0 = Phi a * Phi b
Independence (r = 0): N₂(a, b; 0) = Φ(a) Φ(b).
theoremMathFin.bivariateNormalCDF_onesource ∀ (a b : ℝ), bivariateNormalCDF a b 1 = Phi (min a b)
Comonotone (r = 1): N₂(a, b; 1) = Φ(min a b).
theoremMathFin.posPart_Phi_sub_Phisource ∀ (k t : ℝ), (Phi t - Phi k)⁺ = (gaussianReal 0 1).real (Set.Ioc k t)
(Φ(t) − Φ(k))⁺ is the standard normal probability of (k, t].
theoremMathFin.bivariateNormalCDF_neg_onesource ∀ (a b : ℝ), bivariateNormalCDF a b (-1) = (Phi b - Phi (-a))⁺
Countermonotone (r = -1): N₂(a, b; -1) = (Φ(b) − Φ(−a))⁺.
theoremMathFin.bivariateNormalLaw_map_negSndsource ∀ (r : ℝ), Measure.map (fun p => (p.1, -p.2)) (bivariateNormalLaw r) = bivariateNormalLaw (-r)
The sign-flip map (x, y) ↦ (x, -y) sends bivariateNormalLaw r to bivariateNormalLaw (-r): negating Y negates the correlation, unconditionally in r.
theoremMathFin.bivariateNormalCDF_flip_sndsource ∀ (a b : ℝ) {r : ℝ}, r ^ 2 ≤ 1 → bivariateNormalCDF a b r + bivariateNormalCDF a (-b) (-r) = Phi aThe sign-flip identity: N₂(a, b; r) + N₂(a, -b; -r) = Φ(a). Splits (bivariateNormalLaw r).real (Iic a ×ˢ ·) across the closed-ray cover Iic b ∪ Ici b = univ (meeting at the null set {b}, since the Y-margin map_snd_bivariateNormalLaw is atom-free), then reads off the X-margin via map_fst_bivariateNormalLaw.
theoremMathFin.bivariateNormalCDF_neg_negsource ∀ (a b : ℝ) {r : ℝ}, r ^ 2 ≤ 1 → bivariateNormalCDF (-a) (-b) r = 1 - Phi a - Phi b + bivariateNormalCDF a b rJoint survival identity: N₂(-a, -b; r) = 1 - Φ(a) - Φ(b) + N₂(a, b; r), derived purely algebraically from the sign-flip identity bivariateNormalCDF_flip_snd, the symmetry bivariateNormalCDF_comm and Phi_neg — no new measure-theoretic content. (Reading either side as P(X > a, Y > b) is not stated here.) This is the identity that collapses the strike-side terms of Stulz-style two-asset closed forms.
theoremMathFin.tendsto_bivariateNormalCDF_atTop_fstsource ∀ (b r : ℝ), Filter.Tendsto (fun a => bivariateNormalCDF a b r) Filter.atTop (nhds (Phi b))
Sending the first threshold to +∞ recovers the second margin: N₂(a, b; r) → Φ(b) as a → ∞, for every r. The quadrants (-∞, a] × (-∞, b] increase to ℝ × (-∞, b] (continuity of measure from below, tendsto_measure_iUnion_atTop), whose bivariateNormalLaw r-measure is Φ(b) by the second margin map_snd_bivariateNormalLaw, which needs no condition on r.
(Fin 2 → ℝ) → (Fin 2 → ℝ) → Fin 2 → ℝ × ℝ → ℝ
The Cholesky pair shifted and scaled: coordinate i is μᵢ + σᵢ Zᵢ, where (Z₀, Z₁) is the pair of coordinates of ℝ × ℝ. Under bivariateNormalLaw r with r² ≤ 1 it is a Gaussian pair with means μ, volatilities |σ| and covariance r σ₀ σ₁, so a two-asset model with any such parameters has a realization.
theoremMathFin.gaussianPair_zerosource ∀ (μ σ : Fin 2 → ℝ), gaussianPair μ σ 0 = fun q => μ 0 + σ 0 * q.1
theoremMathFin.gaussianPair_onesource ∀ (μ σ : Fin 2 → ℝ), gaussianPair μ σ 1 = fun q => μ 1 + σ 1 * q.2
theoremMathFin.hasGaussianLaw_gaussianPairsource ∀ (r : ℝ) (μ σ : Fin 2 → ℝ), HasGaussianLaw (fun q i => gaussianPair μ σ i q) (bivariateNormalLaw r)
The pair is jointly Gaussian, for every r: it is a translate of a continuous linear image of the Gaussian measure bivariateNormalLaw r.
theoremMathFin.memLp_gaussianPairsource ∀ (r : ℝ) (μ σ : Fin 2 → ℝ) (i : Fin 2), MemLp (gaussianPair μ σ i) 2 (bivariateNormalLaw r)
theoremMathFin.integral_gaussianPairsource ∀ (r : ℝ) (μ σ : Fin 2 → ℝ) (i : Fin 2), ∫ (q : ℝ × ℝ), gaussianPair μ σ i q ∂bivariateNormalLaw r = μ i
theoremMathFin.variance_gaussianPairsource ∀ {r : ℝ}, r ^ 2 ≤ 1 → ∀ (μ σ : Fin 2 → ℝ) (i : Fin 2), variance (gaussianPair μ σ i) (bivariateNormalLaw r) = σ i ^ 2theoremMathFin.covariance_gaussianPairsource ∀ (r : ℝ) (μ σ : Fin 2 → ℝ), covariance (gaussianPair μ σ 0) (gaussianPair μ σ 1) (bivariateNormalLaw r) = r * σ 0 * σ 1
The parameter r is the correlation of the pair: Cov = r σ₀ σ₁, for every r.