Offline · exact source
Exact Lean source

MatrixFidelityContinuity

formalization/Cloning/MatrixFidelityContinuity.lean

Source hash: db5bca732929057f70e5960a76518f47e655009805642542bbcbe62054419ec7

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.MatrixFidelityDeletion
2import Cloning.MatrixFidelitySymmetry
3import Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Abs
4import Mathlib.Tactic.Linarith
5 
6/-!
7# Dimension-independent continuity of concrete matrix root fidelity
8 
9For positive matrices, changing the first argument by trace norm `ε` changes
10root fidelity by at most `sqrt (ε * trace T)`. The proof is explicit: the
11operator absolute value of the difference supplies a common positive error
12majorant; matrix fidelity monotonicity, subadditivity, and the trace-product
13bound control both signs of the difference.
14-/
15 
16noncomputable section
17open scoped Matrix MatrixOrder ComplexOrder
18 
19namespace Cloning.MatrixFidelity
20 
21set_option backward.isDefEq.respectTransparency false
22 
23variable {n : Type*} [Fintype n] [DecidableEq n]
24 
25/-- A Hermitian matrix is bounded above by its operator absolute value. -/
26theorem hermitian_le_abs {D : Matrix n n ℂ} (hD : D.IsHermitian) :
27    D ≤ CFC.abs D := by
28  apply sub_nonneg.mp
29  rw [CFC.abs_sub_self D hD, two_smul]
30  exact add_nonneg (CFC.negPart_nonneg D) (CFC.negPart_nonneg D)
31 
32/-- The absolute value also bounds the negative of a Hermitian matrix. -/
33theorem neg_hermitian_le_abs {D : Matrix n n ℂ} (hD : D.IsHermitian) :
34    -D ≤ CFC.abs D := by
35  simpa only [CFC.abs_neg] using hermitian_le_abs hD.neg
36 
37/-- The spectral trace-norm definition is the trace of the operator absolute value. -/
38theorem trace_abs_eq_matrixTraceNorm (D : Matrix n n ℂ) :
39    (Matrix.trace (CFC.abs D)).re = matrixTraceNorm D := rfl
40 
41/-- Both positive matrices lie below the other plus the same positive
42absolute-difference error matrix. -/
43theorem abs_difference_majorizes {A B : Matrix n n ℂ}
44    (hA : A.PosSemidef) (hB : B.PosSemidef) :
45    A ≤ B + CFC.abs (A - B) ∧ B ≤ A + CFC.abs (A - B) := by
46  have hD : (A - B).IsHermitian := hA.isHermitian.sub hB.isHermitian
47  constructor
48  · calc
49      A ≤ CFC.abs (A - B) + B := sub_le_iff_le_add.mp (hermitian_le_abs hD)
50      _ = B + CFC.abs (A - B) := add_comm _ _
51  · have hneg : B - A ≤ CFC.abs (A - B) := by
52      simpa only [neg_sub] using neg_hermitian_le_abs hD
53    calc
54      B ≤ CFC.abs (A - B) + A := sub_le_iff_le_add.mp hneg
55      _ = A + CFC.abs (A - B) := add_comm _ _
56 
57/-- Dimension-independent trace-norm continuity in the first fidelity argument.
58No normalization, full rank, or abstract continuity law is assumed. -/
59theorem fidelity_continuity_left {A B T : Matrix n n ℂ}
60    (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef) :
61    |fidelity A T - fidelity B T| ≤
62      Real.sqrt (matrixTraceNorm (A - B) * (Matrix.trace T).re) := by
63  have hH : (CFC.abs (A - B)).PosSemidef :=
64    Matrix.nonneg_iff_posSemidef.mp (CFC.abs_nonneg (A - B))
65  have hmajor := abs_difference_majorizes hA hB
66  have hmonoA := fidelity_mono_left hmajor.1 T
67  have hmonoB := fidelity_mono_left hmajor.2 T
68  have haddA := fidelity_add_le hA hH T
69  have haddB := fidelity_add_le hB hH T
70  have hbound := fidelity_le_sqrt_trace_mul_trace hH hT
71  rw [trace_abs_eq_matrixTraceNorm] at hbound
72  apply abs_sub_le_iff.mpr
73  constructor <;> linarith
74 
75/-- For a subnormalized target, the continuity constant depends only on
76the trace-norm perturbation. -/
77theorem fidelity_continuity_left_trace_le_one {A B T : Matrix n n ℂ}
78    (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef)
79    (htrace : (Matrix.trace T).re ≤ 1) :
80    |fidelity A T - fidelity B T| ≤ Real.sqrt (matrixTraceNorm (A - B)) := by
81  apply (fidelity_continuity_left hA hB hT).trans
82  apply Real.sqrt_le_sqrt
83  simpa only [mul_one] using mul_le_mul_of_nonneg_left htrace
84    (matrixTraceNorm_nonneg (A - B))
85 
86/-- A numerical trace-norm bound gives the uniform continuity estimate
87used in finite-dimensional approximation arguments. -/
88theorem fidelity_continuity_left_of_traceNorm_le {A B T : Matrix n n ℂ}
89    (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef)
90    (htrace : (Matrix.trace T).re ≤ 1) {ε : ℝ}
91    (herror : matrixTraceNorm (A - B) ≤ ε) :
92    |fidelity A T - fidelity B T| ≤ Real.sqrt ε :=
93  (fidelity_continuity_left_trace_le_one hA hB hT htrace).trans
94    (Real.sqrt_le_sqrt herror)
95 
96/-- The same trace-norm continuity estimate holds in the second argument. -/
97theorem fidelity_continuity_right {A B T : Matrix n n ℂ}
98    (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef) :
99    |fidelity T A - fidelity T B| ≤
100      Real.sqrt (matrixTraceNorm (A - B) * (Matrix.trace T).re) := by
101  rw [fidelity_symm hT hA, fidelity_symm hT hB]
102  exact fidelity_continuity_left hA hB hT
103 
104/-- Full two-argument continuity for arbitrary positive matrices, including
105singular matrices. The two trace factors record the chosen intermediate pair. -/
106theorem fidelity_continuity {A B T S : Matrix n n ℂ}
107    (hA : A.PosSemidef) (hB : B.PosSemidef)
108    (hT : T.PosSemidef) (hS : S.PosSemidef) :
109    |fidelity A T - fidelity B S| ≤
110      Real.sqrt (matrixTraceNorm (A - B) * (Matrix.trace T).re) +
111        Real.sqrt (matrixTraceNorm (T - S) * (Matrix.trace B).re) := by
112  apply (abs_sub_le (fidelity A T) (fidelity B T) (fidelity B S)).trans
113  exact add_le_add (fidelity_continuity_left hA hB hT)
114    (fidelity_continuity_right hT hS hB)
115 
116/-- For subnormalized positive matrices, the two perturbation trace norms
117alone control the change in fidelity. -/
118theorem fidelity_continuity_trace_le_one {A B T S : Matrix n n ℂ}
119    (hA : A.PosSemidef) (hB : B.PosSemidef)
120    (hT : T.PosSemidef) (hS : S.PosSemidef)
121    (htraceT : (Matrix.trace T).re ≤ 1) (htraceB : (Matrix.trace B).re ≤ 1) :
122    |fidelity A T - fidelity B S| ≤
123      Real.sqrt (matrixTraceNorm (A - B)) + Real.sqrt (matrixTraceNorm (T - S)) := by
124  apply (abs_sub_le (fidelity A T) (fidelity B T) (fidelity B S)).trans
125  apply add_le_add (fidelity_continuity_left_trace_le_one hA hB hT htraceT)
126  rw [fidelity_symm hB hT, fidelity_symm hB hS]
127  exact fidelity_continuity_left_trace_le_one hT hS hB htraceB
128 
129/-- Numerical perturbation bounds yield the usual sum-of-square-roots modulus. -/
130theorem fidelity_continuity_of_traceNorm_le {A B T S : Matrix n n ℂ}
131    (hA : A.PosSemidef) (hB : B.PosSemidef)
132    (hT : T.PosSemidef) (hS : S.PosSemidef)
133    (htraceT : (Matrix.trace T).re ≤ 1) (htraceB : (Matrix.trace B).re ≤ 1)
134    {ε η : ℝ} (hleft : matrixTraceNorm (A - B) ≤ ε)
135    (hright : matrixTraceNorm (T - S) ≤ η) :
136    |fidelity A T - fidelity B S| ≤ Real.sqrt ε + Real.sqrt η := by
137  exact (fidelity_continuity_trace_le_one hA hB hT hS htraceT htraceB).trans
138    (add_le_add (Real.sqrt_le_sqrt hleft) (Real.sqrt_le_sqrt hright))
139 
140end Cloning.MatrixFidelity