Offline · exact source
Exact Lean source

Projector

formalization/Cloning/Projector.lean

Source hash: 7a31de7b0097994ccb12fbd69aec0d552932bce4869cfe22d82fbe6ab4a31c6f

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 Mathlib.Data.Real.Sqrt
2import Mathlib.Algebra.Order.BigOperators.Ring.Finset
3import Mathlib.Order.Interval.Finset.Fin
4import Mathlib.Tactic.FieldSimp
5import Mathlib.Tactic.Linarith
6import Mathlib.Tactic.Positivity
7import Mathlib.Tactic.Ring
8 
9/-!
10# Scalar part of the finite projector converse
11 
12The manuscript's operator step produces nonnegative output block traces `z`,
13whose total is the input dimension-ratio moment. This file proves the ensuing
14finite Cauchy--Schwarz bound, including the exact scalar calculation of a
15support-block fidelity and the trace inflation. It does **not** identify an
16arbitrary quantum channel with this scalar data: covariance, Schur--Weyl
17decomposition, and operator monotonicity of fidelity remain external steps.
18 
19All results below are proved, without added axioms or `sorry`.
20-/
21 
22open scoped BigOperators
23 
24namespace Cloning.Projector
25 
26/-- The trace of a block after replacing its rank-`s` support by the ambient
27identity of dimension `d`. The multiplicity-space dimension cancels. -/
28theorem inflated_block_trace (p d s k : ℝ) (hs : s ≠ 0) (hk : k ≠ 0) :
29    (d * k) * (p / (s * k)) = p * (d / s) := by
30  field_simp
31 
32/-- Exact root fidelity of one flat block, computed by summing its identical
33nonzero diagonal contributions. Here `d` is the ambient irrep dimension, `s`
34is the support rank, and `k` is the multiplicity-space dimension. -/
35theorem flat_block_root_fidelity (z q d s k : ℝ)
36    (hz : 0 ≤ z) (hq : 0 ≤ q) (hd : 0 < d) (hs : 0 < s) (hk : 0 < k) :
37    (s * k) * Real.sqrt ((z / (d * k)) * (q / (s * k))) =
38      Real.sqrt (z * q / (d / s)) := by
39  have hrad : 0 ≤ (z / (d * k)) * (q / (s * k)) := by positivity
40  have hsq : ((s * k) * Real.sqrt ((z / (d * k)) * (q / (s * k)))) ^ 2 =
41      z * q / (d / s) := by
42    rw [mul_pow, Real.sq_sqrt hrad]
43    field_simp
44  have hnonneg : 0 ≤ (s * k) * Real.sqrt ((z / (d * k)) * (q / (s * k))) := by
45    positivity
46  rw [← hsq, Real.sqrt_sq hnonneg]
47 
48/-- Finite Cauchy--Schwarz in exactly the scalar form used by the converse. -/
49theorem block_fidelity_sq_le {ι : Type*} (S : Finset ι)
50    (z q R : ι → ℝ)
51    (hz : ∀ i ∈ S, 0 ≤ z i) (hq : ∀ i ∈ S, 0 ≤ q i)
52    (hR : ∀ i ∈ S, 0 < R i) :
53    (∑ i ∈ S, Real.sqrt (z i * q i / R i)) ^ 2 ≤
54      (∑ i ∈ S, z i) * (∑ i ∈ S, q i / R i) := by
55  apply Finset.sum_sq_le_sum_mul_sum_of_sq_eq_mul S hz
56      (fun i hi => div_nonneg (hq i hi) (hR i hi).le)
57  intro i hi
58  rw [Real.sq_sqrt (div_nonneg (mul_nonneg (hz i hi) (hq i hi)) (hR i hi).le)]
59  ring
60 
61/-- The block traces may have mass outside the target support. Only an upper
62bound on the mass of supported output blocks is needed. -/
63theorem block_fidelity_le_of_mass_le {ι : Type*} (S : Finset ι)
64    (z q R : ι → ℝ) (A : ℝ)
65    (hz : ∀ i ∈ S, 0 ≤ z i) (hq : ∀ i ∈ S, 0 ≤ q i)
66    (hR : ∀ i ∈ S, 0 < R i) (hmass : ∑ i ∈ S, z i ≤ A) :
67    (∑ i ∈ S, Real.sqrt (z i * q i / R i)) ≤
68      Real.sqrt (A * (∑ i ∈ S, q i / R i)) := by
69  apply Real.le_sqrt_of_sq_le
70  calc
71    _ ≤ (∑ i ∈ S, z i) * (∑ i ∈ S, q i / R i) :=
72      block_fidelity_sq_le S z q R hz hq hR
73    _ ≤ A * (∑ i ∈ S, q i / R i) := by
74      apply mul_le_mul_of_nonneg_right hmass
75      exact Finset.sum_nonneg (fun i hi => div_nonneg (hq i hi) (hR i hi).le)
76 
77/-- The finite projector-converse bound after the operator reduction. The
78hypothesis `hdom` explicitly records the unformalized fidelity domination. -/
79theorem finite_projector_converse_of_reduction {ι κ : Type*}
80    (I : Finset ι) (O : Finset κ) (p Rin : ι → ℝ) (z q Rout : κ → ℝ)
81    (F : ℝ)
82    (hz : ∀ i ∈ O, 0 ≤ z i) (hq : ∀ i ∈ O, 0 ≤ q i)
83    (hR : ∀ i ∈ O, 0 < Rout i)
84    (hmass : ∑ i ∈ O, z i ≤ ∑ j ∈ I, p j * Rin j)
85    (hdom : F ≤ ∑ i ∈ O, Real.sqrt (z i * q i / Rout i)) :
86    F ≤ Real.sqrt ((∑ j ∈ I, p j * Rin j) * (∑ i ∈ O, q i / Rout i)) :=
87  hdom.trans (block_fidelity_le_of_mass_le O z q Rout _ hz hq hR hmass)
88 
89/-- Trace preservation on all output blocks implies the supported mass bound. -/
90theorem supported_mass_le {ι : Type*} [DecidableEq ι]
91    (S T : Finset ι) (z : ι → ℝ) (A : ℝ)
92    (hST : S ⊆ T) (hz : ∀ i ∈ T, 0 ≤ z i) (htotal : ∑ i ∈ T, z i = A) :
93    ∑ i ∈ S, z i ≤ A := by
94  rw [← htotal]
95  exact Finset.sum_le_sum_of_subset_of_nonneg hST (fun i hi _ => hz i hi)
96 
97/-- The direct-sum trace inflation is the input dimension-ratio moment. -/
98theorem inflated_trace_eq_moment {ι : Type*} (I : Finset ι)
99    (p d s k : ι → ℝ) (hs : ∀ i ∈ I, s i ≠ 0) (hk : ∀ i ∈ I, k i ≠ 0) :
100    (∑ i ∈ I, (d i * k i) * (p i / (s i * k i))) =
101      ∑ i ∈ I, p i * (d i / s i) := by
102  apply Finset.sum_congr rfl
103  intro i hi
104  exact inflated_block_trace _ _ _ _ (hs i hi) (hk i hi)
105 
106/-- Each cross-root factor in the Weyl dimension ratio lies between `1`
107and `N + 1` if the row length lies in `[0,N]` and the root gap is at least `1`.
108The application has `δ = j - i` and `x = λᵢ`. -/
109theorem dimension_factor_bounds (x N δ : ℝ)
110    (hx : 0 ≤ x) (hxN : x ≤ N) (hδ : 1 ≤ δ) :
111    1 ≤ (x + δ) / δ ∧ (x + δ) / δ ≤ N + 1 := by
112  have hδpos : 0 < δ := lt_of_lt_of_le zero_lt_one hδ
113  have hN : 0 ≤ N := hx.trans hxN
114  constructor
115  · apply (le_div_iff₀ hδpos).2
116    linarith
117  · apply (div_le_iff₀ hδpos).2
118    nlinarith [mul_le_mul_of_nonneg_left hδ hN]
119 
120/-- The global polynomial bound on the dimension ratio, as a product over
121the crossing positive roots. For the rank-`r` model `S.card = r * (d-r)`. -/
122theorem dimension_ratio_bounds {ι : Type*} (S : Finset ι)
123    (x δ : ι → ℝ) (N : ℝ)
124    (hx : ∀ i ∈ S, 0 ≤ x i) (hxN : ∀ i ∈ S, x i ≤ N)
125    (hδ : ∀ i ∈ S, 1 ≤ δ i) :
126    1 ≤ (∏ i ∈ S, (x i + δ i) / δ i) ∧
127      (∏ i ∈ S, (x i + δ i) / δ i) ≤ (N + 1) ^ S.card := by
128  have hbounds := fun i hi => dimension_factor_bounds (x i) N (δ i)
129    (hx i hi) (hxN i hi) (hδ i hi)
130  constructor
131  · exact Finset.one_le_prod (fun i hi => (hbounds i hi).1)
132  · calc
133      _ ≤ ∏ _i ∈ S, (N + 1) := by
134        apply Finset.prod_le_prod
135        · intro i hi
136          exact zero_le_one.trans (hbounds i hi).1
137        · intro i hi
138          exact (hbounds i hi).2
139      _ = (N + 1) ^ S.card := by simp
140 
141/-- The scalar Cauchy--Schwarz bound is sharp: distributing available mass
142in proportion to `b` saturates it. This does not assert that the optimizing
143mass allocation can be realized by a quantum channel. -/
144theorem scalar_bound_is_sharp {ι : Type*} (S : Finset ι)
145    (b : ι → ℝ) (A : ℝ) (hA : 0 ≤ A)
146    (hb : ∀ i ∈ S, 0 ≤ b i) (hB : 0 < ∑ i ∈ S, b i) :
147    (∑ i ∈ S, A * b i / (∑ j ∈ S, b j)) = A ∧
148    (∑ i ∈ S, Real.sqrt ((A * b i / (∑ j ∈ S, b j)) * b i)) =
149      Real.sqrt (A * (∑ i ∈ S, b i)) := by
150  let B := ∑ i ∈ S, b i
151  have hB' : 0 < B := hB
152  constructor
153  · simp_rw [div_eq_mul_inv]
154    rw [← Finset.sum_mul, ← Finset.mul_sum]
155    change A * B * B⁻¹ = A
156    rw [mul_assoc, mul_inv_cancel₀ hB'.ne', mul_one]
157  · have hterm : ∀ i ∈ S,
158        Real.sqrt ((A * b i / B) * b i) = Real.sqrt (A / B) * b i := by
159      intro i hi
160      have heq : (A * b i / B) * b i = (A / B) * (b i) ^ 2 := by ring
161      rw [heq, Real.sqrt_mul (div_nonneg hA hB'.le), Real.sqrt_sq (hb i hi)]
162    change (∑ i ∈ S, Real.sqrt ((A * b i / B) * b i)) = Real.sqrt (A * B)
163    rw [Finset.sum_congr rfl hterm, ← Finset.mul_sum]
164    change Real.sqrt (A / B) * B = Real.sqrt (A * B)
165    have heq : A * B = (A / B) * B ^ 2 := by field_simp
166    rw [heq, Real.sqrt_mul (div_nonneg hA hB'.le), Real.sqrt_sq hB'.le]
167 
168/-- Expansion of the centered row-length square sum. -/
169theorem centered_square_sum {ι : Type*} (S : Finset ι) (x : ι → ℝ) (c : ℝ) :
170    (∑ i ∈ S, (x i - c) ^ 2) =
171      (∑ i ∈ S, (x i) ^ 2) - 2 * c * (∑ i ∈ S, x i) + S.card * c ^ 2 := by
172  simp only [sub_sq, Finset.sum_add_distrib, Finset.sum_sub_distrib,
173    Finset.sum_const, nsmul_eq_mul]
174  rw [← Finset.sum_mul, ← Finset.mul_sum]
175  ring
176 
177/-- If the row lengths sum to `N`, centering them at `N/r` removes
178exactly `N²/r` from their square sum. -/
179theorem centered_square_sum_eq {ι : Type*} (S : Finset ι)
180    (x : ι → ℝ) (N r : ℝ) (hr : r ≠ 0) (hcard : (S.card : ℝ) = r)
181    (hsum : ∑ i ∈ S, x i = N) :
182    (∑ i ∈ S, (x i - N / r) ^ 2) = (∑ i ∈ S, (x i) ^ 2) - N ^ 2 / r := by
183  rw [centered_square_sum, hsum, hcard]
184  field_simp
185  ring
186 
187/-- Ordered row lengths make every positive-root gap nonnegative. -/
188theorem root_gap_sum_nonneg {ι : Type*} (S : Finset (ι × ι)) (x : ι → ℝ)
189    (horder : ∀ ij ∈ S, x ij.2 ≤ x ij.1) :
190    0 ≤ ∑ ij ∈ S, (x ij.1 - x ij.2) :=
191  Finset.sum_nonneg (fun ij hij => sub_nonneg.mpr (horder ij hij))
192 
193/-- The sum over positive roots equals the linear term in the `U(r)`
194quadratic Casimir. Row indices here start at zero. -/
195theorem root_gap_sum_eq_linear (r : ℕ) (x : Fin r → ℝ) :
196    (∑ i, ∑ j ∈ Finset.Ioi i, (x i - x j)) =
197      ∑ i, x i * ((r : ℝ) - 1 - 2 * (i : ℕ)) := by
198  classical
199  have hIoi (i : Fin r) : Finset.Ioi i = Finset.univ.filter (fun j => i < j) := by
200    ext j
201    simp
202  have hIio (i : Fin r) : Finset.Iio i = Finset.univ.filter (fun j => j < i) := by
203    ext j
204    simp
205  have hswap : (∑ i, ∑ j ∈ Finset.Ioi i, x j) =
206      ∑ j, ∑ _i ∈ Finset.Iio j, x j := by
207    simp_rw [hIoi, hIio, Finset.sum_filter]
208    rw [Finset.sum_comm]
209  simp_rw [Finset.sum_sub_distrib]
210  rw [hswap, ← Finset.sum_sub_distrib]
211  apply Finset.sum_congr rfl
212  intro i _
213  simp only [Finset.sum_const, nsmul_eq_mul, Fin.card_Ioi, Fin.card_Iio]
214  have hir : (i : ℕ) ≤ r - 1 := Nat.le_sub_one_of_lt i.isLt
215  have hr : 1 ≤ r := Nat.succ_le_of_lt (Nat.zero_lt_of_lt i.isLt)
216  rw [Nat.cast_sub hir, Nat.cast_sub hr]
217  ring
218 
219/-- Exact algebraic identity for the Casimir eigenvalue in the manuscript.
220The representation-theoretic assertion that this polynomial *is* the
221Casimir eigenvalue is not required or asserted here. -/
222theorem casimir_polynomial_eq_centered (r : ℕ) (x : Fin r → ℝ) (N : ℝ)
223    (hr : 0 < r) (hsum : ∑ i, x i = N) :
224    (∑ i, x i * (x i + (r : ℝ) - 1 - 2 * (i : ℕ))) =
225      N ^ 2 / r + (∑ i, (x i - N / r) ^ 2) +
226        ∑ i, ∑ j ∈ Finset.Ioi i, (x i - x j) := by
227  rw [root_gap_sum_eq_linear]
228  have hc := centered_square_sum_eq Finset.univ x N (r : ℝ)
229    (Nat.cast_ne_zero.mpr (Nat.ne_of_gt hr)) (by simp) hsum
230  rw [hc]
231  have hexpand : (∑ i, x i * (x i + (r : ℝ) - 1 - 2 * (i : ℕ))) =
232      (∑ i, (x i) ^ 2) + ∑ i, x i * ((r : ℝ) - 1 - 2 * (i : ℕ)) := by
233    rw [← Finset.sum_add_distrib]
234    apply Finset.sum_congr rfl
235    intro i _
236    ring
237  rw [hexpand]
238  ring
239 
240/-- The second-moment estimate from the Casimir calculation. The two
241representation-theoretic identities are exposed as `hdecomp` and `htrace`;
242normalization and positivity then give the manuscript's constant exactly. -/
243theorem second_moment_le_of_casimir {ι : Type*} (S : Finset ι)
244    (p variance gap casimir : ι → ℝ) (N r : ℝ)
245    (hp : ∀ i ∈ S, 0 ≤ p i) (hnorm : ∑ i ∈ S, p i = 1)
246    (hgap : ∀ i ∈ S, 0 ≤ gap i)
247    (hdecomp : ∀ i ∈ S, casimir i = N ^ 2 / r + variance i + gap i)
248    (htrace : ∑ i ∈ S, p i * casimir i = N * r + N * (N - 1) / r) :
249    (∑ i ∈ S, p i * variance i) ≤ N * (r - 1 / r) := by
250  have hpoint : ∑ i ∈ S, p i * (N ^ 2 / r + variance i) ≤
251      ∑ i ∈ S, p i * casimir i := by
252    apply Finset.sum_le_sum
253    intro i hi
254    apply mul_le_mul_of_nonneg_left _ (hp i hi)
255    rw [hdecomp i hi]
256    exact le_add_of_nonneg_right (hgap i hi)
257  have hexpand : (∑ i ∈ S, p i * (N ^ 2 / r + variance i)) =
258      N ^ 2 / r + ∑ i ∈ S, p i * variance i := by
259    simp_rw [mul_add, Finset.sum_add_distrib, ← Finset.sum_mul, hnorm, one_mul]
260  rw [hexpand, htrace] at hpoint
261  have harith : N * r + N * (N - 1) / r - N ^ 2 / r = N * (r - 1 / r) := by
262    ring
263  linarith
264 
265/-- The flat Young-law second-moment bound. Apart from the distribution and
266partition hypotheses, the only imported representation-theoretic input is
267the Casimir expectation identity `htrace`. The polynomial decomposition
268and its nonnegative remainder are proved above. -/
269theorem flat_young_second_moment_bound {ι : Type*} (S : Finset ι)
270    (r : ℕ) (N : ℝ) (p : ι → ℝ) (row : ι → Fin r → ℝ)
271    (hr : 0 < r) (hp : ∀ μ ∈ S, 0 ≤ p μ) (hnorm : ∑ μ ∈ S, p μ = 1)
272    (hrowsum : ∀ μ ∈ S, ∑ i, row μ i = N)
273    (horder : ∀ μ ∈ S, ∀ i j, i ≤ j → row μ j ≤ row μ i)
274    (htrace :
275      (∑ μ ∈ S, p μ * (∑ i, row μ i * (row μ i + (r : ℝ) - 1 - 2 * (i : ℕ)))) =
276        N * r + N * (N - 1) / r) :
277    (∑ μ ∈ S, p μ * (∑ i, (row μ i - N / r) ^ 2)) ≤ N * (r - 1 / r) := by
278  apply second_moment_le_of_casimir S p
279    (fun μ => ∑ i, (row μ i - N / r) ^ 2)
280    (fun μ => ∑ i, ∑ j ∈ Finset.Ioi i, (row μ i - row μ j))
281    (fun μ => ∑ i, row μ i * (row μ i + (r : ℝ) - 1 - 2 * (i : ℕ)))
282    N r hp hnorm
283  · intro μ hμ
284    apply Finset.sum_nonneg
285    intro i _
286    apply Finset.sum_nonneg
287    intro j hj
288    exact sub_nonneg.mpr (horder μ hμ i j (Finset.mem_Ioi.mp hj).le)
289  · intro μ hμ
290    exact casimir_polynomial_eq_centered r (row μ) N hr (hrowsum μ hμ)
291  · exact htrace
292 
293end Cloning.Projector