Exact Lean source
MatrixFidelityProjector
formalization/Cloning/MatrixFidelityProjector.lean
Source hash: 245aa15a0a3191bd360f3c4cf0122eddffb2cec188aa8dbebe4ff9475efe2ed8
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
theorem
Cloning.MatrixFidelity.trace_re_monotheorem Cloning.MatrixFidelity.sandwich_monotheorem Cloning.MatrixFidelity.fidelity_mono_lefttheorem Cloning.MatrixFidelity.sqrt_projectortheorem Cloning.MatrixFidelity.projector_le_identitytheorem Cloning.MatrixFidelity.sqrt_smul_projectortheorem Cloning.MatrixFidelity.fidelity_identity_projectortheorem Cloning.MatrixFidelity.fidelity_projector_le_of_identity_boundtheorem Cloning.MatrixFidelity.fidelity_flat_projector_blocktheorem Cloning.MatrixFidelity.flat_projector_blocks_le_majoranttheorem Cloning.MatrixFidelity.trace_inflated_projector_blockstheorem Cloning.MatrixFidelity.fidelity_projector_blocks_letheorem Cloning.MatrixFidelity.finite_matrix_projector_conversetheorem Cloning.MatrixFidelity.krausMap_monotheorem Cloning.MatrixFidelity.trace_flat_identity_blockstheorem Cloning.MatrixFidelity.finite_kraus_projector_converse1import Cloning.MatrixFidelity
2import Cloning.MatrixFidelityBlocks
3import Cloning.Projector
4import Cloning.Channels
5import Mathlib.Analysis.CStarAlgebra.Matrix
6import Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.Order
7import Mathlib.Tactic.Ring
8
9/-!
10# Concrete operator domination and flat-projector fidelity
11
12These are statements about actual positive complex matrices and the spectral
13root-fidelity definition. Fidelity monotonicity is proved using operator
14monotonicity of the square root, and flat-projector fidelity is computed by
15uniqueness of positive square roots.
16-/
17
18noncomputable section
19open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator
20
21namespace Cloning.MatrixFidelity
22
23set_option backward.isDefEq.respectTransparency false
24set_option maxHeartbeats 1000000
25
26variable {n : Type*} [Fintype n] [DecidableEq n]
27
28omit [DecidableEq n] in
29/-- The real part of the matrix trace preserves the Loewner order. -/
30theorem trace_re_mono {A B : Matrix n n ℂ} (hAB : A ≤ B) :
31 (Matrix.trace A).re ≤ (Matrix.trace B).re := by
32 have ht := trace_re_nonneg (show (B - A).PosSemidef from hAB)
33 simpa only [Matrix.trace_sub, Complex.sub_re, sub_nonneg] using ht
34
35/-- Conjugating both sides by the positive square root preserves order. -/
36theorem sandwich_mono {A B : Matrix n n ℂ} (hAB : A ≤ B) (T : Matrix n n ℂ) :
37 CFC.sqrt T * A * CFC.sqrt T ≤ CFC.sqrt T * B * CFC.sqrt T := by
38 change (CFC.sqrt T * B * CFC.sqrt T - CFC.sqrt T * A * CFC.sqrt T).PosSemidef
39 rw [← Matrix.sub_mul, ← Matrix.mul_sub]
40 exact sandwich_posSemidef (show (B - A).PosSemidef from hAB) T
41
42/-- The precise operator domination step in the projector converse. No
43trace normalization is required, so the dominating matrix can have trace > 1. -/
44theorem fidelity_mono_left {A B : Matrix n n ℂ} (hAB : A ≤ B) (T : Matrix n n ℂ) :
45 fidelity A T ≤ fidelity B T := by
46 letI : CStarAlgebra (Matrix n n ℂ) := {}
47 apply trace_re_mono
48 exact CFC.sqrt_le_sqrt _ _ (sandwich_mono hAB T)
49
50/-- A positive idempotent matrix is its own positive square root. -/
51theorem sqrt_projector {P : Matrix n n ℂ} (hP : P.PosSemidef) (hPP : P * P = P) :
52 CFC.sqrt P = P :=
53 CFC.sqrt_unique hPP hP.nonneg
54
55/-- Replacing an orthogonal support projection by the identity is a valid
56Loewner majorization. -/
57theorem projector_le_identity {P : Matrix n n ℂ} (hP : P.PosSemidef)
58 (hPP : P * P = P) : P ≤ 1 := by
59 apply IsStarProjection.le_one
60 exact ⟨hPP, hP.isHermitian⟩
61
62/-- Scaling a positive projector scales its square root by the scalar square root. -/
63theorem sqrt_smul_projector {P : Matrix n n ℂ} (hP : P.PosSemidef)
64 (hPP : P * P = P) (q : ℝ) (hq : 0 ≤ q) :
65 CFC.sqrt (q • P) = Real.sqrt q • P := by
66 apply CFC.sqrt_unique
67 · rw [smul_mul_smul_comm, hPP, Real.mul_self_sqrt hq]
68 · exact (hP.smul (Real.sqrt_nonneg q)).nonneg
69
70/-- Exact root fidelity between a scalar ambient identity and a flat support
71projector. The support rank is represented by `Re (trace P)`. -/
72theorem fidelity_identity_projector (c q : ℝ) (hc : 0 ≤ c) (hq : 0 ≤ q)
73 {P : Matrix n n ℂ} (hP : P.PosSemidef) (hPP : P * P = P) :
74 fidelity (c • (1 : Matrix n n ℂ)) (q • P) =
75 Real.sqrt (c * q) * (Matrix.trace P).re := by
76 unfold fidelity
77 rw [sqrt_smul_projector hP hPP q hq]
78 have hs : (Real.sqrt q • P) * (c • (1 : Matrix n n ℂ)) * (Real.sqrt q • P) =
79 (c * q) • P := by
80 rw [smul_mul_smul_comm, Matrix.mul_one, smul_mul_smul_comm, hPP]
81 congr 1
82 have hsq := Real.mul_self_sqrt hq
83 calc
84 Real.sqrt q * c * Real.sqrt q = c * (Real.sqrt q * Real.sqrt q) := by ring
85 _ = c * q := by rw [hsq]
86 rw [hs, sqrt_smul_projector hP hPP (c * q) (mul_nonneg hc hq)]
87 simp only [Matrix.trace_smul, Complex.real_smul, Complex.mul_re, Complex.ofReal_re,
88 Complex.ofReal_im, zero_mul, sub_zero]
89
90/-- A scalar identity majorant yields the finite flat-projector converse
91directly for the concrete root fidelity. -/
92theorem fidelity_projector_le_of_identity_bound {A P : Matrix n n ℂ}
93 (c q : ℝ) (hc : 0 ≤ c) (hq : 0 ≤ q)
94 (hP : P.PosSemidef) (hPP : P * P = P)
95 (hA : A ≤ c • (1 : Matrix n n ℂ)) :
96 fidelity A (q • P) ≤ Real.sqrt (c * q) * (Matrix.trace P).re := by
97 exact (fidelity_mono_left hA (q • P)).trans_eq
98 (fidelity_identity_projector c q hc hq hP hPP)
99
100/-- A normalized flat target in a single ambient block gives the precise
101dimension-ratio factor occurring in the manuscript. -/
102theorem fidelity_flat_projector_block (z q D s : ℝ)
103 (hz : 0 ≤ z) (hq : 0 ≤ q) (hD : 0 < D) (hs : 0 < s)
104 {P : Matrix n n ℂ} (hP : P.PosSemidef) (hPP : P * P = P)
105 (htrace : (Matrix.trace P).re = s) :
106 fidelity ((z / D) • (1 : Matrix n n ℂ)) ((q / s) • P) =
107 Real.sqrt (z * q / (D / s)) := by
108 rw [fidelity_identity_projector (z / D) (q / s)
109 (div_nonneg hz hD.le) (div_nonneg hq hs.le) hP hPP, htrace]
110 calc
111 Real.sqrt ((z / D) * (q / s)) * s =
112 (s * 1) * Real.sqrt ((z / (D * 1)) * (q / (s * 1))) := by
113 simp only [mul_one, mul_comm]
114 _ = Real.sqrt (z * q / (D / s)) :=
115 Cloning.Projector.flat_block_root_fidelity z q D s 1 hz hq hD hs zero_lt_one
116
117section Blocks
118
119variable {ι : Type*} [Fintype ι] [DecidableEq ι]
120variable {d : ι → Type*} [∀ i, Fintype (d i)] [∀ i, DecidableEq (d i)]
121
122/-- Replacing every input support projector by its ambient identity gives
123the positive operator majorant used in the projector converse. -/
124theorem flat_projector_blocks_le_majorant
125 (P : ∀ i, Matrix (d i) (d i) ℂ) (c : ι → ℝ)
126 (hP : ∀ i, (P i).PosSemidef) (hPP : ∀ i, P i * P i = P i)
127 (hc : ∀ i, 0 ≤ c i) :
128 Matrix.blockDiagonal' (fun i => c i • P i) ≤
129 Matrix.blockDiagonal' (fun i => c i • (1 : Matrix (d i) (d i) ℂ)) := by
130 change (Matrix.blockDiagonal' (fun i => c i • (1 : Matrix (d i) (d i) ℂ)) -
131 Matrix.blockDiagonal' (fun i => c i • P i)).PosSemidef
132 rw [← Matrix.blockDiagonal'_sub]
133 apply blockDiagonal'_posSemidef
134 intro i
135 change (c i • (1 : Matrix (d i) (d i) ℂ) - c i • P i).PosSemidef
136 rw [← smul_sub]
137 exact (show (1 - P i).PosSemidef from projector_le_identity (hP i) (hPP i)).smul (hc i)
138
139/-- The actual matrix trace of the input majorant is the dimension-ratio
140moment. Multiplicity dimensions can be included in `D` and `s`. -/
141theorem trace_inflated_projector_blocks (p D s : ι → ℝ)
142 (hdim : ∀ i, D i = Fintype.card (d i)) :
143 (Matrix.trace (Matrix.blockDiagonal' (fun i =>
144 (p i / s i) • (1 : Matrix (d i) (d i) ℂ)))).re =
145 ∑ i, p i * (D i / s i) := by
146 rw [Matrix.trace_blockDiagonal', Complex.re_sum]
147 apply Finset.sum_congr rfl
148 intro i _
149 simp only [Matrix.trace_smul, Matrix.trace_one, Complex.smul_re,
150 Complex.natCast_re, smul_eq_mul]
151 rw [← hdim i]
152 ring
153
154/-- Concrete blockwise projector bound, derived from matrix monotonicity
155and the exact direct-sum formula. -/
156theorem fidelity_projector_blocks_le
157 (A P : ∀ i, Matrix (d i) (d i) ℂ) (c q : ι → ℝ)
158 (hA : ∀ i, (A i).PosSemidef) (hP : ∀ i, (P i).PosSemidef)
159 (hPP : ∀ i, P i * P i = P i)
160 (hc : ∀ i, 0 ≤ c i) (hq : ∀ i, 0 ≤ q i)
161 (hbound : ∀ i, A i ≤ c i • (1 : Matrix (d i) (d i) ℂ)) :
162 fidelity (Matrix.blockDiagonal' A)
163 (Matrix.blockDiagonal' (fun i => q i • P i)) ≤
164 ∑ i, Real.sqrt (c i * q i) * (Matrix.trace (P i)).re := by
165 rw [fidelity_blockDiagonal' A (fun i => q i • P i) hA
166 (fun i => (hP i).smul (hq i))]
167 apply Finset.sum_le_sum
168 intro i _
169 exact fidelity_projector_le_of_identity_bound (c i) (q i) (hc i) (hq i)
170 (hP i) (hPP i) (hbound i)
171
172/-- The finite projector converse for actual matrices. The output need not
173be block diagonal: it is enough that it is dominated by the invariant block
174majorant. There is no fidelity-domination hypothesis or assumed fidelity law.
175
176For the physical application, identify `D` with ambient block dimensions;
177then `z` is the block trace mass. `s` is the support rank and `M` bounds the
178total mass. The theorem also holds for arbitrary positive `D`.
179Zero-target blocks can use `q = 0` and any positive-rank projector.
180In the manuscript `M` is the input expectation of the dimension ratio. -/
181theorem finite_matrix_projector_converse
182 (A : Matrix (Sigma d) (Sigma d) ℂ)
183 (P : ∀ i, Matrix (d i) (d i) ℂ) (z q D s : ι → ℝ) (M : ℝ)
184 (hP : ∀ i, (P i).PosSemidef) (hPP : ∀ i, P i * P i = P i)
185 (hz : ∀ i, 0 ≤ z i) (hq : ∀ i, 0 ≤ q i)
186 (hD : ∀ i, 0 < D i) (hs : ∀ i, 0 < s i)
187 (htrace : ∀ i, (Matrix.trace (P i)).re = s i)
188 (hbound : A ≤ Matrix.blockDiagonal' (fun i =>
189 (z i / D i) • (1 : Matrix (d i) (d i) ℂ)))
190 (hmass : ∑ i, z i ≤ M) :
191 fidelity A (Matrix.blockDiagonal' (fun i => (q i / s i) • P i)) ≤
192 Real.sqrt (M * ∑ i, q i / (D i / s i)) := by
193 have hmono := fidelity_mono_left hbound
194 (Matrix.blockDiagonal' (fun i => (q i / s i) • P i))
195 rw [fidelity_blockDiagonal'] at hmono
196 · have hformula : (∑ i, fidelity ((z i / D i) • (1 : Matrix (d i) (d i) ℂ))
197 ((q i / s i) • P i)) = ∑ i, Real.sqrt (z i * q i / (D i / s i)) := by
198 apply Finset.sum_congr rfl
199 intro i _
200 exact fidelity_flat_projector_block (z i) (q i) (D i) (s i)
201 (hz i) (hq i) (hD i) (hs i) (hP i) (hPP i) (htrace i)
202 rw [hformula] at hmono
203 exact hmono.trans (Cloning.Projector.block_fidelity_le_of_mass_le
204 Finset.univ z q (fun i => D i / s i) M
205 (fun i _ => hz i) (fun i _ => hq i)
206 (fun i _ => div_pos (hD i) (hs i)) hmass)
207 · intro i
208 exact Matrix.PosSemidef.one.smul (div_nonneg (hz i) (hD i).le)
209 · intro i
210 exact (hP i).smul (div_nonneg (hq i) (hs i).le)
211
212end Blocks
213
214section Kraus
215
216variable {κ α β : Type*} [Fintype κ] [Fintype α] [Fintype β]
217
218/-- Positivity of an actual Kraus map gives Loewner monotonicity. -/
219theorem krausMap_mono (K : κ → Matrix β α ℂ) {X B : Matrix α α ℂ}
220 (hXB : X ≤ B) : Cloning.Channels.krausMap K X ≤ Cloning.Channels.krausMap K B := by
221 change (Cloning.Channels.krausMap K B - Cloning.Channels.krausMap K X).PosSemidef
222 have hpos := Cloning.Channels.krausMap_positive K
223 (show (B - X).PosSemidef from hXB)
224 simpa only [Cloning.Channels.krausMap, Matrix.mul_sub, Matrix.sub_mul,
225 Finset.sum_sub_distrib] using hpos
226
227variable {ι : Type*} [Fintype ι] [DecidableEq ι]
228variable {d : ι → Type*} [∀ i, Fintype (d i)] [∀ i, DecidableEq (d i)]
229
230/-- Once the scalar denominator is the ambient dimension, the invariant
231majorant's trace is exactly the sum of its block masses. -/
232theorem trace_flat_identity_blocks (z D : ι → ℝ)
233 (hD : ∀ i, D i ≠ 0) (hdim : ∀ i, D i = Fintype.card (d i)) :
234 (Matrix.trace (Matrix.blockDiagonal' (fun i =>
235 (z i / D i) • (1 : Matrix (d i) (d i) ℂ)))).re = ∑ i, z i := by
236 rw [Matrix.trace_blockDiagonal', Complex.re_sum]
237 apply Finset.sum_congr rfl
238 intro i _
239 simp only [Matrix.trace_smul, Matrix.trace_one, Complex.smul_re,
240 Complex.natCast_re, smul_eq_mul]
241 rw [← hdim i, div_mul_cancel₀ _ (hD i)]
242
243/-- A finite projector converse for an actual trace-preserving Kraus channel.
244The operator majorant and invariant-output decomposition are the remaining
245representation-theoretic inputs. Channel positivity, trace preservation,
246fidelity monotonicity, direct sums, and the Cauchy--Schwarz bound are proved.
247
248For the manuscript, the input majorant has trace `E R`, so this gives exactly
249the square root of the product of the two dimension-ratio moments. -/
250theorem finite_kraus_projector_converse [DecidableEq α]
251 (K : κ → Matrix (Sigma d) α ℂ) (X B : Matrix α α ℂ)
252 (P : ∀ i, Matrix (d i) (d i) ℂ) (z q D s : ι → ℝ)
253 (hK : ∑ k, (K k)ᴴ * K k = 1)
254 (hXB : X ≤ B)
255 (hP : ∀ i, (P i).PosSemidef) (hPP : ∀ i, P i * P i = P i)
256 (hz : ∀ i, 0 ≤ z i) (hq : ∀ i, 0 ≤ q i)
257 (hD : ∀ i, 0 < D i) (hs : ∀ i, 0 < s i)
258 (hdim : ∀ i, D i = Fintype.card (d i))
259 (htrace : ∀ i, (Matrix.trace (P i)).re = s i)
260 (hinvariant : Cloning.Channels.krausMap K B = Matrix.blockDiagonal'
261 (fun i => (z i / D i) • (1 : Matrix (d i) (d i) ℂ))) :
262 fidelity (Cloning.Channels.krausMap K X)
263 (Matrix.blockDiagonal' (fun i => (q i / s i) • P i)) ≤
264 Real.sqrt ((Matrix.trace B).re * ∑ i, q i / (D i / s i)) := by
265 apply finite_matrix_projector_converse _ P z q D s (Matrix.trace B).re
266 hP hPP hz hq hD hs htrace
267 · rw [← hinvariant]
268 exact krausMap_mono K hXB
269 · have hmass : ∑ i, z i = (Matrix.trace B).re := by
270 rw [← trace_flat_identity_blocks z D (fun i => (hD i).ne') hdim,
271 ← hinvariant, Cloning.Channels.krausMap_trace K hK B]
272 exact hmass.le
273
274end Kraus
275
276end Cloning.MatrixFidelity