Exact Lean source
PCTGaussianCovarianceJoint
formalization/Cloning/PCTGaussianCovarianceJoint.lean
Source hash: f062e364f3d1ee54296a40a43e1be4ec06a3ac7f131f593eb221a7467c6acbab
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
definition
Cloning.PCTGaussianCovariance.OrbitalPairtheorem Cloning.PCTGaussianCovariance.orbitalTest_pairwisetheorem Cloning.PCTGaussianCovariance.classicalTest_orthogonal_orbitalTesttheorem Cloning.PCTGaussianCovariance.norm_sum_sq_of_pairwisedefinition Cloning.PCTGaussianCovariance.jointTesttheorem Cloning.PCTGaussianCovariance.jointTest_phasetheorem Cloning.PCTGaussianCovariance.jointTest_norm_sqtheorem Cloning.PCTGaussianCovariance.jointTest_reference_sqtheorem Cloning.PCTGaussianCovariance.jointCoordinate_characteristic1import Cloning.PCTGaussianCovarianceOrbital
2
3/-! The joint characteristic of classical and orbital tangent coordinates.
4Every independence factor is obtained from the actual purification frame
5Gaussian integral and disjoint computational matrix entries. -/
6noncomputable section
7open MeasureTheory
8open scoped ComplexOrder InnerProductSpace Topology BigOperators
9namespace Cloning.PCTGaussianCovariance
10open Cloning.PCT Cloning.PCTReducedGaussian Cloning.MultimodeCoherentGaussianMixture
11set_option backward.isDefEq.respectTransparency false
12set_option maxHeartbeats 1200000
13variable {A : Type*} [Fintype A] [LinearOrder A] {s : ℕ}
14
15abbrev OrbitalPair (A : Type*) [LT A] := {ij : A × A // ij.1 < ij.2}
16
17lemma orbitalTest_pairwise (p : A → ℝ) (i j : OrbitalPair A) (hij : i ≠ j) (ξ η : ℂ) :
18 ⟪orbitalTest p i.1.1 i.1.2 ξ, orbitalTest p j.1.1 j.1.2 η⟫_ℂ = 0 := by
19 have h00 : (i.1.1, i.1.2) ≠ (j.1.1, j.1.2) := by
20 intro h
21 exact hij (Subtype.ext h)
22 have h01 : (i.1.1, i.1.2) ≠ (j.1.2, j.1.1) := by
23 intro h
24 obtain ⟨h1,h2⟩ := Prod.mk.inj h
25 exact (lt_asymm i.2 (by simpa only [h1,h2] using j.2))
26 have h10 : (i.1.2, i.1.1) ≠ (j.1.1, j.1.2) := by
27 intro h
28 apply h01
29 exact Prod.ext (congrArg Prod.snd h) (congrArg Prod.fst h)
30 have h11 : (i.1.2, i.1.1) ≠ (j.1.2, j.1.1) := by
31 intro h
32 apply h00
33 exact Prod.ext (congrArg Prod.snd h) (congrArg Prod.fst h)
34 simp only [orbitalTest, inner_add_left, inner_add_right, inner_smul_left, inner_smul_right,
35 (registerBasis (A × A)).orthonormal.inner_eq_zero h00,
36 (registerBasis (A × A)).orthonormal.inner_eq_zero h01,
37 (registerBasis (A × A)).orthonormal.inner_eq_zero h10,
38 (registerBasis (A × A)).orthonormal.inner_eq_zero h11, mul_zero, add_zero]
39
40lemma classicalTest_orthogonal_orbitalTest (p t : A → ℝ) (i j : A) (hij : i ≠ j) (ξ : ℂ) :
41 ⟪coefficientVector (classicalTest p t), orbitalTest p i j ξ⟫_ℂ = 0 := by
42 have hi (a b : A) (hab : a ≠ b) :
43 ⟪coefficientVector (classicalTest p t), lp.single 2 (a,b) 1⟫_ℂ = 0 := by
44 rw [← inner_conj_symm]
45 simp [register_inner_single, coefficientVector_apply, classicalTest, hab]
46 simp only [orbitalTest, inner_add_right, inner_smul_right, registerBasis_apply,
47 hi i j hij, hi j i hij.symm, mul_zero, add_zero]
48
49lemma norm_sum_sq_of_pairwise {K : Type*} [Fintype K] [DecidableEq K]
50 (f : K → Register (A × A)) (h : Pairwise (fun i j => ⟪f i, f j⟫_ℂ = 0)) :
51 ‖∑ i, f i‖ ^ 2 = ∑ i, ‖f i‖ ^ 2 := by
52 have he : ⟪∑ i, f i, ∑ i, f i⟫_ℂ = ∑ i, ⟪f i, f i⟫_ℂ := by
53 simp only [sum_inner, inner_sum]
54 apply Finset.sum_congr rfl
55 intro i _
56 apply Finset.sum_eq_single i
57 · intro j _ hji
58 exact h hji
59 · simp
60 simpa [inner_self_eq_norm_sq_to_K, ← Complex.ofReal_pow, ← Complex.ofReal_sum]
61 using congrArg Complex.re he
62
63/-- Test vector for all classical and orbital variables together. -/
64def jointTest (p t : A → ℝ) (ξ : OrbitalPair A → ℂ) : Register (A × A) :=
65 coefficientVector (classicalTest p t) +
66 ∑ ij, orbitalTest p ij.1.1 ij.1.2 (ξ ij)
67
68lemma jointTest_phase (p t : A → ℝ) (ξ : OrbitalPair A → ℂ) (Z : Matrix A A ℂ) :
69 ⟪jointTest p t ξ, coefficientVector Z⟫_ℂ -
70 ⟪coefficientVector Z, jointTest p t ξ⟫_ℂ =
71 Complex.I * ((∑ a, t a * classicalCoordinate p Z a : ℝ) : ℂ) +
72 ∑ ij, (ξ ij * star (orbitalCoordinate p Z ij.1.1 ij.1.2) -
73 star (ξ ij) * orbitalCoordinate p Z ij.1.1 ij.1.2) := by
74 simp only [jointTest, inner_add_left, inner_add_right, sum_inner, inner_sum]
75 rw [show (⟪coefficientVector (classicalTest p t), coefficientVector Z⟫_ℂ +
76 ∑ ij : OrbitalPair A, ⟪orbitalTest p ij.1.1 ij.1.2 (ξ ij), coefficientVector Z⟫_ℂ) -
77 (⟪coefficientVector Z, coefficientVector (classicalTest p t)⟫_ℂ +
78 ∑ ij : OrbitalPair A, ⟪coefficientVector Z, orbitalTest p ij.1.1 ij.1.2 (ξ ij)⟫_ℂ) =
79 (⟪coefficientVector (classicalTest p t), coefficientVector Z⟫_ℂ -
80 ⟪coefficientVector Z, coefficientVector (classicalTest p t)⟫_ℂ) +
81 ∑ ij : OrbitalPair A, (⟪orbitalTest p ij.1.1 ij.1.2 (ξ ij), coefficientVector Z⟫_ℂ -
82 ⟪coefficientVector Z, orbitalTest p ij.1.1 ij.1.2 (ξ ij)⟫_ℂ) by
83 rw [Finset.sum_sub_distrib]; ring]
84 simp only [classicalTest_phase, orbitalTest_phase]
85
86lemma jointTest_norm_sq (p t : A → ℝ) (hp : ∀ a, 0 ≤ p a)
87 (hgap : ∀ i j, i < j → 0 < p i - p j) (ξ : OrbitalPair A → ℂ) :
88 ‖jointTest p t ξ‖ ^ 2 = (∑ a, p a * (t a) ^ 2) +
89 ∑ ij, (p ij.1.1 + p ij.1.2) / (p ij.1.1 - p ij.1.2) * ‖ξ ij‖ ^ 2 := by
90 have ho : ⟪coefficientVector (classicalTest p t),
91 ∑ ij : OrbitalPair A, orbitalTest p ij.1.1 ij.1.2 (ξ ij)⟫_ℂ = 0 := by
92 simp only [inner_sum]
93 apply Finset.sum_eq_zero
94 intro ij _
95 exact classicalTest_orthogonal_orbitalTest p t _ _ (ne_of_lt ij.2) _
96 rw [jointTest, norm_add_sq (𝕜 := ℂ), ho, map_zero, mul_zero, add_zero,
97 classicalTest_norm_sq p t hp,
98 norm_sum_sq_of_pairwise _ (fun i j hij => orbitalTest_pairwise p i j hij _ _)]
99 congr 1
100 apply Finset.sum_congr rfl
101 intro ij _
102 exact orbitalTest_norm_sq p _ _ (ne_of_lt ij.2) (hp _) (hp _) (hgap _ _ ij.2) _
103
104lemma jointTest_reference_sq (p t : A → ℝ) (hp : ∀ a, 0 ≤ p a) (ξ : OrbitalPair A → ℂ) :
105 ‖⟪coefficientVector (schmidtCoefficients p), jointTest p t ξ⟫_ℂ‖ ^ 2 =
106 (∑ a, p a * t a) ^ 2 := by
107 have ho : (∑ ij : OrbitalPair A, ⟪coefficientVector (schmidtCoefficients p),
108 orbitalTest p ij.1.1 ij.1.2 (ξ ij)⟫_ℂ) = 0 := by
109 apply Finset.sum_eq_zero
110 intro ij _
111 exact orbitalTest_orthogonal_reference p _ _ (ne_of_lt ij.2) _
112 simp only [jointTest, inner_add_right, inner_sum, ho, add_zero,
113 classicalTest_reference_sq p t hp]
114
115/-- The full joint characteristic, with exact classical covariance `2 v Σp`
116and independent circular orbital variances `v (pᵢ+pⱼ)/(pᵢ-pⱼ)`. The additive
117exponent is derived from the integral, with no independence hypothesis. -/
118theorem jointCoordinate_characteristic
119 (u : OrthonormalBasis (Fin (s + 1)) ℂ (Register (A × A)))
120 (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
121 (hu : u 0 = coefficientVector (schmidtCoefficients p))
122 (hgap : ∀ i j, i < j → 0 < p i - p j)
123 {v : ℝ} (hv : 0 < v) (t : A → ℝ) (ξ : OrbitalPair A → ℂ) :
124 (∫ z, Complex.exp (Complex.I * ((∑ a,
125 t a * classicalCoordinate p (frameTangentMatrix u z) a : ℝ) : ℂ) +
126 ∑ ij, (ξ ij * star (orbitalCoordinate p (frameTangentMatrix u z) ij.1.1 ij.1.2) -
127 star (ξ ij) * orbitalCoordinate p (frameTangentMatrix u z) ij.1.1 ij.1.2))
128 ∂gaussianProductMeasure (fun _ : Fin s => v)) =
129 Complex.exp (-((v * ((∑ a, p a * (t a) ^ 2) - (∑ a, p a * t a) ^ 2) +
130 ∑ ij, v * (p ij.1.1 + p ij.1.2) / (p ij.1.1 - p ij.1.2) * ‖ξ ij‖ ^ 2 : ℝ) : ℂ)) := by
131 simp_rw [← jointTest_phase, coefficientVector_frameTangentMatrix]
132 rw [frameTangent_characteristic u hv, hu, jointTest_norm_sq p t hp hgap,
133 jointTest_reference_sq p t hp]
134 congr 1
135 norm_cast
136 simp_rw [div_eq_mul_inv, mul_sub, mul_add, Finset.mul_sum, mul_assoc]
137 ring
138
139end Cloning.PCTGaussianCovariance