Offline · exact source
Exact Lean source

WeylQuantumPositiveBlocks

formalization/Cloning/WeylQuantumPositiveBlocks.lean

Source hash: a3b5f158a88073936b37a73d4bd673286a9ac7cd4044cf16822339f336ef2814

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.HeisenbergDual
2import Cloning.InfiniteIsometricChannel
3import Cloning.WeylQuantumPositive
4import Mathlib.Analysis.InnerProductSpace.PiL2
5 
6/-! The duality between positive bounded-operator blocks and positive
7trace-class blocks. Finite ancillas are realized as actual Hilbert direct
8sums, so positivity here includes all entangled finite-ancilla tests. -/
9 
10noncomputable section
11open scoped ComplexOrder InnerProductSpace BigOperators
12 
13namespace Cloning.InfiniteTraceClass
14set_option backward.isDefEq.respectTransparency false
15set_option maxHeartbeats 1200000
16 
17variable {H K : Type*}
18  [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H]
19  [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K]
20 
21/-- Rectangular trace duality for a conjugation between different Hilbert spaces. -/
22theorem tracePairing_conjugation (V : H →L[ℂ] K) (T : TraceClass H)
23    (A : K →L[ℂ] K) :
24    tracePairing (conjugationLinearMap V T) A =
25      tracePairing T (V.adjoint.comp (A.comp V)) := by
26  let f : TraceClass H →ₗ[ℂ] ℂ :=
27    (tracePairingCLM.flip A).toLinearMap.comp (conjugationLinearMap V)
28  let g : TraceClass H →ₗ[ℂ] ℂ :=
29    (tracePairingCLM.flip (V.adjoint.comp (A.comp V))).toLinearMap
30  have hpos (S : TraceClass H) (hS : 0 ≤ S.1) : f S = g S := by
31    obtain ⟨w, b, _⟩ := exists_hilbertBasis ℂ H
32    have hf := (conjugationLinearMap_positive_hasSum V S hS b).mapL (tracePairingCLM.flip A)
33    have hg := (positive_rankOne_series hS S.2 b).mapL
34      (tracePairingCLM.flip (V.adjoint.comp (A.comp V)))
35    have heq : (fun i : w => tracePairing (vectorProjector (V (CFC.sqrt S.1 (b i)))) A) =
36        (fun i : w => tracePairing (vectorProjector (CFC.sqrt S.1 (b i)))
37          (V.adjoint.comp (A.comp V))) := by
38      funext i
39      change tracePairing (rankOneOperator _ _) _ = tracePairing (rankOneOperator _ _) _
40      simp only [tracePairing_rankOneOperator, ContinuousLinearMap.comp_apply,
41        ContinuousLinearMap.adjoint_inner_right]
42    exact (show HasSum _ (f S) from hf).unique (heq ▸ (show HasSum _ (g S) from hg))
43  have hsa (S : TraceClass H) (hS : IsSelfAdjoint S.1) : f S = g S := by
44    rw [← TraceClass.positivePart_sub_negativePart S hS, map_sub, map_sub,
45      hpos _ (TraceClass.positivePart_nonneg S hS),
46      hpos _ (TraceClass.negativePart_nonneg S hS)]
47  change f T = g T
48  rw [← TraceClass.realComponent_add_I_smul_imaginaryComponent T,
49    map_add, map_add, map_smul, map_smul,
50    hsa _ (TraceClass.realComponent_isSelfAdjoint T),
51    hsa _ (TraceClass.imaginaryComponent_isSelfAdjoint T)]
52 
53/-- A rectangular sandwich with distinct left and right factors, constructed
54inside the genuine trace-class space by complex polarization. -/
55def rectangularSandwich (V W : H →L[ℂ] K) (T : TraceClass H) : TraceClass K :=
56  (1 / 4 : ℂ) • (conjugationLinearMap (V + W) T - conjugationLinearMap (V - W) T +
57    Complex.I • (conjugationLinearMap (V + Complex.I • W) T -
58      conjugationLinearMap (V - Complex.I • W) T))
59 
60theorem rectangularSandwich_coe (V W : H →L[ℂ] K) (T : TraceClass H) :
61    (rectangularSandwich V W T).1 = V.comp (T.1.comp W.adjoint) := by
62  change inclusionCLM (rectangularSandwich V W T) = _
63  simp only [rectangularSandwich, map_smul, map_add, map_sub,
64    inclusionCLM_apply, conjugationLinearMap_coe]
65  ext x
66  simp only [ContinuousLinearMap.smul_apply,
67    ContinuousLinearMap.add_apply, ContinuousLinearMap.sub_apply,
68    operatorConjugation_apply, ContinuousLinearMap.comp_apply]
69  have hI : (Complex.I • W).adjoint = -Complex.I • W.adjoint := by
70    simpa using (map_smulₛₗ (ContinuousLinearMap.adjoint (𝕜 := ℂ)) Complex.I W)
71  simp only [map_add, map_sub, hI, ContinuousLinearMap.add_apply,
72    ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, map_smul]
73  match_scalars <;> ring_nf <;> norm_num [Complex.I_sq]
74 
75/-- Full rectangular cyclicity for the analytic trace pairing. -/
76theorem tracePairing_rectangularSandwich (V W : H →L[ℂ] K) (T : TraceClass H)
77    (A : K →L[ℂ] K) :
78    tracePairing (rectangularSandwich V W T) A =
79      tracePairing T (W.adjoint.comp (A.comp V)) := by
80  change (tracePairingCLM.flip A) (rectangularSandwich V W T) = _
81  simp only [rectangularSandwich, map_smul, map_add, map_sub,
82    ContinuousLinearMap.flip_apply, tracePairingCLM_apply, tracePairing_conjugation]
83  rw [← (tracePairing T).map_sub, ← (tracePairing T).map_sub,
84    ← (tracePairing T).map_smul, ← (tracePairing T).map_add, ← (tracePairing T).map_smul]
85  congr 1
86  ext x
87  simp only [ContinuousLinearMap.smul_apply, ContinuousLinearMap.add_apply,
88    ContinuousLinearMap.sub_apply, ContinuousLinearMap.comp_apply]
89  have hI : (Complex.I • W).adjoint = -Complex.I • W.adjoint := by
90    simpa using (map_smulₛₗ (ContinuousLinearMap.adjoint (𝕜 := ℂ)) Complex.I W)
91  simp only [map_add, map_sub, hI, ContinuousLinearMap.add_apply,
92    ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, map_smul]
93  match_scalars <;> ring_nf <;> norm_num [Complex.I_sq]
94 
95variable {ι : Type*} [Fintype ι] [DecidableEq ι]
96 
97/-- The actual finite Hilbert direct sum used for an ancilla. -/
98abbrev BlockHilbert (ι : Type*) (H : Type*) [Fintype ι]
99    [NormedAddCommGroup H] := PiLp 2 (fun _ : ι => H)
100 
101/-- Coordinate injection into the finite Hilbert direct sum. -/
102def blockInjection (i : ι) : H →L[ℂ] BlockHilbert ι H :=
103  (PiLp.continuousLinearEquiv 2 ℂ (fun _ : ι => H)).symm.toContinuousLinearMap.comp
104    (ContinuousLinearMap.single ℂ (fun _ : ι => H) i)
105 
106@[simp] theorem blockInjection_apply (i j : ι) (x : H) :
107    blockInjection i x j = if j = i then x else 0 := by
108  simp [blockInjection, Pi.single_apply]
109 
110@[simp] theorem blockInjection_adjoint_apply (i : ι) (x : BlockHilbert ι H) :
111    (blockInjection i).adjoint x = x i := by
112  apply ext_inner_left ℂ
113  intro y
114  rw [ContinuousLinearMap.adjoint_inner_right]
115  simp only [PiLp.inner_apply, blockInjection_apply]
116  rw [Finset.sum_eq_single i]
117  · simp
118  · intro j _ hji
119    simp [hji]
120  · simp
121 
122/-- Bounded matrix action on the entire finite Hilbert direct sum. -/
123def blockOperator (A : ι → ι → H →L[ℂ] H) : BlockHilbert ι H →L[ℂ] BlockHilbert ι H :=
124  ∑ i, ∑ j, (blockInjection i).comp ((A i j).comp (blockInjection j).adjoint)
125 
126theorem blockOperator_apply (A : ι → ι → H →L[ℂ] H) (x : BlockHilbert ι H) (i : ι) :
127    blockOperator A x i = ∑ j, A i j (x j) := by
128  simp [blockOperator, ContinuousLinearMap.sum_apply, WithLp.ofLp_sum,
129    ContinuousLinearMap.comp_apply, blockInjection_apply]
130 
131theorem blockOperator_quadratic (A : ι → ι → H →L[ℂ] H) (x : BlockHilbert ι H) :
132    ⟪x, blockOperator A x⟫_ℂ = ∑ i, ∑ j, ⟪x i, A i j (x j)⟫_ℂ := by
133  simp only [PiLp.inner_apply, blockOperator_apply, inner_sum]
134 
135theorem blockOperator_nonneg (A : ι → ι → H →L[ℂ] H)
136    (hA : Cloning.BoundedOperator.BlockPositive A) : 0 ≤ blockOperator A := by
137  apply nonneg_of_inner_nonneg
138  intro x
139  rw [blockOperator_quadratic]
140  exact hA (fun i => x i)
141 
142@[simp] theorem blockOperator_compression (A : ι → ι → H →L[ℂ] H) (i j : ι) :
143    (blockInjection i).adjoint.comp ((blockOperator A).comp (blockInjection j)) = A i j := by
144  ext x
145  simp [ContinuousLinearMap.comp_apply, blockOperator_apply, blockInjection_apply, apply_ite]
146 
147/-- A finite trace-class block is trace class on the actual Hilbert direct sum. -/
148def traceClassBlock (B : ι → ι → TraceClass H) : TraceClass (BlockHilbert ι H) :=
149  ∑ i, ∑ j, rectangularSandwich (blockInjection i) (blockInjection j) (B i j)
150 
151theorem traceClassBlock_coe (B : ι → ι → TraceClass H) :
152    (traceClassBlock B).1 = blockOperator (fun i j => (B i j).1) := by
153  change (inclusionCLM (H := BlockHilbert ι H)) (traceClassBlock B) = _
154  simp only [traceClassBlock, map_sum, inclusionCLM_apply, rectangularSandwich_coe,
155    blockOperator]
156 
157theorem traceClassBlock_nonneg (B : ι → ι → TraceClass H) (hB : BlockPositive B) :
158    0 ≤ (traceClassBlock B).1 := by
159  rw [traceClassBlock_coe]
160  exact blockOperator_nonneg _ hB
161 
162/-- The exact block trace pairing, with the mandatory transposition of indices. -/
163theorem tracePairing_block (B : ι → ι → TraceClass H) (A : ι → ι → H →L[ℂ] H) :
164    tracePairing (traceClassBlock B) (blockOperator A) =
165      ∑ i, ∑ j, tracePairing (B j i) (A i j) := by
166  change ((tracePairingCLM (H := BlockHilbert ι H)).flip (blockOperator A))
167    (traceClassBlock B) = _
168  simp only [traceClassBlock, map_sum, ContinuousLinearMap.flip_apply,
169    tracePairingCLM_apply, tracePairing_rectangularSandwich, blockOperator_compression]
170  exact Finset.sum_comm
171 
172/-- Positive bounded and trace-class finite blocks have nonnegative dual
173pairing. Neither block is assumed diagonal or a simple tensor. -/
174theorem block_tracePairing_nonneg (B : ι → ι → TraceClass H)
175    (hB : BlockPositive B) (A : ι → ι → H →L[ℂ] H)
176    (hA : Cloning.BoundedOperator.BlockPositive A) :
177    0 ≤ ∑ i, ∑ j, tracePairing (B j i) (A i j) := by
178  rw [← tracePairing_block]
179  exact tracePairing_nonneg _ (traceClassBlock_nonneg B hB) _ (blockOperator_nonneg A hA)
180 
181end Cloning.InfiniteTraceClass