Exact Lean source
PCTCountGaussian
formalization/Cloning/PCTCountGaussian.lean
Source hash: f31cc13f82c91d39989b065190246816d0ebd8f56e02d7a7fcc8d93d54a1c807
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.PCTCountMixture
2import Cloning.TensorLANEmbeddingWhiteningGaussian
3import Cloning.PCTJointGaussianConvolution
4
5/-! The count mixture has the literal covariance inflation `1+2v`, including its density constant. -/
6noncomputable section
7open scoped BigOperators Topology Classical InnerProductSpace NNReal
8open Filter MeasureTheory
9namespace Cloning.PCTCount
10open Cloning.PCT Cloning.PCTReducedGaussian Cloning.PCTPhysicalState
11open Cloning.PCTJointGaussianLaw Cloning.PCTJointGaussianWhitening
12open Cloning.YoungGeneral Cloning.YoungHyperplane Cloning.MultimodeCoherentGaussianMixture
13open Cloning.TensorLAN Cloning.PCTJointGaussianReal Cloning.GaussianAffinity
14set_option backward.isDefEq.respectTransparency false
15set_option maxHeartbeats 1400000
16variable {d s : ℕ}
17
18private theorem flat_pos (i : Fin (d+1)) : 0<flatSpectrum (d+1) i := by
19 unfold flatSpectrum
20 positivity
21
22theorem whitening_countGaussianMixture
23 (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
24 (hu : u 0=coefficientVector (schmidtCoefficients (flatSpectrum (d+1))))
25 (v : ℝ) (hv : 0<v)
26 (b : OrthonormalBasis (Fin (d+1)) ℝ (EuclideanSpace ℝ (Fin (d+1))))
27 (hb : b 0=sqrtSpectrum (flatSpectrum (d+1))) (y : Fin d → ℝ) :
28 whiteningDensity (rootWhitening (flatSpectrum (d+1)) flat_pos b hb)
29 (countGaussianMixture u hu v) y=
30 productDensity (fun _ : Fin d ↦ 1/(2*(1+2*v))) y := by
31 let p := flatSpectrum (d+1)
32 have hc : Continuous (fun h : Fin d → ℝ ↦ productDensity (fun _ : Fin d ↦ (1/2:ℝ)) (y-h)) := by
33 unfold productDensity density
34 fun_prop
35 have he : (∫ z, productDensity (fun _ : Fin d ↦ (1/2:ℝ))
36 (y-whiten p b (tangentClassical u p z)) ∂gaussianProductMeasure (fun _ : Fin s ↦ v)) =
37 ∫ h, productDensity (fun _ : Fin d ↦ (1/2:ℝ)) (y-h)
38 ∂realProductMeasure (fun _ : Fin d ↦ 1/(4*v)) := by
39 rw [← classicalTangentLaw_map_whiten u p flat_pos hu b hb hv,
40 integral_map (continuous_whiten p b).aemeasurable hc.aestronglyMeasurable]
41 unfold classicalTangentLaw
42 simpa only [Function.comp_def] using (integral_map
43 (μ := gaussianProductMeasure (fun _ : Fin s ↦ v))
44 (continuous_tangentClassical u p).aemeasurable
45 (hc.comp (continuous_whiten p b)).aestronglyMeasurable).symm
46 calc
47 _ = ∫ z, whiteningDensity (rootWhitening p flat_pos b hb)
48 (CountMultinomial.shiftedGaussian d (tangentScore u p hu z)) y
49 ∂gaussianProductMeasure (fun _ : Fin s ↦ v) := by
50 simp only [whiteningDensity, countGaussianMixture, integral_const_mul, p]
51 _ = ∫ z, productDensity (fun _ : Fin d ↦ (1/2:ℝ))
52 (y-whiten p b (tangentClassical u p z)) ∂gaussianProductMeasure (fun _ : Fin s ↦ v) := by
53 apply integral_congr_ae
54 filter_upwards [] with z
55 exact whiteningDensity_translated_covarianceGaussian p flat_pos (flatSpectrum_sum _ (by omega))
56 b hb (tangentScore u p hu z) y
57 _ = _ := by
58 rw [he, PCTJointGaussianConvolution.integral_realProductMeasure_productDensity
59 (fun _ : Fin d ↦ (1/2:ℝ)) (fun _ ↦ 1/(4*v)) (fun _ ↦ by norm_num) (fun _ ↦ by positivity)]
60 congr 1
61 funext i
62 field_simp
63 ring
64
65theorem whitening_countMixtureDensity_l1_tendsto
66 (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1) × Fin (d+1))))
67 (hu : u 0=coefficientVector (schmidtCoefficients (flatSpectrum (d+1))))
68 (v : ℝ) (hv : 0<v)
69 (b : OrthonormalBasis (Fin (d+1)) ℝ (EuclideanSpace ℝ (Fin (d+1))))
70 (hb : b 0=sqrtSpectrum (flatSpectrum (d+1)))
71 (n : ℕ → ℕ) (hn : Tendsto n atTop atTop) :
72 Tendsto (fun k ↦ ∫ y, |whiteningDensity (rootWhitening (flatSpectrum (d+1)) flat_pos b hb)
73 (countMixtureDensity u v (n k)) y-productDensity (fun _ : Fin d ↦ 1/(2*(1+2*v))) y|)
74 atTop (𝓝 0) := by
75 have hh := countMixtureDensity_l1_tendsto u hu v hv n hn
76 convert hh using 1
77 funext k
78 rw [← whiteningDensity_l1 (rootWhitening (flatSpectrum (d+1)) flat_pos b hb)]
79 simp_rw [whitening_countGaussianMixture u hu v hv b hb]
80
81end Cloning.PCTCount