Offline · exact source
Exact Lean source

MatrixPartialTraceCovariance

formalization/Cloning/MatrixPartialTraceCovariance.lean

Source hash: c4bdb815a3a29bb8f8558d75337cda5b0b700d3239c28e4c06db3f3636840d37

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.Compression
2 
3/-!
4# Covariance of the concrete finite-dimensional partial trace
5 
6The spectator unitary cancels under the partial trace. Consequently an
7intertwining isometry has a covariant range projection, whose partial trace
8commutes with the input representation. These are matrix identities and do not
9assume the dimension balance that Schur's lemma will subsequently provide.
10-/
11 
12noncomputable section
13 
14open scoped Matrix Kronecker
15 
16namespace Cloning.Compression
17 
18set_option linter.unusedSectionVars false
19 
20variable {A B C : Type*}
21variable [Fintype A] [Fintype B] [Fintype C]
22variable [DecidableEq A] [DecidableEq B] [DecidableEq C]
23 
24/-- Partial trace is equivariant under tensor conjugation; only the spectator
25factor needs to be unitary. -/
26theorem partialTrace_tensor_conjugation (U : Matrix A A ℂ) (W : Matrix B B ℂ)
27    (X : Matrix (A × B) (A × B) ℂ) (hW : W.conjTranspose * W = 1) :
28    partialTrace ((U ⊗ₖ W) * X * (U ⊗ₖ W).conjTranspose) =
29      U * partialTrace X * U.conjTranspose := by
30  apply Matrix.ext_iff_trace_mul_left.mpr
31  intro T
32  have htest : (U ⊗ₖ W).conjTranspose * (T ⊗ₖ (1 : Matrix B B ℂ)) *
33      (U ⊗ₖ W) = (U.conjTranspose * T * U) ⊗ₖ (1 : Matrix B B ℂ) := by
34    rw [Matrix.conjTranspose_kronecker, ← Matrix.mul_kronecker_mul,
35      ← Matrix.mul_kronecker_mul]
36    simp only [Matrix.mul_one, hW]
37  calc
38    _ = Matrix.trace ((T ⊗ₖ (1 : Matrix B B ℂ)) *
39        ((U ⊗ₖ W) * X * (U ⊗ₖ W).conjTranspose)) :=
40      (trace_tensor_pairing T _).symm
41    _ = Matrix.trace (((U ⊗ₖ W).conjTranspose *
42        (T ⊗ₖ (1 : Matrix B B ℂ)) * (U ⊗ₖ W)) * X) := by
43      rw [← Matrix.mul_assoc, ← Matrix.mul_assoc, Matrix.trace_mul_cycle]
44      simp only [Matrix.mul_assoc]
45    _ = Matrix.trace (((U.conjTranspose * T * U) ⊗ₖ (1 : Matrix B B ℂ)) * X) := by
46      rw [htest]
47    _ = Matrix.trace ((U.conjTranspose * T * U) * partialTrace X) :=
48      trace_tensor_pairing _ X
49    _ = Matrix.trace (T * (U * partialTrace X * U.conjTranspose)) := by
50      simp only [Matrix.mul_assoc]
51      rw [Matrix.trace_mul_comm U.conjTranspose]
52      simp only [Matrix.mul_assoc]
53 
54/-- Tensor covariance of the range operator follows from a unitary intertwiner.
55No isometry assumption on `V` is required for this identity. -/
56theorem intertwiner_range_conjugation (U : Matrix A A ℂ) (W : Matrix B B ℂ)
57    (Z : Matrix C C ℂ) (V : Matrix (A × B) C ℂ)
58    (hZ : Z * Z.conjTranspose = 1)
59    (hintertwine : (U ⊗ₖ W) * V = V * Z) :
60    (U ⊗ₖ W) * (V * V.conjTranspose) * (U ⊗ₖ W).conjTranspose =
61      V * V.conjTranspose := by
62  calc
63    _ = ((U ⊗ₖ W) * V) * ((U ⊗ₖ W) * V).conjTranspose := by
64      simp only [Matrix.conjTranspose_mul, Matrix.mul_assoc]
65    _ = (V * Z) * (V * Z).conjTranspose := by rw [hintertwine]
66    _ = V * (Z * Z.conjTranspose) * V.conjTranspose := by
67      simp only [Matrix.conjTranspose_mul, Matrix.mul_assoc]
68    _ = _ := by rw [hZ, Matrix.mul_one]
69 
70/-- The partially traced range operator is invariant under the first unitary. -/
71theorem partialTrace_intertwiner_invariant (U : Matrix A A ℂ) (W : Matrix B B ℂ)
72    (Z : Matrix C C ℂ) (V : Matrix (A × B) C ℂ)
73    (hW : W.conjTranspose * W = 1) (hZ : Z * Z.conjTranspose = 1)
74    (hintertwine : (U ⊗ₖ W) * V = V * Z) :
75    U * partialTrace (V * V.conjTranspose) * U.conjTranspose =
76      partialTrace (V * V.conjTranspose) := by
77  rw [← partialTrace_tensor_conjugation U W _ hW,
78    intertwiner_range_conjugation U W Z V hZ hintertwine]
79 
80/-- With a unitary first factor, invariance gives the commutation premise of
81Schur's lemma. -/
82theorem partialTrace_intertwiner_commutes (U : Matrix A A ℂ) (W : Matrix B B ℂ)
83    (Z : Matrix C C ℂ) (V : Matrix (A × B) C ℂ)
84    (hU : U.conjTranspose * U = 1) (hW : W.conjTranspose * W = 1)
85    (hZ : Z * Z.conjTranspose = 1)
86    (hintertwine : (U ⊗ₖ W) * V = V * Z) :
87    partialTrace (V * V.conjTranspose) * U = U * partialTrace (V * V.conjTranspose) := by
88  have h := congrArg (fun X => X * U)
89    (partialTrace_intertwiner_invariant U W Z V hW hZ hintertwine)
90  simpa only [Matrix.mul_assoc, hU, Matrix.mul_one] using h.symm
91 
92end Cloning.Compression