Pratik Patil

SubadditivityGram.lean

1module23public import SubentropyCertificates.MarginalPurity4public import SubentropyCertificates.PosteriorRefinement5public import D5.S3.Quantum.Subentropy.EigenbasisBlocks67/-! The Gram matrix behind the subadditivity estimate. The square-root8factorization and the local unitary calculation below are adapted from9`cq_blocks_upper` and `subentropy_subadditive` in the Omega Institute's10Subadditivity.lean, revision d3e1e931e66ad4a3f54c95ef96cf723edcd7e79211(Apache-2.0). Keeping the Gram witness permits analysis of equality. -/12@[expose] public section13noncomputable section14set_option autoImplicit false15set_option backward.isDefEq.respectTransparency false16open Matrix17open scoped BigOperators ComplexOrder MatrixOrder Kronecker CStarAlgebra18namespace SubentropyCertificates.Subadditivity19open D5.S3.Quantum.Foundation.FiniteStateChannel20open D5.S3.Quantum.Information.PartialTraceMutualInformation21open D5.S3.Quantum.Subentropy.Basic22open D5.S3.Quantum.Subentropy.ClassicalQuantumGram23open D5.S3.Quantum.Subentropy.PinchingGap24open D5.S3.Quantum.Subentropy.EigenbasisBlocks25open SubentropyCertificates.ClassicalCurve26open SubentropyCertificates.MeasurementPosterior2728variable {X B : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]2930private theorem gram_of_blocks (Y : X → Matrix B B ℂ)31    (hY : ∀ x, (Y x).PosSemidef) (htr : (∑ x, Y x).trace = 1) :32    ∃ G : Matrix (X × B) (X × B) ℂ, G.PosSemidef ∧ G.trace = 1 ∧33      blockPinch G = (fun i j => if i.1 = j.1 then Y i.1 i.2 j.2 else 0) ∧34      matrixSubentropy G = matrixSubentropy (∑ x, Y x) ∧ labelMass G = fun x => (Y x).trace.re := by35  let V : Matrix B (X × B) ℂ := fun b i => CFC.sqrt (Y i.1) b i.236  have hs (x : X) : (CFC.sqrt (Y x)).conjTranspose = CFC.sqrt (Y x) := by37    simpa only [Matrix.star_eq_conjTranspose] using (CFC.sqrt_nonneg (Y x)).isSelfAdjoint.star_eq38  have hsq (x : X) : CFC.sqrt (Y x) * CFC.sqrt (Y x) = Y x :=39    CFC.sqrt_mul_sqrt_self _ (hY x).nonneg40  have hrow : V * V.conjTranspose = ∑ x, Y x := by41    ext b d42    simp only [Matrix.mul_apply, V, Matrix.conjTranspose_apply, Fintype.sum_prod_type,43      Matrix.sum_apply]44    apply Finset.sum_congr rfl45    intro x _46    change (CFC.sqrt (Y x) * (CFC.sqrt (Y x)).conjTranspose) b d = Y x b d47    rw [hs, hsq]48  have hp : blockPinch (V.conjTranspose * V) =49      (fun i j : X × B => if i.1 = j.1 then Y i.1 i.2 j.2 else 0) := by50    ext i j51    by_cases hij : i.1 = j.152    · simp only [blockPinch, hij, ite_true]53      change ((CFC.sqrt (Y i.1)).conjTranspose * CFC.sqrt (Y j.1)) i.2 j.2 = _54      rw [← hij, hs, hsq]55    · simp [blockPinch, hij]56  have ht : (V.conjTranspose * V).trace = 1 := by57    rw [Matrix.trace_mul_comm, hrow, htr]58  have hm : (V.conjTranspose * V).PosSemidef := Matrix.posSemidef_conjTranspose_mul_self V59  have hmass (x : X) : (∑ b, (V.conjTranspose * V) (x,b) (x,b)).re =60      (Y x).trace.re := by61    congr 162    apply Finset.sum_congr rfl63    intro b _64    have h := congrArg (fun N : Matrix (X × B) (X × B) ℂ => N (x,b) (x,b)) hp65    simpa only [blockPinch, ite_true, Matrix.diag_apply] using h66  exact ⟨_, hm, ht, hp, (matrixSubentropy_rectangular_gram V).trans (congrArg matrixSubentropy hrow),67    funext hmass⟩6869theorem exists_subadditivity_gram (ρ : DensityState (X × B)) (i₀ : X × B) :70    ∃ G : Matrix (X × B) (X × B) ℂ, G.PosSemidef ∧ G.trace = 1 ∧71      subentropy ρ ≤ matrixSubentropy (blockPinch G) ∧72      matrixSubentropy G = subentropy (marginalLeft ρ) ∧73      classicalSubentropy (labelMass G) = subentropy (marginalRight ρ) := by74  let M := CStarMatrix.ofMatrix.symm ρ.175  have hM := density_posSemidef ρ76  let hR := (partialTraceRight_posSemidef hM).isHermitian77  let U : Matrix X X ℂ := hR.eigenvectorUnitary78  let K := localConjugate U M79  let Y := fun x : X => K.submatrix (fun b => (x,b)) (fun b => (x,b))80  have hb := eigenbasis_blocks M hM81  change K.PosSemidef ∧ K.trace = M.trace ∧82    (∀ x, (Y x).PosSemidef) ∧ (∑ x, Y x) = partialTraceLeft M ∧83    (∀ x, (Y x).trace = (hR.eigenvalues x : ℂ)) ∧84    blockPinch K = (fun i j => if i.1 = j.1 then Y i.1 i.2 j.2 else 0) at hb85  have hKt : K.trace = 1 := hb.2.1.trans ρ.2.286  have hnonneg := (actual_pinching_gap_laws i₀).2 K hb.1 hKt87  have hYtr : (∑ x, Y x).trace = 1 := by88    rw [hb.2.2.2.1, trace_partialTraceLeft]89    exact ρ.2.290  obtain ⟨G,hG,ht,hpin,hleft,hmass⟩ := gram_of_blocks Y hb.2.2.1 hYtr91  have hQK : matrixSubentropy K = matrixSubentropy M := by92    have hiso : (U.conjTranspose ⊗ₖ (1 : Matrix B B ℂ)).conjTranspose *93        (U.conjTranspose ⊗ₖ (1 : Matrix B B ℂ)) = 1 := by94      simp only [Matrix.conjTranspose_kronecker, Matrix.conjTranspose_conjTranspose,95        Matrix.conjTranspose_one, ← Matrix.mul_kronecker_mul, Matrix.one_mul]96      rw [show U * U.conjTranspose = 1 from Unitary.coe_mul_star_self hR.eigenvectorUnitary,97        Matrix.one_kronecker_one]98    simpa only [K, localConjugate, Matrix.conjTranspose_kronecker,99      Matrix.conjTranspose_conjTranspose, Matrix.conjTranspose_one] using100      matrixSubentropy_isometric_embedding M (U.conjTranspose ⊗ₖ (1 : Matrix B B ℂ)) hiso101  refine ⟨G, hG, ht, ?_, ?_, ?_⟩102  · rw [← hb.2.2.2.2.2] at hpin103    rw [hpin]104    change matrixSubentropy M ≤ _105    rw [← hQK]106    exact sub_nonneg.mp hnonneg107  · rw [hb.2.2.2.1] at hleft108    exact hleft109  · have heig : labelMass G = hR.eigenvalues := by110      funext x111      exact (congrFun hmass x).trans (congrArg Complex.re (hb.2.2.2.2.1 x))112    rw [heig]113    exact (subentropy_of_spectrum hR).symm114115end SubentropyCertificates.Subadditivity

Axioms used

Choose a statement to see which axioms its proof uses.