Offline · exact source
Exact Lean source

Compression

formalization/Cloning/Compression.lean

Source hash: 36f3f29b0e704bebf453f818ab78c092d80b91422a4cf52cd1832f1d3a960ffd

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.LinearAlgebra.Matrix.Kronecker
2import Mathlib.LinearAlgebra.Complex.Module
3import Mathlib.Tactic.FieldSimp
4import Mathlib.Tactic.Ring
5 
6/-!
7# Exact matrix algebra for rank compression
8 
9This file formalizes the algebraic insertion step in `channel-compression` of
10`cloning.tex`, using actual finite complex matrices and their conjugate transposes.
11The isometries and the Cartan restriction identity are explicit hypotheses.
12Their existence and the representation-theoretic proof of the restriction
13identity are outside this file. There is no hypothesis asserting the compression
14conclusion and no abstract axiom about quantum channels or fidelity.
15-/
16 
17noncomputable section
18open scoped Matrix Kronecker
19namespace Cloning.Compression
20 
21set_option linter.unusedSectionVars false
22 
23variable {A B C a b c : Type*}
24variable [Fintype A] [Fintype B] [Fintype C]
25variable [Fintype a] [Fintype b] [Fintype c]
26variable [DecidableEq A] [DecidableEq B] [DecidableEq C]
27variable [DecidableEq a] [DecidableEq b] [DecidableEq c]
28 
29/-- Compressing an embedded operator back through an isometry recovers it. -/
30lemma isometry_compress (J : Matrix A a ℂ) (X : Matrix a a ℂ)
31    (hJ : J.conjTranspose * J = 1) :
32    J.conjTranspose * (J * X * J.conjTranspose) * J = X := by
33  calc
34    _ = (J.conjTranspose * J) * X * (J.conjTranspose * J) := by
35      simp only [Matrix.mul_assoc]
36    _ = X := by rw [hJ]; simp
37 
38/-- The tensor-factor simplification used in rank compression. -/
39lemma tensor_compression (Ja : Matrix A a ℂ) (Jb : Matrix B b ℂ)
40    (X : Matrix a a ℂ)
41    (ha : Ja.conjTranspose * Ja = 1)
42    (hb : Jb.conjTranspose * Jb = 1) :
43    (Ja ⊗ₖ Jb).conjTranspose *
44      ((Ja * X * Ja.conjTranspose) ⊗ₖ (1 : Matrix B B ℂ)) * (Ja ⊗ₖ Jb) =
45        X ⊗ₖ (1 : Matrix b b ℂ) := by
46  rw [Matrix.conjTranspose_kronecker, ← Matrix.mul_kronecker_mul,
47    ← Matrix.mul_kronecker_mul]
48  rw [isometry_compress Ja X ha]
49  simp [hb]
50 
51/-- Algebraic consequence of the Cartan restriction identity `Vd Jc = (Ja ⊗ Jb) Vr`.
52This is the unscaled channel-compression identity. -/
53lemma cartan_compression (Ja : Matrix A a ℂ) (Jb : Matrix B b ℂ)
54    (Jc : Matrix C c ℂ) (Vd : Matrix (A × B) C ℂ) (Vr : Matrix (a × b) c ℂ)
55    (X : Matrix a a ℂ)
56    (ha : Ja.conjTranspose * Ja = 1)
57    (hb : Jb.conjTranspose * Jb = 1)
58    (hrestriction : Vd * Jc = (Ja ⊗ₖ Jb) * Vr) :
59    Jc.conjTranspose *
60      (Vd.conjTranspose * ((Ja * X * Ja.conjTranspose) ⊗ₖ (1 : Matrix B B ℂ)) * Vd)
61      * Jc = Vr.conjTranspose * (X ⊗ₖ (1 : Matrix b b ℂ)) * Vr := by
62  calc
63    _ = (Vd * Jc).conjTranspose *
64        ((Ja * X * Ja.conjTranspose) ⊗ₖ (1 : Matrix B B ℂ)) * (Vd * Jc) := by
65      simp only [Matrix.conjTranspose_mul, Matrix.mul_assoc]
66    _ = ((Ja ⊗ₖ Jb) * Vr).conjTranspose *
67        ((Ja * X * Ja.conjTranspose) ⊗ₖ (1 : Matrix B B ℂ)) *
68        ((Ja ⊗ₖ Jb) * Vr) := by rw [hrestriction]
69    _ = Vr.conjTranspose *
70        ((Ja ⊗ₖ Jb).conjTranspose *
71          ((Ja * X * Ja.conjTranspose) ⊗ₖ (1 : Matrix B B ℂ)) * (Ja ⊗ₖ Jb)) * Vr := by
72      simp only [Matrix.conjTranspose_mul, Matrix.mul_assoc]
73    _ = _ := by rw [tensor_compression Ja Jb X ha hb]
74 
75/-- The dimension-ratio coefficient in the paper. -/
76lemma dimension_ratio_identity (ad bd ar br : ℝ)
77    (hbd : bd ≠ 0) (har : ar ≠ 0) (hbr : br ≠ 0) :
78    ad / bd = ((ad / ar) / (bd / br)) * (ar / br) := by
79  field_simp
80 
81/-- The explicit Cartan-channel formula, before any channel-property assertions. -/
82def sectorMap (din dout : ℝ) (V : Matrix (A × B) C ℂ) (X : Matrix A A ℂ) :
83    Matrix C C ℂ :=
84  (din / dout) • (V.conjTranspose * (X ⊗ₖ (1 : Matrix B B ℂ)) * V)
85 
86/-- Exact rank compression including the paper's coefficient `Rμ/Rν`. -/
87lemma sectorMap_compression (Ja : Matrix A a ℂ) (Jb : Matrix B b ℂ)
88    (Jc : Matrix C c ℂ) (Vd : Matrix (A × B) C ℂ) (Vr : Matrix (a × b) c ℂ)
89    (X : Matrix a a ℂ) (ad bd ar br : ℝ)
90    (ha : Ja.conjTranspose * Ja = 1)
91    (hb : Jb.conjTranspose * Jb = 1)
92    (hrestriction : Vd * Jc = (Ja ⊗ₖ Jb) * Vr)
93    (hbd : bd ≠ 0) (har : ar ≠ 0) (hbr : br ≠ 0) :
94    Jc.conjTranspose * sectorMap ad bd Vd (Ja * X * Ja.conjTranspose) * Jc =
95      ((ad / ar) / (bd / br)) • sectorMap ar br Vr X := by
96  simp only [sectorMap, Matrix.mul_smul, Matrix.smul_mul]
97  rw [cartan_compression Ja Jb Jc Vd Vr X ha hb hrestriction]
98  rw [smul_smul, dimension_ratio_identity ad bd ar br hbd har hbr]
99 
100/-- Re-embedding the compressed block gives precisely the supported channel
101identity in equation `channel-compression`. -/
102lemma sectorMap_supported_compression (Ja : Matrix A a ℂ) (Jb : Matrix B b ℂ)
103    (Jc : Matrix C c ℂ) (Vd : Matrix (A × B) C ℂ) (Vr : Matrix (a × b) c ℂ)
104    (X : Matrix a a ℂ) (ad bd ar br : ℝ)
105    (ha : Ja.conjTranspose * Ja = 1)
106    (hb : Jb.conjTranspose * Jb = 1)
107    (hrestriction : Vd * Jc = (Ja ⊗ₖ Jb) * Vr)
108    (hbd : bd ≠ 0) (har : ar ≠ 0) (hbr : br ≠ 0) :
109    (Jc * Jc.conjTranspose) * sectorMap ad bd Vd (Ja * X * Ja.conjTranspose) *
110      (Jc * Jc.conjTranspose) =
111      ((ad / ar) / (bd / br)) • (Jc * sectorMap ar br Vr X * Jc.conjTranspose) := by
112  calc
113    _ = Jc * (Jc.conjTranspose * sectorMap ad bd Vd
114        (Ja * X * Ja.conjTranspose) * Jc) * Jc.conjTranspose := by
115      simp only [Matrix.mul_assoc]
116    _ = _ := by
117      rw [sectorMap_compression Ja Jb Jc Vd Vr X ad bd ar br ha hb
118        hrestriction hbd har hbr]
119      simp only [Matrix.mul_smul, Matrix.smul_mul]
120 
121/-- The support operator is an orthogonal projection for an isometric inclusion. -/
122lemma support_projection (J : Matrix A a ℂ) (hJ : J.conjTranspose * J = 1) :
123    (J * J.conjTranspose).conjTranspose = J * J.conjTranspose ∧
124      (J * J.conjTranspose) * (J * J.conjTranspose) = J * J.conjTranspose := by
125  constructor
126  · simp
127  · calc
128      _ = J * (J.conjTranspose * J) * J.conjTranspose := by
129        simp only [Matrix.mul_assoc]
130      _ = _ := by rw [hJ]; simp
131 
132/-- Trace is preserved by an isometric embedding. This is the normalization
133step after Schur--Weyl naturality identifies the unnormalized support blocks. -/
134lemma trace_isometric_embedding (J : Matrix A a ℂ) (X : Matrix a a ℂ)
135    (hJ : J.conjTranspose * J = 1) :
136    Matrix.trace (J * X * J.conjTranspose) = Matrix.trace X := by
137  rw [Matrix.trace_mul_cycle, hJ, Matrix.one_mul]
138 
139/-- Algebraic normalization by trace (defined also at trace zero). -/
140def normalize (X : Matrix A A ℂ) : Matrix A A ℂ :=
141  (Matrix.trace X)⁻¹ • X
142 
143/-- The conditional-support identity after dividing the representation blocks
144by their Schur-polynomial traces. -/
145lemma normalize_isometric_embedding (J : Matrix A a ℂ) (X : Matrix a a ℂ)
146    (hJ : J.conjTranspose * J = 1) :
147    normalize (J * X * J.conjTranspose) = J * normalize X * J.conjTranspose := by
148  simp only [normalize, trace_isometric_embedding J X hJ,
149    Matrix.mul_smul, Matrix.smul_mul]
150 
151/-- The Cartan formula sends the maximally mixed input to the maximally mixed
152output whenever its defining inclusion is isometric. -/
153lemma sectorMap_maximally_mixed (V : Matrix (A × B) C ℂ)
154    (din dout : ℝ) (hdin : din ≠ 0) (hV : V.conjTranspose * V = 1) :
155    sectorMap din dout V ((1 / din) • (1 : Matrix A A ℂ)) =
156      (1 / dout) • (1 : Matrix C C ℂ) := by
157  unfold sectorMap
158  rw [Matrix.smul_kronecker, Matrix.one_kronecker_one, Matrix.mul_smul,
159    Matrix.smul_mul, Matrix.mul_one, hV, smul_smul]
160  congr 1
161  field_simp
162 
163/-- Partial trace over the second finite matrix index. -/
164def partialTrace (Y : Matrix (A × B) (A × B) ℂ) : Matrix A A ℂ :=
165  fun i j => ∑ k, Y (i, k) (j, k)
166 
167/-- Defining trace-pairing identity for the finite-dimensional partial trace. -/
168lemma trace_tensor_pairing (X : Matrix A A ℂ) (Y : Matrix (A × B) (A × B) ℂ) :
169    Matrix.trace ((X ⊗ₖ (1 : Matrix B B ℂ)) * Y) =
170      Matrix.trace (X * partialTrace Y) := by
171  simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.kronecker_apply,
172    Matrix.one_apply, partialTrace, Fintype.sum_prod_type, Finset.mul_sum]
173  simp only [mul_ite, mul_one, mul_zero, ite_mul, zero_mul]
174  simp only [Finset.sum_ite_eq, Finset.mem_univ, if_true]
175  apply Finset.sum_congr rfl
176  intro i _
177  exact Finset.sum_comm
178 
179/-- The partial-trace balance obtained from Schur's lemma implies trace
180preservation of the explicit Cartan-sector formula. -/
181lemma sectorMap_trace_preserving (V : Matrix (A × B) C ℂ)
182    (X : Matrix A A ℂ) (din dout : ℝ) (hdin : din ≠ 0) (hdout : dout ≠ 0)
183    (hbalance : partialTrace (V * V.conjTranspose) = (dout / din) • (1 : Matrix A A ℂ)) :
184    Matrix.trace (sectorMap din dout V X) = Matrix.trace X := by
185  unfold sectorMap
186  rw [Matrix.trace_smul, Matrix.trace_mul_cycle]
187  rw [Matrix.trace_mul_comm]
188  rw [trace_tensor_pairing, hbalance, Matrix.mul_smul, Matrix.mul_one,
189    Matrix.trace_smul, smul_smul]
190  have hcoef : din / dout * (dout / din) = 1 := by field_simp
191  rw [hcoef, one_smul]
192 
193end Cloning.Compression