SpectralJensen.lean
1module2public import SubentropyCertificates.MarginalPurity3public import Mathlib.Analysis.Convex.Birkhoff45/-! Lifting a concave symmetric function of a probability vector to a6concave function of the spectrum of a density matrix. -/7@[expose] public section8noncomputable section9set_option autoImplicit false10set_option backward.isDefEq.respectTransparency false11open Matrix Set12open scoped BigOperators ComplexOrder MatrixOrder13namespace SubentropyCertificates.StrongConcavity14open SubentropyCertificates.ClassicalCurve15open D5.S3.Quantum.Subentropy.DensityKernel16variable {D J : Type*} [Fintype D] [DecidableEq D] [Fintype J]1718private def diagRe (A : Matrix D D ℂ) (i : D) := (A i i).re1920private theorem rotated_diagonal (U : Matrix.unitaryGroup D ℂ) (p : D → ℝ) :21 ∃ w : Equiv.Perm D → ℝ, (∀ σ, 0 ≤ w σ) ∧ ∑ σ, w σ=1 ∧22 diagRe (Unitary.conjStarAlgAut ℂ _ U (diagonal (fun i => (p i : ℂ)))) =23 ∑ σ, w σ • (p ∘ σ) := by24 classical25 let B : Matrix D D ℝ := fun i j => Complex.normSq (U i j)26 have hr (i : D) : ∑ j, B i j = 1 := by27 have h := congrArg (fun M : Matrix D D ℂ => (M i i).re) (Unitary.coe_mul_star_self U)28 simpa [Matrix.mul_apply,Matrix.conjTranspose_apply,Complex.re_sum,B,Complex.normSq_apply] using h29 have hc (j : D) : ∑ i, B i j = 1 := by30 have h := congrArg (fun M : Matrix D D ℂ => (M j j).re) (Unitary.coe_star_mul_self U)31 simpa [Matrix.mul_apply,Matrix.conjTranspose_apply,Complex.re_sum,B,Complex.normSq_apply] using h32 have hB : B ∈ doublyStochastic ℝ D :=33 mem_doublyStochastic_iff_sum.mpr ⟨fun _ _ => Complex.normSq_nonneg _,hr,hc⟩34 obtain ⟨w,hw,hs,hperm⟩ := exists_eq_sum_perm_of_mem_doublyStochastic hB35 refine ⟨w,hw,hs,?_⟩36 calc37 _ = B *ᵥ p := by38 funext i39 change (((U : Matrix D D ℂ)*diagonal (fun j => (p j:ℂ))*(U : Matrix D D ℂ).conjTranspose) i i).re = _40 rw [Matrix.mul_apply,Complex.re_sum]41 apply Finset.sum_congr rfl42 intro j _43 simp only [Matrix.mul_diagonal,Matrix.conjTranspose_apply,B]44 rw [mul_right_comm,show U i j * star (U i j) = (Complex.normSq (U i j):ℂ) from Complex.mul_conj _]45 simp46 _ = _ := by rw [← hperm,Matrix.sum_mulVec]; simp only [Matrix.smul_mulVec,Matrix.permMatrix_mulVec]4748private def coords (U : Matrix.unitaryGroup D ℂ) (A : Matrix D D ℂ) :=49 diagRe (Unitary.conjStarAlgAut ℂ _ (star U) A)5051private theorem coords_mix (U : Matrix.unitaryGroup D ℂ) (w : J → ℝ) (A : J → Matrix D D ℂ) :52 coords U (∑ j, w j • A j) = ∑ j, w j • coords U (A j) := by53 funext i54 change (((((star U : Matrix.unitaryGroup D ℂ) : Matrix D D ℂ) * (∑ j, w j • A j)) * star (((star U : Matrix.unitaryGroup D ℂ) : Matrix D D ℂ))) i i).re = _55 simp only [Matrix.mul_sum,Matrix.sum_mul,Matrix.mul_smul,Matrix.smul_mul,Matrix.sum_apply,56 Matrix.smul_apply,Complex.re_sum,Complex.smul_re,Finset.sum_apply,Pi.smul_apply,smul_eq_mul]57 rfl5859private theorem coords_own {A : Matrix D D ℂ} (hA : A.IsHermitian) :60 coords hA.eigenvectorUnitary A = hA.eigenvalues := by61 calc _ = coords hA.eigenvectorUnitary62 (Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary (diagonal (fun i => (hA.eigenvalues i:ℂ)))) :=63 congrArg _ hA.spectral_theorem64 _ = _ := by65 funext i66 unfold coords67 have he := DFunLike.congr_fun (map_mul (Unitary.conjStarAlgAut ℂ (Matrix D D ℂ)) (star hA.eigenvectorUnitary) hA.eigenvectorUnitary) (diagonal (fun i => (hA.eigenvalues i:ℂ)))68 change diagRe (((Unitary.conjStarAlgAut ℂ _) (star hA.eigenvectorUnitary) * (Unitary.conjStarAlgAut ℂ _) hA.eigenvectorUnitary) _) i = _69 rw [← he]; simp [diagRe]7071private theorem coords_bounds {f : (D → ℝ) → ℝ} (hf : ConcaveOn ℝ (probabilitySimplex D) f)72 (hsym : ∀ p : D → ℝ, ∀ σ : Equiv.Perm D, f (p ∘ σ) = f p)73 (U : Matrix.unitaryGroup D ℂ) {A : Matrix D D ℂ} (hA : A.PosSemidef) (ht : A.trace = 1) :74 coords U A ∈ probabilitySimplex D ∧ f hA.isHermitian.eigenvalues ≤ f (coords U A) := by75 let H := hA.isHermitian76 let V := H.eigenvectorUnitary77 let p := H.eigenvalues78 have hp : p ∈ probabilitySimplex D := spectral_prob hA ht79 have hc : coords U A = diagRe (Unitary.conjStarAlgAut ℂ _ (star U*V)80 (diagonal (fun i => (p i:ℂ)))) := by81 unfold coords82 rw [show A = Unitary.conjStarAlgAut ℂ _ V (diagonal (fun i => (p i:ℂ))) from H.spectral_theorem]83 rw [map_mul]; rfl84 obtain ⟨w,hw,hs,he⟩ := rotated_diagonal (star U*V) p85 have hdom (σ : Equiv.Perm D) : p ∘ σ ∈ probabilitySimplex D :=86 ⟨fun i => hp.1 _,(Equiv.sum_comp σ p).trans hp.2⟩87 rw [hc,he]88 refine ⟨hf.1.sum_mem (fun σ _ => hw σ) hs (fun σ _ => hdom σ),?_⟩89 have h := hf.le_map_sum (t := Finset.univ) (w := w) (p := fun σ => p ∘ σ) (fun σ _ => hw σ)90 hs (fun σ _ => hdom σ)91 simpa only [hsym,smul_eq_mul,← Finset.sum_mul,hs,one_mul] using h9293theorem spectral_jensen {f : (D → ℝ) → ℝ} (hf : ConcaveOn ℝ (probabilitySimplex D) f)94 (hsym : ∀ p : D → ℝ, ∀ σ : Equiv.Perm D, f (p ∘ σ) = f p)95 (w : J → ℝ) (hw : ∀ j, 0 ≤ w j) (hs : ∑ j, w j=1)96 (A : J → Matrix D D ℂ) (hA : ∀ j, (A j).PosSemidef) (ht : ∀ j, (A j).trace=1)97 {M : Matrix D D ℂ} (hM : M.IsHermitian) (hm : M = ∑ j, w j • A j) :98 ∑ j, w j*f (hA j).isHermitian.eigenvalues ≤ f hM.eigenvalues := by99 let U := hM.eigenvectorUnitary100 have hg j := coords_bounds hf hsym U (hA j) (ht j)101 have he : ∑ j, w j • coords U (A j) = hM.eigenvalues := by102 rw [← coords_mix,← hm]; exact coords_own hM103 calc _ ≤ ∑ j, w j*f (coords U (A j)) := Finset.sum_le_sum fun j _ =>104 mul_le_mul_of_nonneg_left (hg j).2 (hw j)105 _ ≤ _ := by106 have h := hf.le_map_sum (t := Finset.univ) (w := w) (p := fun j => coords U (A j))107 (fun j _ => hw j) hs (fun j _ => (hg j).1)108 simpa only [he,smul_eq_mul] using h109110end SubentropyCertificates.StrongConcavity
Axioms used
Choose a statement to see which axioms its proof uses.