Offline · exact source
Exact Lean source

BlockFidelity

formalization/Cloning/BlockFidelity.lean

Source hash: 4aac47f47ab57a8ca1b3e66ef369d25215173a297e701f120f978007ed1e3974

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.Tactic.Linarith
3import Mathlib.Tactic.Ring
4import Mathlib.Tactic.NormNum
5 
6/-!
7# The finite block-weight argument in cloning.tex
8 
9This file proves the classical and scalar analytic part of Lemma
10`lifted-fidelity-factorization`. `classicalAffinity` is the unsquared classical
11fidelity. The final bound has precisely the paper's `η + 2 * √ε` constant.
12 
13The exact finite-matrix direct-sum identity is proved separately in
14`Cloning.MatrixFidelityLifted`, and the positive-deletion estimate is proved in
15`Cloning.MatrixFidelityDeletion`. Both are instantiated in the concrete version
16`Cloning.MatrixFidelityAsymptotics`. This scalar module retains explicit
17interfaces; the uniform sector-mixture estimate remains an asymptotic input.
18This file alone does not establish the paper's asymptotic cloning theorem.
19-/
20 
21noncomputable section
22open scoped BigOperators
23namespace Cloning.BlockFidelity
24 
25variable {ι : Type*} [Fintype ι]
26 
27/-- Unsquared classical fidelity, also called the Hellinger affinity. -/
28def classicalAffinity (p q : ι → ℝ) : ℝ :=
29  ∑ i, Real.sqrt (p i) * Real.sqrt (q i)
30 
31lemma classicalAffinity_nonneg (p q : ι → ℝ) :
32    0 ≤ classicalAffinity p q := by
33  exact Finset.sum_nonneg fun _ _ => mul_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _)
34 
35lemma classicalAffinity_comm (p q : ι → ℝ) :
36    classicalAffinity p q = classicalAffinity q p := by
37  simp only [classicalAffinity, mul_comm]
38 
39lemma classicalAffinity_self (p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) :
40    classicalAffinity p p = ∑ i, p i := by
41  simp only [classicalAffinity, Real.mul_self_sqrt (hp _)]
42 
43lemma classicalAffinity_le_one (p q : ι → ℝ)
44    (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i)
45    (hps : ∑ i, p i ≤ 1) (hqs : ∑ i, q i ≤ 1) :
46    classicalAffinity p q ≤ 1 := by
47  have hCS := Real.sum_sqrt_mul_sqrt_le Finset.univ hp hq
48  calc
49    classicalAffinity p q ≤ Real.sqrt (∑ i, p i) * Real.sqrt (∑ i, q i) := hCS
50    _ ≤ 1 * 1 := mul_le_mul (Real.sqrt_le_one.mpr hps)
51      (Real.sqrt_le_one.mpr hqs) (Real.sqrt_nonneg _) (by norm_num)
52    _ = 1 := by ring
53 
54/-- The scalar square-root estimate needed when a nonnegative block is removed. -/
55lemma sqrt_sub_sqrt_le_sqrt_sub {x y : ℝ} (hy : 0 ≤ y) (hyx : y ≤ x) :
56    Real.sqrt x - Real.sqrt y ≤ Real.sqrt (x - y) := by
57  have hx : 0 ≤ x := le_trans hy hyx
58  have hd : 0 ≤ x - y := sub_nonneg.mpr hyx
59  have hx2 := Real.sq_sqrt hx
60  have hy2 := Real.sq_sqrt hy
61  have hd2 := Real.sq_sqrt hd
62  have hprod := mul_nonneg (Real.sqrt_nonneg y) (Real.sqrt_nonneg (x-y))
63  have hsx := Real.sqrt_nonneg x
64  have hsy := Real.sqrt_nonneg y
65  have hsd := Real.sqrt_nonneg (x-y)
66  nlinarith
67 
68lemma classicalAffinity_mono_left (q qG p : ι → ℝ)
69    (hle : ∀ i, qG i ≤ q i) :
70    classicalAffinity qG p ≤ classicalAffinity q p := by
71  exact Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_right
72    (Real.sqrt_le_sqrt (hle i)) (Real.sqrt_nonneg _)
73 
74/-- Removing total mass ε changes classical fidelity by at most √ε. -/
75lemma classicalAffinity_trim_bound (q qG p : ι → ℝ)
76    (hqG : ∀ i, 0 ≤ qG i) (hp : ∀ i, 0 ≤ p i)
77    (hle : ∀ i, qG i ≤ q i) (hps : ∑ i, p i = 1) :
78    |classicalAffinity q p - classicalAffinity qG p| ≤
79      Real.sqrt (∑ i, (q i - qG i)) := by
80  have hdiff : ∀ i, 0 ≤ q i - qG i := fun i => sub_nonneg.mpr (hle i)
81  rw [abs_of_nonneg (sub_nonneg.mpr (classicalAffinity_mono_left q qG p hle))]
82  calc
83    classicalAffinity q p - classicalAffinity qG p =
84        ∑ i, (Real.sqrt (q i) - Real.sqrt (qG i)) * Real.sqrt (p i) := by
85      simp [classicalAffinity, Finset.sum_sub_distrib, sub_mul]
86    _ ≤ ∑ i, Real.sqrt (q i - qG i) * Real.sqrt (p i) :=
87      Finset.sum_le_sum fun i _ => mul_le_mul_of_nonneg_right
88        (sqrt_sub_sqrt_le_sqrt_sub (hqG i) (hle i)) (Real.sqrt_nonneg _)
89    _ ≤ Real.sqrt (∑ i, (q i - qG i)) * Real.sqrt (∑ i, p i) := by
90      simpa using Real.sum_sqrt_mul_sqrt_le Finset.univ hdiff hp
91    _ = Real.sqrt (∑ i, (q i - qG i)) := by rw [hps, Real.sqrt_one, mul_one]
92 
93/-- A uniform estimate on the normalized sector fidelities passes through the
94classical block weights without increasing its error. -/
95lemma weighted_sector_error (p q f : ι → ℝ) (c η : ℝ)
96    (hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i)
97    (hps : ∑ i, p i ≤ 1) (hqs : ∑ i, q i ≤ 1)
98    (hη : 0 ≤ η) (herr : ∀ i, 0 < q i → |f i - c| ≤ η) :
99    |(∑ i, Real.sqrt (q i) * Real.sqrt (p i) * f i) -
100      c * classicalAffinity q p| ≤ η := by
101  have hw : ∀ i, 0 ≤ Real.sqrt (q i) * Real.sqrt (p i) :=
102    fun i => mul_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _)
103  calc
104    |(∑ i, Real.sqrt (q i) * Real.sqrt (p i) * f i) -
105        c * classicalAffinity q p| =
106        |∑ i, (Real.sqrt (q i) * Real.sqrt (p i)) * (f i - c)| := by
107      congr 1
108      rw [classicalAffinity, Finset.mul_sum, ← Finset.sum_sub_distrib]
109      apply Finset.sum_congr rfl
110      intro i _
111      ring
112    _ ≤ ∑ i, |(Real.sqrt (q i) * Real.sqrt (p i)) * (f i - c)| :=
113      Finset.abs_sum_le_sum_abs _ _
114    _ ≤ ∑ i, (Real.sqrt (q i) * Real.sqrt (p i)) * η := by
115      apply Finset.sum_le_sum
116      intro i _
117      rw [abs_mul, abs_of_nonneg (hw i)]
118      by_cases hpos : 0 < q i
119      · exact mul_le_mul_of_nonneg_left (herr i hpos) (hw i)
120      · have hz : q i = 0 := le_antisymm (le_of_not_gt hpos) (hq i)
121        simp [hz]
122    _ = classicalAffinity q p * η := by simp [classicalAffinity, Finset.sum_mul]
123    _ ≤ 1 * η := mul_le_mul_of_nonneg_right
124      (classicalAffinity_le_one q p hq hp hqs hps) hη
125    _ = η := one_mul _
126 
127/-- The finite quantitative estimate behind the lifted fidelity factorization.
128 
129`actual` denotes the full quantum fidelity, while `f` lists normalized retained
130sector fidelities. `hquantum` is exactly the consequence of quantum fidelity
131continuity after deleting positive blocks of the indicated total mass. The
132remaining classical continuity and summation steps are proved in this file. -/
133lemma lifted_factorization_bound (p q qG f : ι → ℝ) (actual c η : ℝ)
134    (hp : ∀ i, 0 ≤ p i) (hqG : ∀ i, 0 ≤ qG i)
135    (hle : ∀ i, qG i ≤ q i)
136    (hps : ∑ i, p i = 1) (hqs : ∑ i, q i ≤ 1)
137    (hc0 : 0 ≤ c) (hc1 : c ≤ 1) (hη : 0 ≤ η)
138    (hsector : ∀ i, 0 < qG i → |f i - c| ≤ η)
139    (hquantum : |actual - ∑ i, Real.sqrt (qG i) * Real.sqrt (p i) * f i| ≤
140      Real.sqrt (∑ i, (q i - qG i))) :
141    |actual - c * classicalAffinity q p| ≤
142      η + 2 * Real.sqrt (∑ i, (q i - qG i)) := by
143  have hqGs : ∑ i, qG i ≤ 1 := (Finset.sum_le_sum fun i _ => hle i).trans hqs
144  have hretained := weighted_sector_error p qG f c η hp hqG
145    (le_of_eq hps) hqGs hη hsector
146  have hlabel := classicalAffinity_trim_bound q qG p hqG hp hle hps
147  have hlabel' : |c * classicalAffinity qG p - c * classicalAffinity q p| ≤
148      Real.sqrt (∑ i, (q i - qG i)) := by
149    rw [← mul_sub, abs_mul, abs_of_nonneg hc0, abs_sub_comm]
150    exact (mul_le_mul_of_nonneg_left hlabel hc0).trans
151      (by simpa using (mul_le_mul_of_nonneg_right hc1
152        (Real.sqrt_nonneg (∑ i, (q i - qG i)))))
153  have htriangle := abs_sub_le actual
154    (∑ i, Real.sqrt (qG i) * Real.sqrt (p i) * f i)
155    (c * classicalAffinity qG p)
156  have htriangle' := abs_sub_le actual (c * classicalAffinity qG p)
157    (c * classicalAffinity q p)
158  linarith
159 
160end Cloning.BlockFidelity