DiagonalDeterminant.lean
1module23public import SubentropyCertificates.TableMerging4public import D5.S3.Quantum.Subentropy.DensityKernel5import all D5.S3.Quantum.Subentropy.DensityKernel6import Mathlib.Analysis.Convex.SpecificFunctions.Basic7import Mathlib.Analysis.Convex.Jensen89/-! Hadamard's determinant comparison for I+tA with A positive10semidefinite. Jensen's inequality for log is applied to each row of the11squared moduli of an eigenvector unitary. -/12@[expose] public section13noncomputable section14set_option autoImplicit false15set_option backward.isDefEq.respectTransparency false16open Matrix Set17open scoped BigOperators ComplexOrder MatrixOrder18namespace SubentropyCertificates.DeterminantComparison19open SubentropyCertificates.ClassicalSSA20open D5.S3.Quantum.Subentropy.DensityKernel21variable {D : Type*} [Fintype D] [DecidableEq D]2223/-- Reciprocal determinant at the manuscript parameter t. For a24positive semidefinite matrix and nonnegative t the determinant is real25and strictly positive, including when the matrix is singular. -/26def reciprocalDet (t : ℝ) (A : Matrix D D ℂ) : ℝ := ((1 + t • A).det.re)⁻¹2728theorem reciprocalDet_spectral {A : Matrix D D ℂ} (hA : A.IsHermitian) (t : ℝ) :29 reciprocalDet t A = kernel t hA.eigenvalues := by30 unfold reciprocalDet kernel factor31 rw [det_spectral hA, ← Complex.ofReal_prod, Complex.ofReal_re, Finset.prod_inv_distrib]32 simp_rw [mul_comm t]3334/-- The reciprocal determinant dominates the product of reciprocal35diagonal factors in every orthonormal coordinate system. -/36theorem diagonal_kernel_le_reciprocalDet {A : Matrix D D ℂ} (hA : A.PosSemidef)37 {t : ℝ} (ht : 0 ≤ t) :38 kernel t (fun i => (A i i).re) ≤ reciprocalDet t A := by39 let H := hA.isHermitian40 let U : Matrix D D ℂ := H.eigenvectorUnitary41 let w := fun i j => Complex.normSq (U i j)42 have hr (i : D) : ∑ j, w i j = 1 := by43 have hu : U * U.conjTranspose = 1 := Unitary.coe_mul_star_self H.eigenvectorUnitary44 have hi := congrArg (fun M : Matrix D D ℂ => (M i i).re) hu45 simpa [Matrix.mul_apply, Matrix.conjTranspose_apply, Complex.re_sum, w,46 Complex.normSq_apply] using hi47 have hc (j : D) : ∑ i, w i j = 1 := by48 have hu : U.conjTranspose * U = 1 := Unitary.coe_star_mul_self H.eigenvectorUnitary49 have hj := congrArg (fun M : Matrix D D ℂ => (M j j).re) hu50 simpa [Matrix.mul_apply, Matrix.conjTranspose_apply, Complex.re_sum, w,51 Complex.normSq_apply] using hj52 have hentry (i : D) : (A i i).re = ∑ j, w i j * H.eigenvalues j := by53 have hspec : A = U * diagonal (fun j => (H.eigenvalues j : ℂ)) * U.conjTranspose :=54 H.spectral_theorem55 conv_lhs => rw [hspec, Matrix.mul_apply, Complex.re_sum]56 apply Finset.sum_congr rfl57 intro j _58 simp only [Matrix.mul_diagonal, Matrix.conjTranspose_apply, w]59 have hs (v : ℂ) : v * star v = (Complex.normSq v : ℂ) := Complex.mul_conj v60 rw [mul_right_comm, hs]61 simp62 let z := fun j => 1 + H.eigenvalues j * t63 let d := fun i => 1 + (A i i).re * t64 have hz (j) : 0 < z j := by dsimp [z,H]; have := hA.eigenvalues_nonneg j; positivity65 have hd (i) : 0 < d i := by66 exact add_pos_of_pos_of_nonneg zero_lt_one (mul_nonneg (RCLike.nonneg_iff.mp (hA.diag_nonneg (i := i))).1 ht)67 have hmean (i) : (∑ j, w i j * z j) = d i := by68 simp only [z, d, mul_add, mul_one, ← mul_assoc, Finset.sum_add_distrib,69 ← Finset.sum_mul, hr, ← hentry]70 have hjensen (i) : ∑ j, w i j * Real.log (z j) ≤ Real.log (d i) := by71 have h := strictConcaveOn_log_Ioi.concaveOn.le_map_sum72 (t := Finset.univ) (w := w i) (p := z) (fun j _ => Complex.normSq_nonneg _)73 (hr i) (fun j _ => hz j)74 simpa only [smul_eq_mul, hmean] using h75 have hlog : (∑ j, Real.log (z j)) ≤ ∑ i, Real.log (d i) := by76 calc _ = ∑ i, ∑ j, w i j * Real.log (z j) := by77 rw [Finset.sum_comm]; simp only [← Finset.sum_mul, hc, one_mul]78 _ ≤ _ := Finset.sum_le_sum (fun i _ => hjensen i)79 have hprod : ∏ j, z j ≤ ∏ i, d i := by80 apply (Real.log_le_log_iff (Finset.prod_pos fun j _ => hz j)81 (Finset.prod_pos fun i _ => hd i)).mp82 simpa only [Real.log_prod (fun j _ => (hz j).ne'), Real.log_prod (fun i _ => (hd i).ne')]83 using hlog84 rw [reciprocalDet_spectral H]85 unfold kernel factor86 rw [Finset.prod_inv_distrib, Finset.prod_inv_distrib]87 exact inv_anti₀ (Finset.prod_pos fun j _ => hz j) hprod8889end SubentropyCertificates.DeterminantComparison
Axioms used
Choose a statement to see which axioms its proof uses.