PointwiseDeterminant.lean
1module23public import SubentropyCertificates.MarginalDeterminants4public import SubentropyCertificates.PureMarginalDiagonal5public import SubentropyCertificates.SliceProducts67/-! Pointwise determinant comparison with the two partial traces,8including equality at each parameter (prop:pointwise-determinant). -/9@[expose] public section10noncomputable section11set_option autoImplicit false12set_option backward.isDefEq.respectTransparency false13open Matrix14open scoped BigOperators ComplexOrder MatrixOrder15namespace SubentropyCertificates.DeterminantComparison16open D5.S3.Quantum.Foundation.FiniteStateChannel17open D5.S3.Quantum.Information.PartialTraceMutualInformation18open D5.S3.Quantum.Information.InputInformationBalance19open D5.S3.Quantum.Subentropy.Basic20open D5.S3.Quantum.Subentropy.DensityKernel21open SubentropyCertificates.ClassicalSSA22open SubentropyCertificates.ClassicalCurve23open SubentropyCertificates.Subadditivity24open SubentropyCertificates.QuantumEquality25variable {D F : Type*} [Fintype D] [DecidableEq D] [Fintype F] [DecidableEq F]2627private theorem single_atom_iff (w : D → ℝ) (hw : w ∈ probabilitySimplex D) :28 ¬ varies Finset.univ w ↔ ∃ i, w = pointMass i := by29 constructor30 · intro hn31 obtain ⟨i,hi⟩ : ∃ i, 0 < w i := by32 by_contra! hz33 have h := Finset.sum_nonpos (s := Finset.univ) (fun j _ => hz j)34 linarith only [h, hw.2]35 have hz (j) (_ : j ∈ Finset.univ) (hji : j ≠ i) : w j = 0 := by36 by_contra h037 exact hn ⟨i, Finset.mem_univ _, j, Finset.mem_univ _, hji, hi,38 lt_of_le_of_ne (hw.1 j) (Ne.symm h0)⟩39 exact ⟨i, (eq_pointMass_iff_probability_one w hw i).mpr40 ((Finset.sum_eq_single_of_mem i (Finset.mem_univ i) hz).symm.trans hw.2)⟩41 · rintro ⟨i,rfl⟩ ⟨j,_,k,_,hne,hj,hk⟩42 by_cases eqj : j=i43 · have hki : k ≠ i := fun eq => hne (eq.trans eqj.symm)44 simp [pointMass, hki] at hk45 · simp [pointMass, eqj] at hj4647private theorem pure_iff_point_spectrum (ρ : DensityState D) :48 IsPure ρ ↔ ∃ i, (density_posSemidef ρ).isHermitian.eigenvalues = pointMass i := by49 rw [← subentropy_zero_iff_pure, subentropy, subentropy_of_spectrum (density_posSemidef ρ).isHermitian]50 exact classical_zero_iff_pointMass _ (spectral_prob (density_posSemidef ρ) ρ.2.2)5152private theorem reciprocal_diagonal (w : D → ℝ) (t : ℝ) :53 reciprocalDet t (diagonal (fun i => (w i : ℂ))) = kernel t w := by54 have hd : (1 : Matrix D D ℂ) + t • diagonal (fun i => (w i : ℂ)) =55 diagonal (fun i => ((1 + w i*t : ℝ) : ℂ)) := by56 ext i j57 by_cases hij : i=j58 · subst j; simp [Complex.real_smul, mul_comm]59 · simp [hij]60 unfold reciprocalDet kernel factor61 rw [hd, Matrix.det_diagonal, ← Complex.ofReal_prod, Complex.ofReal_re, Finset.prod_inv_distrib]6263/-- The sum of the reciprocal marginal determinants is bounded above by64the joint reciprocal determinant plus 1/(1+t). For positive t equality65is equivalent to purity of a marginal. At zero every state attains equality. -/66theorem pointwise_determinant_comparison (ρ : DensityState (D × F)) {t : ℝ} (ht : 0 ≤ t) :67 let A := CStarMatrix.ofMatrix.symm (marginalRight ρ).168 let B := CStarMatrix.ofMatrix.symm (marginalLeft ρ).169 let M := CStarMatrix.ofMatrix.symm ρ.170 reciprocalDet t A + reciprocalDet t B ≤ reciprocalDet t M + 1/(1+t) ∧71 (reciprocalDet t A + reciprocalDet t B = reciprocalDet t M + 1/(1+t) ↔72 t=0 ∨ IsPure (marginalRight ρ) ∨ IsPure (marginalLeft ρ)) := by73 rcases ht.eq_or_lt with hz | ht74 · subst t; simp [reciprocalDet]75 let M := CStarMatrix.ofMatrix.symm ρ.176 let hR := (partialTraceRight_posSemidef (density_posSemidef ρ)).isHermitian77 let hL := (partialTraceLeft_posSemidef (density_posSemidef ρ)).isHermitian78 let a := hR.eigenvalues79 let b := hL.eigenvalues80 obtain ⟨K,hK,htr,hA,hB,hdet⟩ := marginal_eigenbasis_determinants ρ81 let p := fun (i : D) (j : F) => (K (i,j) (i,j)).re82 have hp (i j) : 0 ≤ p i j := (RCLike.nonneg_iff.mp (hK.diag_nonneg (i := (i,j)))).183 have hr : rowMass p = a := by84 funext i85 simpa [rowMass, p, a, hR, partialTraceRight, Complex.re_sum] using86 congrArg (fun N => (N i i).re) hA87 have hc : colMass Finset.univ p = b := by88 funext j89 simpa [colMass, p, b, hL, partialTraceLeft, Complex.re_sum] using90 congrArg (fun N => (N j j).re) hB91 have hpa : a ∈ probabilitySimplex D := spectral_prob (density_posSemidef (marginalRight ρ)) (marginalRight ρ).2.292 have hpb : b ∈ probabilitySimplex F := spectral_prob (density_posSemidef (marginalLeft ρ)) (marginalLeft ρ).2.293 have hm : mass Finset.univ p = 1 := by unfold mass; rw [hr, hpa.2]94 have hcells : cells t Finset.univ p = kernel t (fun i => (K i i).re) := by95 simp only [cells, kernel, p, Fintype.prod_prod_type]96 have hclass := table_subadditivity ht.le Finset.univ p hp97 have he := table_subadditivity_eq_iff ht p hp98 change kernel t (rowMass p) + kernel t (colMass Finset.univ p) ≤ _ at hclass99 change (kernel t (rowMass p) + kernel t (colMass Finset.univ p) = _) ↔ _ at he100 rw [hr,hc,hm,hcells, factor, one_mul, ← one_div] at hclass he101 have ha := pure_iff_point_spectrum (marginalRight ρ)102 have hb := pure_iff_point_spectrum (marginalLeft ρ)103 change IsPure (marginalRight ρ) ↔ ∃ i, a = pointMass i at ha104 change IsPure (marginalLeft ρ) ↔ ∃ j, b = pointMass j at hb105 rw [single_atom_iff a hpa, single_atom_iff b hpb, ← ha, ← hb] at he106 change reciprocalDet t (partialTraceRight M) + reciprocalDet t (partialTraceLeft M) ≤ _ ∧107 (reciprocalDet t (partialTraceRight M) + reciprocalDet t (partialTraceLeft M) = _ ↔ _)108 rw [reciprocalDet_spectral hR, reciprocalDet_spectral hL, ← hdet t]109 change kernel t a + kernel t b ≤ reciprocalDet t K + 1/(1+t) ∧110 (kernel t a + kernel t b = reciprocalDet t K + 1/(1+t) ↔ _)111 have hdiag := diagonal_kernel_le_reciprocalDet hK ht.le112 refine ⟨hclass.trans (add_le_add hdiag (le_refl _)), ?_⟩113 constructor114 · intro eq115 exact Or.inr (he.mp (by linarith only [eq, hdiag, hclass]))116 · rintro (hz | hpure)117 · exact (ht.ne' hz).elim118 · have hd := diagonal_of_point_marginal hK a b hA hB (hpure.imp ha.mp hb.mp)119 exact (he.mpr hpure).trans (congrArg (fun z => z + 1/(1+t))120 ((reciprocal_diagonal _ t).symm.trans (congrArg (reciprocalDet t) hd.symm)))121122/-- If both marginals are mixed, the comparison is strict at every positive parameter. -/123theorem pointwise_determinant_strict (ρ : DensityState (D × F)) {t : ℝ} (ht : 0 < t)124 (hA : ¬ IsPure (marginalRight ρ)) (hB : ¬ IsPure (marginalLeft ρ)) :125 reciprocalDet t (CStarMatrix.ofMatrix.symm (marginalRight ρ).1) +126 reciprocalDet t (CStarMatrix.ofMatrix.symm (marginalLeft ρ).1) <127 reciprocalDet t (CStarMatrix.ofMatrix.symm ρ.1) + 1/(1+t) := by128 obtain ⟨hle, heq⟩ := pointwise_determinant_comparison ρ ht.le129 apply lt_of_le_of_ne hle130 intro h131 rcases heq.mp h with hz | ha | hb132 · exact ht.ne' hz133 · exact hA ha134 · exact hB hb135136end SubentropyCertificates.DeterminantComparison
Axioms used
Choose a statement to see which axioms its proof uses.