Offline · exact source
Exact Lean source

PCTRankPurificationVectorization

formalization/Cloning/PCTRankPurificationVectorization.lean

Source hash: 1686aa6cab1c6d3a9368cbe29ea585af0bd7f6525847153fd47d6ec674859f98

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.PCTRankPurificationMoment
2import Cloning.PCTRankPurificationBlockAlgebra
3import Cloning.TensorSchurHaarOrthogonality
4 
5/-! Finite coefficient tests for equality of rectangular Haar moments. -/
6noncomputable section
7open scoped BigOperators Classical Matrix Kronecker Matrix.Norms.L2Operator
8open Matrix MeasureTheory
9namespace Cloning.PCTRankPurification
10open Cloning.PCTPurificationChannel Cloning.TensorLie
11set_option backward.isDefEq.respectTransparency false
12set_option maxHeartbeats 1400000
13variable {A B I J : Type*} [Fintype A] [Fintype B] [Fintype I] [Fintype J]
14  [DecidableEq A] [DecidableEq B] [DecidableEq I] [DecidableEq J]
15 
16def matrixVector (T : Matrix A B ℂ) : A×B → ℂ := fun ab => T ab.1 ab.2
17 
18def matrixMoment (T : Matrix A B ℂ) : Matrix (A×B) (A×B) ℂ :=
19  Matrix.vecMulVec (matrixVector T) (star (matrixVector T))
20 
21@[simp] theorem matrixMoment_apply (T : Matrix A B ℂ) (a c : A) (b d : B) :
22    matrixMoment T (a,b) (c,d)=T a b*star (T c d) := rfl
23 
24theorem matrixVector_mul (L : Matrix I A ℂ) (T : Matrix A B ℂ) (R : Matrix B J ℂ) :
25    matrixVector (L*T*R)=(L⊗ₖRᵀ)*ᵥmatrixVector T := by
26  funext ⟨i,j⟩
27  simp only [matrixVector,Matrix.mul_apply,Matrix.mulVec,dotProduct,
28    Matrix.kronecker_apply,Matrix.transpose_apply,Fintype.sum_prod_type]
29  simp_rw [Finset.sum_mul]
30  rw [Finset.sum_comm]
31  apply Finset.sum_congr rfl
32  intro a _
33  apply Finset.sum_congr rfl
34  intro b _
35  ring
36 
37theorem matrixMoment_mul (L : Matrix I A ℂ) (T : Matrix A B ℂ) (R : Matrix B J ℂ) :
38    matrixMoment (L*T*R)=(L⊗ₖRᵀ)*matrixMoment T*(L⊗ₖRᵀ)ᴴ := by
39  unfold matrixMoment
40  rw [matrixVector_mul,Matrix.mul_vecMulVec,Matrix.vecMulVec_mul,
41    Matrix.vecMul_conjTranspose,star_star]
42 
43variable {S T : Type*} [MeasurableSpace S] [MeasurableSpace T]
44 
45def matrixMomentIntegral (μ : Measure S) (f : S → Matrix A B ℂ) :=
46  ∫ u, matrixMoment (f u) ∂μ
47 
48theorem matrixMomentIntegral_apply (μ : Measure S) (f : S → Matrix A B ℂ)
49    (hf : Integrable (fun u => matrixMoment (f u)) μ) (a c : A) (b d : B) :
50    matrixMomentIntegral μ f (a,b) (c,d)=∫u,f u a b*star (f u c d) ∂μ := by
51  exact ((matrixEntryCLM (a,b) (c,d)).integral_comp_comm hf).symm
52 
53theorem matrixMomentIntegral_mul (μ : Measure S) (f : S → Matrix A B ℂ)
54    (hf : Integrable (fun u => matrixMoment (f u)) μ)
55    (L : Matrix I A ℂ) (R : Matrix B J ℂ) :
56    matrixMomentIntegral μ (fun u => L*f u*R)=
57      (L⊗ₖRᵀ)*matrixMomentIntegral μ f*(L⊗ₖRᵀ)ᴴ := by
58  simpa only [matrixMomentIntegral,matrixMoment_mul] using
59    (rectangularSandwichCLM (L⊗ₖRᵀ)).integral_comp_comm hf
60 
61theorem integrable_matrixMoment_mul (μ : Measure S) (f : S → Matrix A B ℂ)
62    (hf : Integrable (fun u => matrixMoment (f u)) μ)
63    (L : Matrix I A ℂ) (R : Matrix B J ℂ) :
64    Integrable (fun u => matrixMoment (L*f u*R)) μ := by
65  simpa only [matrixMoment_mul] using
66    (rectangularSandwichCLM (L⊗ₖRᵀ)).integrable_comp hf
67 
68/-- Equality of second moments in any complete pair of coordinate frames
69implies literal equality of the original bipartite matrices. -/
70theorem matrixMomentIntegral_eq_of_frame_coefficients
71    (μ : Measure S) (ν : Measure T) (f : S → Matrix A B ℂ) (g : T → Matrix A B ℂ)
72    (hf : Integrable (fun u => matrixMoment (f u)) μ)
73    (hg : Integrable (fun u => matrixMoment (g u)) ν)
74    (F : Matrix A I ℂ) (G : Matrix B J ℂ) (hF : F*Fᴴ=1) (hG : G*Gᴴ=1)
75    (hcoeff : ∀ i k j l,
76      (∫u,(Fᴴ*f u*G) i j*star ((Fᴴ*f u*G) k l) ∂μ)=
77      ∫v,(Fᴴ*g v*G) i j*star ((Fᴴ*g v*G) k l) ∂ν) :
78    matrixMomentIntegral μ f=matrixMomentIntegral ν g := by
79  have he : matrixMomentIntegral μ (fun u => Fᴴ*f u*G)=
80      matrixMomentIntegral ν (fun v => Fᴴ*g v*G) := by
81    ext ⟨i,j⟩ ⟨k,l⟩
82    rw [matrixMomentIntegral_apply _ _ (integrable_matrixMoment_mul _ _ hf _ _),
83      matrixMomentIntegral_apply _ _ (integrable_matrixMoment_mul _ _ hg _ _)]
84    exact hcoeff i k j l
85  have he' := congrArg (fun X => (F⊗ₖGᴴᵀ)*X*(F⊗ₖGᴴᵀ)ᴴ) he
86  dsimp only at he'
87  rw [← matrixMomentIntegral_mul μ (fun u => Fᴴ*f u*G) (integrable_matrixMoment_mul _ _ hf _ _) F Gᴴ,
88    ← matrixMomentIntegral_mul ν (fun u => Fᴴ*g u*G) (integrable_matrixMoment_mul _ _ hg _ _) F Gᴴ] at he'
89  have hrec (X : Matrix A B ℂ) : F*(Fᴴ*X*G)*Gᴴ=X := by
90    calc
91      _=(F*Fᴴ)*X*(G*Gᴴ) := by simp only [Matrix.mul_assoc]
92      _=X := by rw [hF,hG,Matrix.one_mul,Matrix.mul_one]
93  simpa only [hrec] using he'
94 
95@[simp] theorem rectangularMoment_eq_matrixMoment (n : ℕ) (X : Matrix A B ℂ) :
96    rectangularMoment n X=matrixMoment (tensorPower n X) := rfl
97 
98end Cloning.PCTRankPurification