Offline · exact source
Exact Lean source

PCTTangentNormalization

formalization/Cloning/PCTTangentNormalization.lean

Source hash: e5196126eb3fed7353324bc3c22178c85b74807910703cfbeb50db67175362d3

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.PCTGaussianCovariance
2 
3/-! Exact normalization of physical tangent purifications. The quadratic
4energy is the actual Hilbert–Schmidt norm of the coefficient matrix, and the
5reference spectrum is normalized and orthogonal to the tangent. -/
6noncomputable section
7open scoped ComplexOrder InnerProductSpace Topology BigOperators Matrix Matrix.Norms.L2Operator
8namespace Cloning.PCTReducedGaussian
9open Cloning.PCT Cloning.PCTGaussianCovariance
10set_option backward.isDefEq.respectTransparency false
11set_option maxHeartbeats 1000000
12variable {A : Type*} [Fintype A] [DecidableEq A]
13 
14@[simp] lemma coefficientVector_add (M N : Matrix A A ℂ) :
15    coefficientVector (M + N) = coefficientVector M + coefficientVector N := by
16  ext ab
17  rfl
18 
19@[simp] lemma coefficientVector_real_smul (t : ℝ) (M : Matrix A A ℂ) :
20    coefficientVector (t • M) = t • coefficientVector M := by
21  ext ab
22  rfl
23 
24lemma schmidt_norm_sq (p : A → ℝ) (hp : ∀ a, 0 ≤ p a) :
25    ‖coefficientVector (schmidtCoefficients p)‖ ^ 2 = ∑ a, p a := by
26  rw [coefficientVector_norm_sq]
27  simp only [schmidtCoefficients, Matrix.diagonal_apply, apply_ite, norm_zero,
28    ite_pow, zero_pow (by omega : 2 ≠ 0)]
29  apply Finset.sum_congr rfl
30  intro a _
31  simp [Complex.norm_real, Real.norm_eq_abs, sq_abs, Real.sq_sqrt (hp a)]
32 
33/-- Exact physical numerator norm; its energy is not an arbitrary parameter. -/
34theorem tangent_numerator_norm_sq (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
35    (hs : ∑ a, p a = 1) (Z : Matrix A A ℂ)
36    (horth : ⟪coefficientVector (schmidtCoefficients p), coefficientVector Z⟫_ℂ = 0)
37    (t : ℝ) :
38    ‖coefficientVector (schmidtCoefficients p + t • Z)‖ ^ 2 =
39      1 + t ^ 2 * ‖coefficientVector Z‖ ^ 2 := by
40  rw [coefficientVector_add, coefficientVector_real_smul, norm_add_sq (𝕜 := ℂ),
41    ← Complex.coe_smul t, inner_smul_right, horth, mul_zero, map_zero, mul_zero, add_zero,
42    schmidt_norm_sq p hp, hs, norm_smul, mul_pow, Complex.norm_real, Real.norm_eq_abs, sq_abs]
43 
44/-- A genuinely normalized physical tangent vector under precisely the
45normalization and orthogonality hypotheses needed for that assertion. -/
46theorem normalizedTangentVector_norm (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
47    (hs : ∑ a, p a = 1) (Z : Matrix A A ℂ)
48    (horth : ⟪coefficientVector (schmidtCoefficients p), coefficientVector Z⟫_ℂ = 0)
49    (t : ℝ) : ‖normalizedTangentVector p Z (‖coefficientVector Z‖ ^ 2) t‖ = 1 := by
50  have hd : 0 < 1 + t ^ 2 * ‖coefficientVector Z‖ ^ 2 := by positivity
51  have hn : ‖normalizedTangentVector p Z (‖coefficientVector Z‖ ^ 2) t‖ ^ 2 = 1 := by
52    rw [normalizedTangentVector, norm_smul, mul_pow, norm_inv, inv_pow,
53      Complex.norm_real, Real.norm_eq_abs, sq_abs, Real.sq_sqrt hd.le,
54      tangent_numerator_norm_sq p hp hs Z horth t, inv_mul_cancel₀ hd.ne']
55  nlinarith [norm_nonneg (normalizedTangentVector p Z (‖coefficientVector Z‖ ^ 2) t)]
56 
57/-- Frame tangent energy is the actual Hilbert–Schmidt energy of its matrix. -/
58theorem frameTangentMatrix_energy {s : ℕ}
59    (u : Fin (s + 1) → Register (A × A)) (hu : Orthonormal ℂ u) (z : Fin s → ℂ) :
60    ‖coefficientVector (frameTangentMatrix u z)‖ ^ 2 = GeneralCoherent.energy z := by
61  rw [coefficientVector_frameTangentMatrix, frameTangent_norm_sq u hu]
62 
63/-- Exact second-order remainder, with the actual tangent energy. -/
64theorem normalizedTangent_remainder (p : A → ℝ) (hp : ∀ a, 0 ≤ p a)
65    (Z : Matrix A A ℂ) (t : ℝ) :
66    let e := ‖coefficientVector Z‖ ^ 2
67    reducedDensityMatrix (normalizedTangentVector p Z e t) -
68      Matrix.diagonal (fun a => (p a : ℂ)) - t • partialTraceDifferential p Z =
69      (t ^ 2 / (1 + t ^ 2 * e)) • (Z * Zᴴ -
70        e • Matrix.diagonal (fun a => (p a : ℂ)) -
71          (t * e) • partialTraceDifferential p Z) := by
72  dsimp only
73  rw [normalizedTangent_reduced_exact p hp Z _ (sq_nonneg _) t]
74  have hd : 1 + t ^ 2 * ‖coefficientVector Z‖ ^ 2 ≠ 0 := by positivity
75  ext a b
76  simp only [Matrix.sub_apply, Matrix.add_apply, Matrix.smul_apply, smul_eq_mul,
77    Complex.real_smul, Complex.ofReal_inv, Complex.ofReal_div, Complex.ofReal_pow,
78    Complex.ofReal_add, Complex.ofReal_mul, Complex.ofReal_one]
79  have hdC : (1 : ℂ) + (t : ℂ) ^ 2 * (‖coefficientVector Z‖ : ℂ) ^ 2 ≠ 0 := by
80    exact_mod_cast hd
81  field_simp [hdC]
82  <;> ring
83 
84end Cloning.PCTReducedGaussian