Offline · exact source
Exact Lean source

WernerPhysicalAgreement

formalization/Cloning/WernerPhysicalAgreement.lean

Source hash: d5984c79bb7c76dc14fc7360dd9b6df407d28a13878e25d886161966353e1323

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.WernerPhysicalChannel
2import Cloning.WernerPhysicalPullback
3import Mathlib.Data.Matrix.Basis
4import Cloning.InfiniteFiniteCorner
5 
6/-! # Agreement of the full Werner channel with the physical pure-output model
7 
8Computational operator matrices connect the full CPTP channel to the exact
9trace-class output already used in the general-dimensional thermal limit.
10-/
11noncomputable section
12set_option synthInstance.maxHeartbeats 200000
13set_option maxHeartbeats 1000000
14set_option backward.isDefEq.respectTransparency false
15open scoped BigOperators InnerProductSpace Matrix Kronecker ComplexOrder
16 
17namespace Cloning.GeneralSymmetricOccupation
18 
19/-- A constant computational word is the unique member of its occupation fiber. -/
20theorem label_eq_constant_iff {L d : ℕ} (w : Word L d) (a : Fin d) :
21    label w = label (fun _ : Fin L => a) ↔ w = fun _ => a := by
22  constructor
23  · intro h
24    obtain ⟨σ, hσ⟩ := (label_eq_iff_perm w (fun _ => a)).mp h
25    exact funext fun i => (hσ i).symm
26  · intro h
27    rw [h]
28 
29theorem multiplicity_constant (L d : ℕ) (a : Fin d) :
30    multiplicity (label (fun _ : Fin L => a)) = 1 := by
31  classical
32  unfold multiplicity
33  have hf : Finset.univ.filter (fun w : Word L d => label w = label (fun _ => a)) =
34      {fun _ : Fin L => a} := by
35    ext w
36    simp [label_eq_constant_iff]
37  rw [hf]
38  simp
39 
40theorem column_constant_apply (L d : ℕ) (a : Fin d) (w : Word L d) :
41    column (label (fun _ : Fin L => a)) w = if w = (fun _ => a) then 1 else 0 := by
42  simp [column_apply, multiplicity_constant, label_eq_constant_iff]
43 
44/-- The pure tensor input in the symmetric occupation register. -/
45def pureInputMatrix (n d : ℕ) (a : Fin d) :
46    Matrix (Occupation n d) (Occupation n d) ℂ :=
47  Matrix.single (label (fun _ : Fin n => a)) (label (fun _ : Fin n => a)) 1
48 
49theorem pureInputMatrix_embedded (n d : ℕ) (a : Fin d) :
50    columnMatrix n d * pureInputMatrix n d a * (columnMatrix n d).conjTranspose =
51      Matrix.single (fun _ : Fin n => a) (fun _ : Fin n => a) 1 := by
52  classical
53  ext w z
54  simp only [pureInputMatrix, Matrix.mul_apply, Matrix.conjTranspose_apply,
55    Matrix.single, Matrix.of_apply]
56  simp only [ite_and, mul_ite, mul_one, mul_zero, columnMatrix]
57  by_cases hw : w = (fun _ => a) <;> by_cases hz : z = (fun _ => a) <;>
58    simp [column_constant_apply, hw, hz, eq_comm]
59 
60/-- Computational matrix coefficients, using the actual word-concatenation equivalence. -/
61def pairOperatorMatrix {n r d : ℕ} (A : TensorSpace (n + r) d →L[ℂ] TensorSpace (n + r) d) :
62    Matrix (Word n d × Word r d) (Word n d × Word r d) ℂ :=
63  fun u v => A (lp.single 2 (wordPairEquiv n r d v) 1) (wordPairEquiv n r d u)
64 
65private theorem operator_apply_expansion {L d : ℕ}
66    (A : TensorSpace L d →L[ℂ] TensorSpace L d) (v : TensorSpace L d) (w : Word L d) :
67    A v w = ∑ z : Word L d, A (lp.single 2 z 1) w * v z := by
68  classical
69  have hv : v = ∑ z : Word L d, v z • (lp.single 2 z 1 : TensorSpace L d) := by
70    ext z
71    simp [lp.single_apply, Pi.single_apply]
72  conv_lhs => rw [hv]
73  simp [map_sum, map_smul, lp.coeFn_smul, mul_comm]
74 
75theorem pairOperatorMatrix_mul {n r d : ℕ}
76    (A B : TensorSpace (n + r) d →L[ℂ] TensorSpace (n + r) d) :
77    pairOperatorMatrix (n := n) (r := r) (A * B) = pairOperatorMatrix A * pairOperatorMatrix B := by
78  classical
79  ext u v
80  simp only [pairOperatorMatrix, ContinuousLinearMap.mul_apply, Matrix.mul_apply]
81  rw [operator_apply_expansion]
82  exact ((wordPairEquiv n r d).sum_comp (fun z =>
83    A (lp.single 2 z 1) (wordPairEquiv n r d u) *
84      B (lp.single 2 (wordPairEquiv n r d v) 1) z)).symm
85 
86theorem pairOperatorMatrix_smul {n r d : ℕ} (c : ℂ)
87    (A : TensorSpace (n + r) d →L[ℂ] TensorSpace (n + r) d) :
88    pairOperatorMatrix (n := n) (r := r) (c • A) = c • pairOperatorMatrix A := by
89  ext u v
90  rfl
91 
92theorem pairOperatorMatrix_projector (n r d : ℕ) :
93    pairOperatorMatrix (n := n) (r := r) (projector (n + r) d) =
94      splitSymmetricProjector n r d := by
95  classical
96  ext u v
97  simp only [pairOperatorMatrix, projector_apply, lp.coeFn_sum, Finset.sum_apply,
98    lp.coeFn_smul, Pi.smul_apply, smul_eq_mul, lp.inner_single_right,
99    RCLike.inner_apply, starRingEnd_apply, one_mul,
100    splitSymmetricProjector, Matrix.mul_apply, Matrix.conjTranspose_apply, splitColumnMatrix]
101  apply Finset.sum_congr rfl
102  intro q hq
103  exact mul_comm _ _
104 
105private theorem inputSlots_append_iff {n r d : ℕ} (w : Word n d) (z : Word r d) (a : Fin d) :
106    inputSlots n (n + r) (Nat.le_add_right n r) ⊆ letterSlots (Fin.append w z) a ↔
107      w = fun _ => a := by
108  constructor
109  · intro h
110    funext i
111    have hi : Fin.castAdd r i ∈ inputSlots n (n + r) (Nat.le_add_right n r) := by
112      rw [mem_inputSlots]
113      exact i.isLt
114    have hv := mem_letterSlots _ _ _ |>.mp (h hi)
115    simpa using hv
116  · intro h i hi
117    rw [mem_inputSlots] at hi
118    let j : Fin n := ⟨i.val, hi⟩
119    have he : i = Fin.castAdd r j := Fin.ext rfl
120    rw [he, mem_letterSlots]
121    simp [h]
122 
123theorem pairOperatorMatrix_fixedSlot (n r d : ℕ) (a : Fin d) :
124    pairOperatorMatrix (n := n) (r := r)
125      (fixedSlotProjector a (inputSlots n (n + r) (Nat.le_add_right n r))) =
126        (Matrix.single (fun _ : Fin n => a) (fun _ : Fin n => a) (1 : ℂ)) ⊗ₖ
127          (1 : Matrix (Word r d) (Word r d) ℂ) := by
128  classical
129  ext ⟨w, z⟩ ⟨w', z'⟩
130  simp only [pairOperatorMatrix, fixedSlotProjector_apply, lp.single_apply, Pi.single_apply,
131    Matrix.kronecker_apply, Matrix.single_apply, Matrix.one_apply]
132  have hc : inputSlots n (n + r) (Nat.le_add_right n r) ⊆
133      letterSlots (wordPairEquiv n r d (w, z)) a ↔ w = (fun _ => a) :=
134    inputSlots_append_iff w z a
135  simp only [hc, (wordPairEquiv n r d).injective.eq_iff]
136  by_cases hw : w = (fun _ => a) <;> by_cases hw' : w' = (fun _ => a) <;>
137    by_cases hz : z = z' <;> simp_all [Prod.mk.injEq, eq_comm]
138 
139/-- The full CPTP Werner channel on the reference pure input agrees exactly
140with the previous physical symmetric-sandwich operator. -/
141theorem wernerChannel_pure_agrees (n r s : ℕ) (a : Fin (s + 1)) :
142    splitColumnMatrix n r (s + 1) * (wernerChannel n r s).toFun
143      (pureInputMatrix n (s + 1) a) * (splitColumnMatrix n r (s + 1)).conjTranspose =
144        pairOperatorMatrix (n := n) (r := r)
145          (wernerOutputOperator a (inputSlots n (n + r) (Nat.le_add_right n r))) := by
146  rw [wernerChannel_physical_sandwich, pureInputMatrix_embedded, wernerOutputOperator,
147    pairOperatorMatrix_smul, pairOperatorMatrix_mul, pairOperatorMatrix_mul,
148    pairOperatorMatrix_projector, pairOperatorMatrix_fixedSlot,
149    occupation_card, occupation_card, inputSlots_card]
150  ext u v
151  simp [Matrix.smul_apply, Complex.real_smul, Complex.ofReal_div]
152 
153/-- Agreement with the actual trace-class output used in the thermal theorem. -/
154theorem wernerChannel_pure_traceClass_agrees (n r s : ℕ) :
155    splitColumnMatrix n r (s + 1) * (wernerChannel n r s).toFun
156      (pureInputMatrix n (s + 1) 0) * (splitColumnMatrix n r (s + 1)).conjTranspose =
157        pairOperatorMatrix (n := n) (r := r)
158          (wernerOutput (s := s) (inputSlots n (n + r) (Nat.le_add_right n r))).1 := by
159  rw [wernerOutput_op]
160  exact wernerChannel_pure_agrees n r s 0
161 
162end Cloning.GeneralSymmetricOccupation
163 
164namespace Cloning.GeneralSymmetricOccupation
165open Cloning.InfiniteTraceClass
166 
167/-- All computational matrix coefficients determine the bounded operator. -/
168theorem pairOperatorMatrix_injective (n r d : ℕ) :
169    Function.Injective (@pairOperatorMatrix n r d) := by
170  intro A B h
171  apply ContinuousLinearMap.ext
172  intro v
173  ext w
174  rw [operator_apply_expansion, operator_apply_expansion]
175  apply Finset.sum_congr rfl
176  intro z hz
177  obtain ⟨u, rfl⟩ := (wordPairEquiv n r d).surjective w
178  obtain ⟨t, rfl⟩ := (wordPairEquiv n r d).surjective z
179  have he := congrArg (fun M : Matrix (Word n d × Word r d) (Word n d × Word r d) ℂ => M u t) h
180  exact congrArg (fun c : ℂ => c * v (wordPairEquiv n r d t)) he
181 
182/-- A matrix lifted through the actual occupation basis has exactly the
183computational tensor matrix used in the full-channel sandwich theorem. -/
184theorem pairOperatorMatrix_ofMatrix {n r d : ℕ}
185    (X : Matrix (Occupation (n + r) d) (Occupation (n + r) d) ℂ) :
186    pairOperatorMatrix (n := n) (r := r)
187      (Cloning.InfiniteFiniteCorner.ofMatrix (@column (n + r) d) X) =
188        splitColumnMatrix n r d * X * (splitColumnMatrix n r d).conjTranspose := by
189  classical
190  ext u v
191  simp only [pairOperatorMatrix, Cloning.InfiniteFiniteCorner.ofMatrix_apply,
192    lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul,
193    lp.inner_single_right, RCLike.inner_apply, starRingEnd_apply, one_mul,
194    Matrix.mul_apply, Matrix.conjTranspose_apply, splitColumnMatrix, Finset.sum_mul]
195  rw [Finset.sum_comm]
196  apply Finset.sum_congr rfl
197  intro i hi
198  apply Finset.sum_congr rfl
199  intro j hj
200  ring
201 
202/-- Equality of actual trace-class operators: the full CPTP channel applied
203to the reference pure state is the physical output used in the thermal limit. -/
204theorem wernerChannel_pure_output (n r s : ℕ) :
205    Cloning.InfiniteFiniteCorner.matrixLift (@column (n + r) (s + 1))
206      ((wernerChannel n r s).toFun (pureInputMatrix n (s + 1) 0)) =
207        wernerOutput (s := s) (inputSlots n (n + r) (Nat.le_add_right n r)) := by
208  apply Subtype.ext
209  apply pairOperatorMatrix_injective n r (s + 1)
210  change pairOperatorMatrix (Cloning.InfiniteFiniteCorner.ofMatrix _ _) = _
211  rw [pairOperatorMatrix_ofMatrix]
212  exact wernerChannel_pure_traceClass_agrees n r s
213 
214end Cloning.GeneralSymmetricOccupation
215 
216namespace Cloning.GeneralSymmetricOccupation
217open Cloning.InfiniteTraceClass
218open scoped Topology
219open Filter
220 
221/-- End-to-end thermal limit of the fully constructed CPTP Werner channel,
222with actual trace-class output and an actual CPTP occupation pullback. -/
223theorem wernerChannel_thermal_limit {s : ℕ} (hs : 1 ≤ s)
224    (r : ℕ → ℕ) {γ : ℝ} (hγ : 1 < γ)
225    (h : Tendsto (fun n ↦ ((n + r n : ℕ) : ℝ) / n) atTop (𝓝 γ)) :
226    Tendsto (fun n ↦ (occupationRecovery (n + r n) s).toLinearMap
227      (Cloning.InfiniteFiniteCorner.matrixLift (@column (n + r n) (s + 1))
228        ((wernerChannel n (r n) s).toFun (pureInputMatrix n (s + 1) 0)))) atTop
229      (𝓝 (Cloning.InfiniteOccupationStates.thermalOperator (@numberVector s) γ)) := by
230  simp only [wernerChannel_pure_output]
231  exact physical_werner_thermal_limit hs (fun n => n + r n)
232    (fun n => Nat.le_add_right n (r n)) hγ h
233 
234end Cloning.GeneralSymmetricOccupation