Pratik Patil

CalibratedStrictConcavity.lean

1module23public import SubentropyCertificates.CalibratedConcavity4public import SubentropyCertificates.MatrixStrongConcavity5import all SubentropyCertificates.MixedSegmentRank67/-! Strict concavity of matrix subentropy and of the label functional for any ancillary state. -/8@[expose] public section9noncomputable section10set_option backward.isDefEq.respectTransparency false11open Matrix Set12open scoped BigOperators MatrixOrder ComplexOrder Kronecker1314namespace SubentropyCertificates.AncillaCalibration15open D5.S3.Quantum.Foundation.FiniteStateChannel (DensityState)16open D5.S3.Quantum.Information.PartialTraceMutualInformation17  (density_posSemidef partialTraceRight partialTraceRight_kronecker)18open D5.S3.Quantum.Subentropy.Basic (matrixSubentropy)19open SubentropyCertificates.BinarySpectra (densityMatrix)20open SubentropyCertificates.ClassicalCurve21open SubentropyCertificates.ConditionalContinuity (hsSquared_nonneg_eq_zero)22open SubentropyCertificates.StrongConcavity2324/-- Matrix subentropy is strictly concave on all density matrices, including the boundary. -/25theorem matrixSubentropy_strictConcave {D : Type*} [Fintype D] [DecidableEq D] :26    StrictConcaveOn ℝ {M : Matrix D D ℂ | M.PosSemidef ∧ M.trace = 1} matrixSubentropy := by27  constructor28  · intro M hM N hN a b ha hb hab29    refine ⟨(hM.1.smul ha).add (hN.1.smul hb), ?_⟩30    simp only [trace_add, trace_smul, hM.2, hN.2, ← add_smul, hab, one_smul]31  intro M hM N hN hne a b ha hb hab32  have hd : 2 ≤ Fintype.card D := by33    by_contra! hc34    have : Subsingleton D := Fintype.card_le_one_iff_subsingleton.mp (by omega)35    have entry (P : Matrix D D ℂ) (ht : P.trace = 1) (i : D) : P i i = 1 := by36      change ∑ j, P j j = 1 at ht37      rwa [Finset.sum_eq_single i (fun j _ hj ↦ (hj (Subsingleton.elim j i)).elim)38        (fun h ↦ (h (Finset.mem_univ i)).elim)] at ht39    apply hne40    ext i j41    rw [Subsingleton.elim j i, entry M hM.2, entry N hN.2]42  let T := a • M + b • N43  have hc := matrix_strong_concavity hd ![a, b]44    (by intro i; fin_cases i <;> simp [ha.le, hb.le])45    (by simpa only [Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] using hab)46    ![M, N] (by intro i; fin_cases i <;> simp [hM.1, hN.1])47    (by intro i; fin_cases i <;> simp [hM.2, hN.2])48  simp only [Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] at hc49  change mu (Fintype.card D) / 2 * (a * hsSquared (M - T) + b * hsSquared (N - T)) ≤50    matrixSubentropy T - (a * matrixSubentropy M + b * matrixSubentropy N) at hc51  have hvar : 0 < a * hsSquared (M - T) + b * hsSquared (N - T) := by52    have h₁ := hsSquared_nonneg_eq_zero (M - T)53    have h₂ := hsSquared_nonneg_eq_zero (N - T)54    by_cases hMT : M = T55    · have hNT : N - T ≠ 0 := fun h ↦ hne (hMT.trans (sub_eq_zero.mp h).symm)56      exact add_pos_of_nonneg_of_pos (mul_nonneg ha.le h₁.1)57        (mul_pos hb (lt_of_le_of_ne h₂.1 (fun he ↦ hNT (h₂.2 he.symm))))58    · exact add_pos_of_pos_of_nonneg59        (mul_pos ha (lt_of_le_of_ne h₁.1 (fun he ↦ hMT (sub_eq_zero.mp (h₁.2 he.symm)))))60        (mul_nonneg hb.le h₂.1)61  have hcoef : 0 < mu (Fintype.card D) / 2 := by linarith [mu_ge_third hd]62  exact sub_pos.mp ((mul_pos hcoef hvar).trans_le hc)6364/-- Strict concavity of the calibrated functional for every ancillary density, including singular65ones. Taking the partial trace of the product records the original label probabilities. -/66theorem calibratedSubentropy_strictConcave {X C : Type*} [Fintype X] [DecidableEq X]67    [Fintype C] [DecidableEq C] (ν : DensityState C) :68    StrictConcaveOn ℝ (probabilitySimplex X) (calibratedSubentropy ν) := by69  let D (p : X → ℝ) := (diagonal fun x ↦ (p x : ℂ)) ⊗ₖ densityMatrix ν70  have ht : (densityMatrix ν).trace = 1 := ν.2.271  have hD {p : X → ℝ} (hp : p ∈ probabilitySimplex X) :72      (D p).PosSemidef ∧ (D p).trace = 1 := by73    have hd := diagonal_density hp74    exact ⟨hd.1.kronecker (density_posSemidef ν), (trace_kronecker _ _).trans75      (by rw [hd.2, ht, mul_one])⟩76  have hinj : Function.Injective D := by77    intro p q he78    have recover (r : X → ℝ) :79        partialTraceRight (D r) = diagonal fun x ↦ (r x : ℂ) :=80      (partialTraceRight_kronecker (diagonal fun x ↦ (r x : ℂ)) (densityMatrix ν)).trans81        (by rw [ht, one_smul])82    have h := (recover p).symm.trans ((congrArg partialTraceRight he).trans (recover q))83    funext i84    simpa using congrArg (fun M : Matrix X X ℂ ↦ (M i i).re) h85  refine ⟨simplex_convex X, ?_⟩86  intro p hp q hq hpq a b ha hb hab87  have h := matrixSubentropy_strictConcave.2 (hD hp) (hD hq) (hinj.ne hpq) ha hb hab88  have hd : D (a • p + b • q) = a • D p + b • D q := by89    simp only [D, Pi.add_apply, Pi.smul_apply, smul_eq_mul, diagonal_affine, add_kronecker,90      smul_kronecker]91  change a * (matrixSubentropy (D p) - _) + b * (matrixSubentropy (D q) - _) <92    matrixSubentropy (D (a • p + b • q)) - matrixSubentropy (densityMatrix ν)93  rw [hd]94  change a * matrixSubentropy (D p) + b * matrixSubentropy (D q) < _ at h95  linarith only [h, congrArg (fun t : ℝ ↦ t * matrixSubentropy (densityMatrix ν)) hab]9697end SubentropyCertificates.AncillaCalibration

Axioms used

Choose a statement to see which axioms its proof uses.