TriangleTheorem.lean
1module23public import SubentropyCertificates.SubadditivityTheorem4import all SubentropyCertificates.MarginalBounds56/-! The triangle inequality for quantum subentropy and its equality cases7(cor:triangle). Subadditivity on a complementary pair in a purification8determines equality in each of the two directed inequalities. -/9@[expose] public section10noncomputable section11set_option autoImplicit false12set_option backward.isDefEq.respectTransparency false13open Matrix14open scoped BigOperators ComplexOrder MatrixOrder15namespace SubentropyCertificates.Subadditivity16open D5.S3.Quantum.Foundation.FiniteStateChannel17open D5.S3.Quantum.Information.PartialTraceMutualInformation18open D5.S3.Quantum.Information.InputInformationBalance19open D5.S3.Quantum.Subentropy.Basic2021variable {X B C : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B]22 [Fintype C] [DecidableEq C]2324/-- For a factor of a density matrix on XB, the reshaped Gram matrix25represents the complementary state on XC. Apply subadditivity with equality26to XC and express purity through vanishing subentropy. -/27private theorem directed_equality_of_factor (R : Matrix (X × B) C ℂ)28 (ht : (R.conjTranspose * R).trace = 1) :29 matrixSubentropy (partialTraceLeft (R * R.conjTranspose)) =30 matrixSubentropy (partialTraceRight (R * R.conjTranspose)) +31 matrixSubentropy (R.conjTranspose * R) ↔32 matrixSubentropy (partialTraceRight (R * R.conjTranspose)) = 0 ∨33 matrixSubentropy (R.conjTranspose * R) = 0 := by34 let V : Matrix B (X × C) ℂ := fun b i => R (i.1,b) i.235 let G := V.conjTranspose * V36 have hrow : V * V.conjTranspose = partialTraceLeft (R * R.conjTranspose) := by37 ext b d38 simp [partialTraceLeft, Matrix.mul_apply, V, Fintype.sum_prod_type]39 have hC : partialTraceLeft G = R.conjTranspose * R := by40 ext c d41 simp [partialTraceLeft, G, V, Matrix.mul_apply, Fintype.sum_prod_type]42 have hX : partialTraceRight G = (partialTraceRight (R * R.conjTranspose)).transpose := by43 ext x y44 simp only [partialTraceRight, G, V, Matrix.mul_apply, Matrix.conjTranspose_apply,45 Matrix.transpose_apply]46 rw [Finset.sum_comm]47 apply Finset.sum_congr rfl48 intro b _49 apply Finset.sum_congr rfl50 intro c _51 ring52 have htr : G.trace = 1 := by rw [← trace_partialTraceLeft G, hC, ht]53 let σ : DensityState (X × C) := ⟨CStarMatrix.ofMatrix G,54 map_nonneg CStarMatrix.ofMatrixStarAlgEquiv (Matrix.posSemidef_conjTranspose_mul_self V).nonneg, htr⟩55 have h := (subadditivity_with_equality σ).256 simp only [← subentropy_zero_iff_pure] at h57 change matrixSubentropy (V.conjTranspose * V) =58 matrixSubentropy (partialTraceRight G) + matrixSubentropy (partialTraceLeft G) ↔59 matrixSubentropy (partialTraceRight G) = 0 ∨ matrixSubentropy (partialTraceLeft G) = 0 at h60 rwa [matrixSubentropy_rectangular_gram V, hrow, hX, hC, matrixSubentropy_transpose] at h6162/-- Equality in each directed bound singles out the marginal on the63right-hand side or the joint state. -/64theorem directed_triangle_equalities (ρ : DensityState (X × B)) :65 (subentropy (marginalLeft ρ) = subentropy (marginalRight ρ) + subentropy ρ ↔66 IsPure (marginalRight ρ) ∨ IsPure ρ) ∧67 (subentropy (marginalRight ρ) = subentropy (marginalLeft ρ) + subentropy ρ ↔68 IsPure (marginalLeft ρ) ∨ IsPure ρ) := by69 let M := CStarMatrix.ofMatrix.symm ρ.170 let R := CFC.sqrt M71 have hstar : R.conjTranspose = R := (CFC.sqrt_nonneg M).isSelfAdjoint.star_eq72 have hsq : R * R = M := CFC.sqrt_mul_sqrt_self _ (density_posSemidef ρ).nonneg73 have ht : (R.conjTranspose * R).trace = 1 := by rw [hstar, hsq]; exact ρ.2.274 let S : Matrix (B × X) (X × B) ℂ := fun i j => R (i.2,i.1) j75 have hs : S.conjTranspose * S = R.conjTranspose * R := by76 ext i j77 simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, S, Fintype.sum_prod_type]78 rw [Finset.sum_comm]79 have hl : partialTraceLeft (S * S.conjTranspose) = partialTraceRight (R * R.conjTranspose) := rfl80 have hr : partialTraceRight (S * S.conjTranspose) = partialTraceLeft (R * R.conjTranspose) := rfl81 have h₁ := directed_equality_of_factor R ht82 have h₂ := directed_equality_of_factor S (by rw [hs]; exact ht)83 rw [hl, hr, hs] at h₂84 rw [hstar, hsq] at h₁ h₂85 simp only [← subentropy_zero_iff_pure]86 exact ⟨h₁, h₂⟩8788/-- For every finite bipartite density state, the absolute difference of89the marginal subentropies is at most the joint subentropy. Equality holds90if and only if the first marginal, the second marginal, or the joint state91is pure. -/92theorem triangle_inequality_with_equality (ρ : DensityState (X × B)) :93 |subentropy (marginalRight ρ) - subentropy (marginalLeft ρ)| ≤ subentropy ρ ∧94 (|subentropy (marginalRight ρ) - subentropy (marginalLeft ρ)| = subentropy ρ ↔95 IsPure (marginalRight ρ) ∨ IsPure (marginalLeft ρ) ∨ IsPure ρ) := by96 let a := subentropy (marginalRight ρ)97 let b := subentropy (marginalLeft ρ)98 let q := subentropy ρ99 have ⟨hba, hab⟩ := marginal_subentropy_bounds ρ100 change b ≤ a + q at hba101 change a ≤ b + q at hab102 change |a - b| ≤ q ∧ (|a - b| = q ↔ _)103 refine ⟨abs_le.mpr ⟨by linarith only [hba], by linarith only [hab]⟩, ?_⟩104 have hq : 0 ≤ q := subentropy_nonnegative ρ105 have he : |a - b| = q ↔ a = b + q ∨ b = a + q := by106 rw [abs_eq hq]107 apply or_congr <;> constructor <;> intro h <;> linarith only [h]108 have ⟨heBA, heAB⟩ := directed_triangle_equalities ρ109 rw [he, heBA, heAB]110 tauto111112end SubentropyCertificates.Subadditivity
Axioms used
Choose a statement to see which axioms its proof uses.