Offline · exact source
Exact Lean source

PCTFlatGaussianCrossKernel

formalization/Cloning/PCTFlatGaussianCrossKernel.lean

Source hash: d035dc9fe10bd730cbb052b674c22a00a2e97df3b0304241c81bac7312e6f8a8

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.PCTFlatGaussianCrossFrameExistence
2import Cloning.PCTGaussianCovarianceClassical
3 
4/-! The actual reduced differential at a flat state has exactly the
5Hermitian real-coordinate cross kernel used in the purity Gaussian integral. -/
6noncomputable section
7open scoped ComplexOrder InnerProductSpace Topology BigOperators
8namespace Cloning.PCTFlatGaussianCross
9open Cloning.PCT Cloning.PCTReducedGaussian Cloning.PCTGaussianCovariance
10set_option backward.isDefEq.respectTransparency false
11set_option maxHeartbeats 1000000
12variable {A : Type*} [Fintype A] [DecidableEq A] {s : ℕ}
13 
14lemma coefficientVector_inner_trace (M N : Matrix A A ℂ) (hM : M.IsHermitian) :
15    ⟪coefficientVector M,coefficientVector N⟫_ℂ=Matrix.trace (M*N) := by
16  rw [coefficientVector_inner]
17  simp only [Matrix.trace,Matrix.diag_apply,Matrix.mul_apply]
18  rw [Finset.sum_comm]
19  apply Finset.sum_congr rfl
20  intro a _
21  apply Finset.sum_congr rfl
22  intro b _
23  have hh := congrArg (fun X : Matrix A A ℂ => X a b) hM
24  change star (M b a)=M a b at hh
25  rw [hh]
26 
27lemma frameTangent_inner
28    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A×A))) (z w : Fin s → ℂ) :
29    ⟪frameTangent u z,frameTangent u w⟫_ℂ=∑ i,star (z i)*w i := by
30  have hu : Orthonormal ℂ (fun i : Fin s => u i.succ) :=
31    u.orthonormal.comp _ (Fin.succ_injective _)
32  simpa [frameTangent] using hu.inner_sum z w Finset.univ
33 
34/-- In an actual Hermitian frame the reduced differential retains precisely
35its real tangent coordinates, with the derived factor `2 sqrt(c)`. -/
36theorem flatDifferential_frame_coefficients
37    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A×A)))
38    (hu : ∀ i a b,star (u i (b,a))=u i (a,b))
39    (c : ℝ) (z : Fin s → ℂ) :
40    coefficientVector (partialTraceDifferential (fun _ : A => c) (frameTangentMatrix u z))=
41      frameTangent u (fun i => ((2*Real.sqrt c*(z i).re : ℝ) : ℂ)) := by
42  ext ab
43  rcases ab with ⟨a,b⟩
44  simp only [coefficientVector_apply,partialTraceDifferential_apply,
45    frameTangentMatrix,frameTangent,lp.coeFn_sum,Finset.sum_apply,lp.coeFn_smul,
46    Pi.smul_apply,smul_eq_mul,star_sum,star_mul,hu,Finset.sum_mul,Finset.mul_sum]
47  rw [← Finset.sum_add_distrib]
48  apply Finset.sum_congr rfl
49  intro i _
50  have hz := Complex.add_conj (z i)
51  change z i+star (z i)=((2*(z i).re : ℝ) : ℂ) at hz
52  calc
53    _=(Real.sqrt c : ℂ)*(z i+star (z i))*u i.succ (a,b) := by ring
54    _=((2*Real.sqrt c*(z i).re : ℝ) : ℂ)*u i.succ (a,b) := by
55      rw [hz]
56      push_cast
57      ring
58 
59/-- Exact matrix trace kernel at an arbitrary constant diagonal reference. -/
60theorem flatDifferential_trace_cross
61    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A×A)))
62    (hu : ∀ i a b,star (u i (b,a))=u i (a,b))
63    (c : ℝ) (hc : 0≤c) (z w : Fin s → ℂ) :
64    (Matrix.trace (partialTraceDifferential (fun _ : A => c) (frameTangentMatrix u z) *
65      partialTraceDifferential (fun _ : A => c) (frameTangentMatrix u w))).re=
66        4*c*∑ i,(z i).re*(w i).re := by
67  rw [← coefficientVector_inner_trace _ _ (partialTraceDifferential_hermitian _ _),
68    flatDifferential_frame_coefficients u hu,flatDifferential_frame_coefficients u hu,
69    frameTangent_inner]
70  simp only [Complex.re_sum,Complex.conj_ofReal,Complex.star_def,
71    ← Complex.ofReal_mul,Complex.ofReal_re,Finset.mul_sum]
72  apply Finset.sum_congr rfl
73  intro i _
74  calc
75    _=4*(Real.sqrt c)^2*((z i).re*(w i).re) := by ring
76    _=_ := by rw [Real.sq_sqrt hc]
77 
78/-- The physical flat-state normalization cancels exactly against rank. -/
79theorem flatDifferential_rank_trace_cross
80    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A×A)))
81    (hu : ∀ i a b,star (u i (b,a))=u i (a,b))
82    (r : ℕ) (hr : 0<r) (z w : Fin s → ℂ) :
83    (r : ℝ)*(Matrix.trace
84      (partialTraceDifferential (fun _ : A => (r : ℝ)⁻¹) (frameTangentMatrix u z) *
85       partialTraceDifferential (fun _ : A => (r : ℝ)⁻¹) (frameTangentMatrix u w))).re=
86        4*∑ i,(z i).re*(w i).re := by
87  rw [flatDifferential_trace_cross u hu _ (by positivity)]
88  have hR : (r : ℝ)≠0 := by exact_mod_cast Nat.ne_of_gt hr
89  field_simp
90 
91end Cloning.PCTFlatGaussianCross