MarginalPurity.lean
1module23public import SubentropyCertificates.QuantumEquality4public import D5.S3.Quantum.Information.InputInformationBalance56/-! Subentropy vanishes precisely on rank-one density matrices. We use the7spectral probability vector, so zero and repeated eigenvalues are allowed. -/8@[expose] public section9noncomputable section10set_option autoImplicit false11set_option backward.isDefEq.respectTransparency false12open Matrix13open scoped BigOperators MatrixOrder ComplexOrder14namespace SubentropyCertificates.Subadditivity15open D5.S3.Quantum.Foundation.FiniteStateChannel16open D5.S3.Quantum.Information.PartialTraceMutualInformation17open D5.S3.Quantum.Information.InputInformationBalance18open D5.S3.Quantum.Subentropy.Basic19open D5.S3.Quantum.Subentropy.DensityKernel20open SubentropyCertificates.ClassicalCurve21open SubentropyCertificates.QuantumEquality2223variable {D : Type*} [Fintype D] [DecidableEq D]2425theorem subentropy_of_spectrum {A : Matrix D D ℂ} (hA : A.IsHermitian) :26 matrixSubentropy A = classicalSubentropy hA.eigenvalues := by27 let U : Matrix D D ℂ := hA.eigenvectorUnitary28 have hd : A = U * diagonal (fun i => (hA.eigenvalues i : ℂ)) * U.conjTranspose :=29 hA.spectral_theorem30 exact (congrArg matrixSubentropy hd).trans31 (matrixSubentropy_isometric_embedding _ U (Unitary.coe_star_mul_self hA.eigenvectorUnitary))3233private theorem pointMass_iff_one_nonzero (p : D → ℝ) (hp : p ∈ probabilitySimplex D) :34 (∃ i, p = pointMass i) ↔ Fintype.card {i // p i ≠ 0} = 1 := by35 classical36 rw [Fintype.card_eq_one_iff]37 constructor38 · rintro ⟨i, rfl⟩39 refine ⟨⟨i, by simp [pointMass]⟩, ?_⟩40 intro j41 apply Subtype.ext42 by_contra h43 exact j.2 (by simp [pointMass, h])44 · rintro ⟨i, hi⟩45 have hzero (j : D) (hj : j ≠ i.val) : p j = 0 := by46 by_contra h47 exact hj (congrArg Subtype.val (hi ⟨j,h⟩))48 have hone : p i.val = 1 := by49 have hsum := Finset.sum_eq_single_of_mem i.val (Finset.mem_univ i.val) (fun j _ hj => hzero j hj)50 exact hsum.symm.trans hp.251 refine ⟨i.val, funext fun j => ?_⟩52 by_cases hj : j = i.val53 · simpa [pointMass, hj] using hone54 · simpa [pointMass, hj] using hzero j hj5556theorem matrixSubentropy_zero_iff_rank_one {A : Matrix D D ℂ} (hA : A.PosSemidef)57 (ht : A.trace = 1) : matrixSubentropy A = 0 ↔ A.rank = 1 := by58 rw [subentropy_of_spectrum hA.isHermitian, hA.isHermitian.rank_eq_card_non_zero_eigs,59 classical_zero_iff_pointMass _ (spectral_prob hA ht)]60 exact pointMass_iff_one_nonzero _ (spectral_prob hA ht)6162theorem subentropy_zero_iff_rank_one (ρ : DensityState D) :63 subentropy ρ = 0 ↔ (CStarMatrix.ofMatrix.symm ρ.1).rank = 1 :=64 matrixSubentropy_zero_iff_rank_one (density_posSemidef ρ) ρ.2.26566/-- The bundled pure-state predicate is an outer-product representation.67Trace one supplies normalization of its amplitude vector. -/68theorem subentropy_zero_iff_pure (ρ : DensityState D) : subentropy ρ = 0 ↔ IsPure ρ := by69 let A := CStarMatrix.ofMatrix.symm ρ.170 have hA := (density_posSemidef ρ).isHermitian71 constructor72 · intro hz73 change matrixSubentropy A = 0 at hz74 have hp := spectral_prob (density_posSemidef ρ) ρ.2.275 obtain ⟨i, he⟩ := (classical_zero_iff_pointMass _ hp).mp76 ((subentropy_of_spectrum hA).symm.trans hz)77 let U : Matrix D D ℂ := hA.eigenvectorUnitary78 have hs : A = U * diagonal (fun j => (hA.eigenvalues j : ℂ)) * U.conjTranspose :=79 hA.spectral_theorem80 refine ⟨fun j => U j i, ?_⟩81 intro a b82 change A a b = _83 rw [hs, he, Matrix.mul_apply, Finset.sum_eq_single i]84 · simp [pointMass, Matrix.mul_diagonal, Matrix.conjTranspose_apply]85 · intro j _ hj86 simp [pointMass, hj, Matrix.mul_diagonal]87 · simp88 · rintro ⟨v, hv⟩89 have he : A = vecMulVec v (star v) := Matrix.ext hv90 have ht : (vecMulVec v (star v)).trace = 1 := (congrArg Matrix.trace he).symm.trans ρ.2.291 change matrixSubentropy A = 092 rw [he]93 apply matrixSubentropy_pure94 simpa only [trace, diag_apply, vecMulVec_apply, Pi.star_apply, mul_comm] using ht9596theorem subentropy_nonnegative (ρ : DensityState D) : 0 ≤ subentropy ρ := by97 unfold subentropy98 rw [subentropy_of_spectrum (density_posSemidef ρ).isHermitian]99 exact classical_subentropy_nonneg _ (spectral_prob (density_posSemidef ρ) ρ.2.2)100101end SubentropyCertificates.Subadditivity
Axioms used
Choose a statement to see which axioms its proof uses.