Exact Lean source
PCTProjectorPurityGaussianSingle
formalization/Cloning/PCTProjectorPurityGaussianSingle.lean
Source hash: cfcbdf9901f6530f27a04bc37f6b500d1518e0020391e49a0eae19ef1721dbf3
Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.
The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.
Declarations in this module
1import Cloning.PCTProjectorPurityGaussianEnergy
2import Cloning.WeylGaussianThermal
3
4/-! Exact real-linear and real-quadratic exponential moments of one actual
5circular complex Gaussian coordinate. -/
6noncomputable section
7open scoped Topology BigOperators
8open MeasureTheory
9namespace Cloning.PCTProjectorPurity
10open Cloning.CoherentGaussianMixture
11set_option backward.isDefEq.respectTransparency true
12set_option maxHeartbeats 120000
13
14lemma integral_complex_real_linear {q : ℝ} (hq : 0<q) (t : ℝ) :
15 (∫z : ℂ,Real.exp (-q*‖z‖^2+t*z.re))=
16 (Real.pi/q)*Real.exp (t^2/(4*q)) := by
17 have hh := Cloning.ComplexCoherent.integral_complex_gaussian_linear_scaled hq
18 ((t/2 : ℝ) : ℂ) ((t/2 : ℝ) : ℂ)
19 have he (z : ℂ) :
20 -(q : ℂ)*((‖z‖^2 : ℝ) : ℂ)+((t/2 : ℝ) : ℂ)*z+
21 ((t/2 : ℝ) : ℂ)*(starRingEnd ℂ) z=((-q*‖z‖^2+t*z.re : ℝ) : ℂ) := by
22 apply Complex.ext <;> simp <;> ring
23 simp_rw [he,←Complex.ofReal_exp,integral_complex_ofReal] at hh
24 have ht : ((t/2 : ℝ) : ℂ)*((t/2 : ℝ) : ℂ)/(q : ℂ)=((t^2/(4*q) : ℝ) : ℂ) := by
25 push_cast
26 ring
27 rw [ht,←Complex.ofReal_exp,←Complex.ofReal_mul] at hh
28 exact Complex.ofReal_injective hh
29
30theorem integral_exp_re {δ : ℝ} (hδ : 0<δ) (t : ℝ) :
31 (∫z : ℂ,Real.exp (t*z.re) ∂gaussianMeasure δ)=Real.exp (δ*t^2/4) := by
32 rw [integral_gaussianMeasure_real δ hδ]
33 have he (z : ℂ) : gaussianDensity δ z*Real.exp (t*z.re)=
34 (Real.pi*δ)⁻¹*Real.exp (-δ⁻¹*‖z‖^2+t*z.re) := by
35 unfold gaussianDensity
36 rw [div_eq_mul_inv,mul_right_comm,←Real.exp_add,mul_comm]
37 congr 1
38 congr 1
39 ring
40 simp_rw [he]
41 rw [integral_const_mul,integral_complex_real_linear (inv_pos.mpr hδ)]
42 have hc : (Real.pi*δ)⁻¹*(Real.pi/δ⁻¹)=1 := by
43 rw [div_inv_eq_mul,inv_mul_cancel₀ (mul_ne_zero Real.pi_ne_zero hδ.ne')]
44 have ht : t^2/(4*δ⁻¹)=δ*t^2/4 := by field_simp <;> ring
45 rw [←mul_assoc,hc,one_mul,ht]
46
47lemma integral_complex_anisotropic (a b : ℝ) :
48 (∫z : ℂ,Real.exp (-a*z.re^2-b*z.im^2))=
49 Real.sqrt (Real.pi/a)*Real.sqrt (Real.pi/b) := by
50 rw [←Complex.volume_preserving_equiv_pi.symm.integral_comp
51 Complex.measurableEquivPi.symm.measurableEmbedding]
52 have he (x : Fin 2 → ℝ) :
53 Real.exp (-a*(Complex.measurableEquivPi.symm x).re^2-
54 b*(Complex.measurableEquivPi.symm x).im^2)=
55 ∏i : Fin 2,Real.exp (-(![a,b] i)*x i^2) := by
56 simp only [Complex.measurableEquivPi_symm_apply,Complex.add_re,Complex.ofReal_re,
57 Complex.mul_re,Complex.I_re,Complex.ofReal_im,Complex.I_im,zero_mul,mul_zero,
58 sub_zero,add_zero,Complex.add_im,Complex.mul_im,one_mul,zero_add,
59 Fin.prod_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one,←Real.exp_add]
60 congr 1
61 ring
62 simp_rw [he]
63 rw [integral_fintype_prod_volume_eq_prod (fun i : Fin 2 => fun x : ℝ => Real.exp (-(![a,b] i)*x^2))]
64 simp only [integral_gaussian,Fin.prod_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one]
65
66theorem integral_exp_re_sq {δ : ℝ} (hδ : 0<δ) (t : ℝ) (ht : t*δ<1) :
67 (∫z : ℂ,Real.exp (t*z.re^2) ∂gaussianMeasure δ)=(Real.sqrt (1-t*δ))⁻¹ := by
68 have hq : 0<δ⁻¹-t := by
69 have := (lt_div_iff₀ hδ).2 ht
70 simpa only [one_div] using sub_pos.mpr this
71 rw [integral_gaussianMeasure_real δ hδ]
72 have he (z : ℂ) : gaussianDensity δ z*Real.exp (t*z.re^2)=
73 (Real.pi*δ)⁻¹*Real.exp (-(δ⁻¹-t)*z.re^2-δ⁻¹*z.im^2) := by
74 unfold gaussianDensity
75 rw [div_eq_mul_inv,mul_right_comm,←Real.exp_add,mul_comm]
76 congr 1
77 congr 1
78 rw [←Complex.normSq_eq_norm_sq,Complex.normSq_apply]
79 ring
80 simp_rw [he]
81 rw [integral_const_mul,integral_complex_anisotropic,
82 ←Real.sqrt_mul (div_nonneg Real.pi_pos.le hq.le)]
83 have hrad : (Real.pi/(δ⁻¹-t))*(Real.pi/δ⁻¹)=
84 (Real.pi*δ)^2*(1-t*δ)⁻¹ := by
85 field_simp
86 <;> ring
87 rw [hrad,Real.sqrt_mul (sq_nonneg _),Real.sqrt_sq (mul_nonneg Real.pi_pos.le hδ.le),
88 Real.sqrt_inv,←mul_assoc,inv_mul_cancel₀ (mul_ne_zero Real.pi_ne_zero hδ.ne'),one_mul]
89
90end Cloning.PCTProjectorPurity