module public import D5.S3.Quantum.Subentropy.Subadditivity /-! Marginal lower bounds for the joint subentropy. Reshaping a square root of the state gives a purification. Subadditivity on a complementary pair and the rectangular Gram identity yield both lower bounds. -/ @[expose] public section noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Matrix MeasureTheory open scoped BigOperators ComplexOrder MatrixOrder namespace SubentropyCertificates.Subadditivity open D5.S3.Quantum.Foundation.FiniteStateChannel open D5.S3.Quantum.Information.PartialTraceMutualInformation open D5.S3.Quantum.Subentropy.Basic open D5.S3.Quantum.Subentropy.Subadditivity private theorem matrixSubentropy_transpose {D : Type*} [Fintype D] [DecidableEq D] (M : Matrix D D ℂ) : matrixSubentropy M.transpose = matrixSubentropy M := by unfold matrixSubentropy subentropyKernel apply integral_congr_ae apply Filter.Eventually.of_forall intro t have hd := Matrix.det_transpose (1 + (t⁻¹ : ℝ) • M) rw [Matrix.transpose_add, Matrix.transpose_one, Matrix.transpose_smul] at hd exact congrArg (fun z : ℂ => t / (1 + t) - z.re⁻¹) hd variable {X B C : Type*} [Fintype X] [DecidableEq X] [Fintype B] [DecidableEq B] [Fintype C] [DecidableEq C] private theorem left_bound_of_factor (R : Matrix (X × B) C ℂ) (ht : (R.conjTranspose * R).trace = 1) : matrixSubentropy (partialTraceLeft (R * R.conjTranspose)) ≤ matrixSubentropy (partialTraceRight (R * R.conjTranspose)) + matrixSubentropy (R.conjTranspose * R) := by let V : Matrix B (X × C) ℂ := fun b i => R (i.1,b) i.2 let G := V.conjTranspose * V have hrow : V * V.conjTranspose = partialTraceLeft (R * R.conjTranspose) := by ext b d simp [partialTraceLeft, Matrix.mul_apply, V, Fintype.sum_prod_type] have hC : partialTraceLeft G = R.conjTranspose * R := by ext c d simp [partialTraceLeft, G, V, Matrix.mul_apply, Fintype.sum_prod_type] have hX : partialTraceRight G = (partialTraceRight (R * R.conjTranspose)).transpose := by ext x y simp only [partialTraceRight, G, V, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.transpose_apply] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro b _ apply Finset.sum_congr rfl intro c _ ring have htr : G.trace = 1 := by rw [← trace_partialTraceLeft G, hC, ht] let σ : DensityState (X × C) := ⟨CStarMatrix.ofMatrix G, map_nonneg CStarMatrix.ofMatrixStarAlgEquiv (Matrix.posSemidef_conjTranspose_mul_self V).nonneg, htr⟩ have h := subentropy_subadditive σ change matrixSubentropy G ≤ matrixSubentropy (partialTraceRight G) + matrixSubentropy (partialTraceLeft G) at h rw [hX, hC, matrixSubentropy_transpose] at h rwa [← hrow, ← matrixSubentropy_rectangular_gram V] theorem marginal_subentropy_bounds (ρ : DensityState (X × B)) : subentropy (marginalLeft ρ) ≤ subentropy (marginalRight ρ) + subentropy ρ ∧ subentropy (marginalRight ρ) ≤ subentropy (marginalLeft ρ) + subentropy ρ := by let M := CStarMatrix.ofMatrix.symm ρ.1 let R := CFC.sqrt M have hstar : R.conjTranspose = R := (CFC.sqrt_nonneg M).isSelfAdjoint.star_eq have hsq : R * R = M := CFC.sqrt_mul_sqrt_self _ (density_posSemidef ρ).nonneg have ht : (R.conjTranspose * R).trace = 1 := by rw [hstar, hsq]; exact ρ.2.2 let S : Matrix (B × X) (X × B) ℂ := fun i j => R (i.2,i.1) j have hs : S.conjTranspose * S = R.conjTranspose * R := by ext i j simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, S, Fintype.sum_prod_type] rw [Finset.sum_comm] have hl : partialTraceLeft (S * S.conjTranspose) = partialTraceRight (R * R.conjTranspose) := rfl have hr : partialTraceRight (S * S.conjTranspose) = partialTraceLeft (R * R.conjTranspose) := rfl have h₁ := left_bound_of_factor R ht have h₂ := left_bound_of_factor S (by rw [hs]; exact ht) rw [hl, hr, hs] at h₂ rw [hstar, hsq] at h₁ h₂ exact ⟨h₁, h₂⟩ end SubentropyCertificates.Subadditivity