SpectralExtension.lean
1module23public import SubentropyCertificates.MarginalPurity4public import D5.S3.Quantum.Subentropy.SpectralFormula56/-! Identify the determinant definition with the continuous extension of7the manuscript's spectral expression at repeated or zero eigenvalues. -/8@[expose] public section9noncomputable section10open Matrix MeasureTheory Set Filter11open scoped Topology BigOperators ComplexOrder12namespace SubentropyCertificates.Representations13open SubentropyCertificates.ClassicalCurve14open SubentropyCertificates.Subadditivity15open D5.S3.Quantum.Subentropy.Basic16open D5.S3.Quantum.Subentropy.DensityKernel17open D5.S3.Quantum.Subentropy.SpectralFormula1819variable {D : Type*} [Fintype D] [DecidableEq D]2021def simpleSpectra (D : Type*) [Fintype D] : Set (D → ℝ) :=22 {p | (∀ i, 0 < p i) ∧ (∑ i, p i) = 1 ∧ Function.Injective p}2324def spectralExpression (p : D → ℝ) : ℝ :=25 -(∑ i, p i ^ Fintype.card D * Real.log (p i) / (∏ j ∈ Finset.univ.erase i, (p i - p j)))2627omit [DecidableEq D] in28private theorem positive_simple_spectrum [Nonempty D] : (simpleSpectra D).Nonempty := by29 let w (i : D) : ℝ := ((Fintype.equivFin D i).val : ℝ) + 130 have hw (i : D) : 0 < w i := by dsimp [w]; positivity31 have hsum : 0 < ∑ i, w i := Finset.sum_pos (fun i _ => hw i) Finset.univ_nonempty32 refine ⟨fun i => w i / ∑ j, w j, fun i => div_pos (hw i) hsum, ?_, ?_⟩33 · rw [← Finset.sum_div, div_self hsum.ne']34 · intro i j hij35 have he := (div_left_inj' hsum.ne').mp hij36 apply (Fintype.equivFin D).injective37 apply Fin.ext38 exact_mod_cast (add_right_cancel he : ((Fintype.equivFin D i).val : ℝ) = ((Fintype.equivFin D j).val : ℝ))3940omit [DecidableEq D] in41/-- Every normalized spectrum is approached by strictly positive spectra42with pairwise distinct entries, including at the boundary of the simplex. -/43theorem mem_closure_simple_spectra (p : D → ℝ) (hp : p ∈ probabilitySimplex D) :44 p ∈ closure (simpleSpectra D) := by45 classical46 have : Nonempty D := by47 by_contra! he48 have : IsEmpty D := he49 simpa using hp.250 obtain ⟨q, hqpos, hqsum, hqinj⟩ := positive_simple_spectrum (D := D)51 let v (t : ℝ) (i : D) := (1 - t) * p i + t * q i52 have hc : Continuous v := by unfold v; fun_prop53 have hv : Tendsto v (𝓝[>] 0) (𝓝 p) := by54 have h : Tendsto v (𝓝[>] 0) (𝓝 (v 0)) := hc.continuousAt.continuousWithinAt55 simpa [v] using h56 apply mem_closure_of_tendsto hv57 have hsep (i j : D) : ∀ᶠ t in 𝓝[>] (0 : ℝ), i ≠ j → v t i ≠ v t j := by58 by_cases hij : p i = p j59 · filter_upwards [self_mem_nhdsWithin] with t ht hne he60 have h : t * q i = t * q j := by simpa only [v, hij, add_right_inj] using he61 exact hne (hqinj (mul_left_cancel₀ (ne_of_gt ht) h))62 · have ho : IsOpen {t | v t i ≠ v t j} :=63 isOpen_ne_fun ((continuous_apply i).comp hc) ((continuous_apply j).comp hc)64 have hm := ho.mem_nhds (x := 0) (by simpa [v] using hij)65 filter_upwards [mem_nhdsWithin_of_mem_nhds hm] with t ht _66 exact ht67 have hall : ∀ᶠ t in 𝓝[>] (0 : ℝ), ∀ i j : D, i ≠ j → v t i ≠ v t j :=68 eventually_all.mpr fun i => eventually_all.mpr (hsep i)69 filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (show (0:ℝ) < 1 by norm_num)), hall] with t ht hlt hsep'70 refine ⟨fun i => add_pos_of_nonneg_of_pos (mul_nonneg (sub_nonneg.mpr hlt.le) (hp.1 i))71 (mul_pos ht (hqpos i)), ?_, ?_⟩72 · simp [v, Finset.sum_add_distrib, ← Finset.mul_sum, hp.2, hqsum]73 · intro i j he74 exact of_not_not fun h => hsep' i j h he7576theorem spectral_expression_extension (p : D → ℝ) (hp : p ∈ probabilitySimplex D) :77 p ∈ closure (simpleSpectra D) ∧78 Tendsto spectralExpression (𝓝[simpleSpectra D] p) (𝓝 (classicalSubentropy p)) := by79 refine ⟨mem_closure_simple_spectra p hp, ?_⟩80 have hd : Continuous (fun q : D → ℝ => diagonal (fun i => (q i : ℂ))) := by fun_prop81 have hc : ContinuousOn (classicalSubentropy (ι := D)) (probabilitySimplex D) :=82 continuousOn_matrixSubentropy.comp hd.continuousOn (fun _ hq => diagonal_density hq)83 have hs : simpleSpectra D ⊆ probabilitySimplex D := fun q hq => ⟨fun i => (hq.1 i).le, hq.2.1⟩84 apply ((hc p hp).mono hs).congr'85 filter_upwards [self_mem_nhdsWithin] with q hq86 exact matrixSubentropy_diagonal_eq_distinct_formula q hq.1 hq.2.1 hq.2.28788theorem spectral_expression_at_state {A : Matrix D D ℂ} (hA : A.PosSemidef) (ht : A.trace = 1) :89 hA.isHermitian.eigenvalues ∈ closure (simpleSpectra D) ∧90 Tendsto spectralExpression (𝓝[simpleSpectra D] hA.isHermitian.eigenvalues) (𝓝 (matrixSubentropy A)) := by91 rw [subentropy_of_spectrum hA.isHermitian]92 exact spectral_expression_extension _ (spectral_prob hA ht)9394end SubentropyCertificates.Representations
Axioms used
Choose a statement to see which axioms its proof uses.