ProjectionResolution.lean
1module23public import SubentropyCertificates.PinchingAlternatives45/-! Transport a finite orthogonal resolution to coordinate blocks by the6rectangular isometry whose x-th block row is the projection Pₓ. -/7@[expose] public section8noncomputable section9set_option autoImplicit false10set_option backward.isDefEq.respectTransparency false11open Matrix12open scoped BigOperators ComplexOrder MatrixOrder13namespace SubentropyCertificates.OrthogonalPinching14open D5.S3.Quantum.Subentropy.Basic15open D5.S3.Quantum.Subentropy.ClassicalQuantumGram16open SubentropyCertificates.PinchingEquality1718structure Resolution (X D : Type*) [Fintype X] [Fintype D] [DecidableEq D] where19 P : X → Matrix D D ℂ20 hermitian : ∀ x, (P x).IsHermitian21 idempotent : ∀ x, P x * P x = P x22 orthogonal : ∀ x y, x ≠ y → P x * P y = 023 complete : ∑ x, P x = 12425variable {X D : Type*} [Fintype X] [Fintype D] [DecidableEq D] (R : Resolution X D)2627def pinch (A : Matrix D D ℂ) := ∑ x, R.P x * A * R.P x2829def pinchingGain (A : Matrix D D ℂ) := matrixSubentropy (pinch R A) - matrixSubentropy A3031def embedding : Matrix (X × D) D ℂ := fun i j => R.P i.1 i.2 j3233def embed (A : Matrix D D ℂ) := embedding R * A * (embedding R).conjTranspose3435theorem embedding_isometry : (embedding R).conjTranspose * embedding R = 1 := by36 ext i j37 calc38 _ = ∑ x, (R.P x * R.P x) i j := by39 simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Fintype.sum_prod_type, embedding,40 (R.hermitian _).apply]41 _ = (∑ x, R.P x) i j := by simp only [R.idempotent, Matrix.sum_apply]42 _ = _ := congrFun₂ R.complete i j4344theorem embedding_inner (v w : D → ℂ) :45 amplitude (embedding R *ᵥ v) (embedding R *ᵥ w) = amplitude v w := by46 rw [amplitude, Matrix.star_mulVec, ← dotProduct_mulVec, mulVec_mulVec, embedding_isometry,47 one_mulVec, amplitude]4849theorem embed_projector (v : D → ℂ) :50 embed R (projector v) = projector (embedding R *ᵥ v) := by51 simp only [embed, projector, Matrix.mul_vecMulVec, Matrix.vecMulVec_mul, Matrix.star_mulVec]5253theorem embed_trace (A : Matrix D D ℂ) : (embed R A).trace = A.trace := by54 rw [embed, Matrix.trace_mul_cycle, embedding_isometry, Matrix.one_mul]5556theorem recover_embed (A : Matrix D D ℂ) :57 (embedding R).conjTranspose * embed R A * embedding R = A := by58 simp only [embed, Matrix.mul_assoc, embedding_isometry, Matrix.mul_one]59 rw [← Matrix.mul_assoc, embedding_isometry, Matrix.one_mul]6061theorem embed_injective : Function.Injective (embed R) := by62 intro A B h63 rw [← recover_embed R A, h, recover_embed]6465theorem embed_rank (A : Matrix D D ℂ) : (embed R A).rank = A.rank := by66 apply le_antisymm ((Matrix.rank_mul_le_left _ _).trans (Matrix.rank_mul_le_right _ _))67 calc68 A.rank = ((embedding R).conjTranspose * embed R A * embedding R).rank := by rw [recover_embed]69 _ ≤ (embed R A).rank := (Matrix.rank_mul_le_left _ _).trans (Matrix.rank_mul_le_right _ _)7071private theorem block_entry (A : Matrix D D ℂ) (x y : X) (i j : D) :72 embed R A (x,i) (y,j) = (R.P x * A * R.P y) i j := by73 simp only [embed, embedding, Matrix.mul_apply, Matrix.conjTranspose_apply, (R.hermitian _).apply]7475private theorem left_pinching (x : X) (A : Matrix D D ℂ) :76 R.P x * pinch R A = R.P x * A * R.P x := by77 classical78 rw [pinch, Matrix.mul_sum, Finset.sum_eq_single x]79 · rw [← Matrix.mul_assoc, ← Matrix.mul_assoc, R.idempotent]80 · intro y _ hy81 rw [← Matrix.mul_assoc, ← Matrix.mul_assoc, R.orthogonal x y hy.symm, Matrix.zero_mul,82 Matrix.zero_mul]83 · simp8485variable [DecidableEq X]8687theorem embed_pinch (A : Matrix D D ℂ) :88 embed R (pinch R A) = blockPinch (embed R A) := by89 ext ⟨x,i⟩ ⟨y,j⟩90 simp only [blockPinch, block_entry, left_pinching, Matrix.mul_assoc]91 by_cases h : x = y92 · subst y93 simp [R.idempotent]94 · simp [h, R.orthogonal x y h]9596theorem embed_gain (A : Matrix D D ℂ) : gain (embed R A) = pinchingGain R A := by97 unfold gain pinchingGain98 rw [← embed_pinch]99 simp only [embed, matrixSubentropy_isometric_embedding _ _ (embedding_isometry R)]100101omit [DecidableEq X] in102theorem support_iff (v : D → ℂ) (x : X) :103 (∀ k : X × D, k.1 ≠ x → (embedding R *ᵥ v) k = 0) ↔ R.P x *ᵥ v = v := by104 classical105 constructor106 · intro h107 have hsum := congrArg (fun M : Matrix D D ℂ => M *ᵥ v) R.complete108 simp only [Matrix.sum_mulVec, Matrix.one_mulVec] at hsum109 rw [Finset.sum_eq_single x] at hsum110 · exact hsum111 · intro y _ hy112 exact funext fun j => h (y,j) hy113 · simp114 · intro h115 rintro ⟨y,j⟩ hy116 change (R.P y *ᵥ v) j = 0117 conv_lhs => rw [← h, mulVec_mulVec, R.orthogonal y x hy, Matrix.zero_mulVec]118 rfl119120end SubentropyCertificates.OrthogonalPinching
Axioms used
Choose a statement to see which axioms its proof uses.