Pratik Patil

FixedMarginalSpectrum.lean

1module23public import SubentropyCertificates.MixedMarginalNorm4public import SubentropyCertificates.SubentropyMaximum56/-! Spectral coordinates and values of the optimal fixed-marginal coefficient. -/7@[expose] public section8noncomputable section9set_option backward.isDefEq.respectTransparency false10open Matrix MeasureTheory Set11open scoped BigOperators ComplexOrder MatrixOrder Matrix.Norms.L2Operator1213namespace SubentropyCertificates.ConditionalContinuity14open SubentropyCertificates.BinarySpectra (densityMatrix)15open SubentropyCertificates.SpectralContinuity (maximallyMixed maximallyMixed_matrix)16open D5.S3.Quantum.Information.PartialTraceMutualInformation (density_posSemidef)1718variable {D : Type*} [Fintype D] [DecidableEq D]1920omit [DecidableEq D] in21private theorem ne_zero_of_trace_one {M : Matrix D D ℂ} (ht : M.trace = 1) : M ≠ 0 := by22  rintro rfl23  simp at ht2425/-- A top spatial sign weight lies on a positive eigenvalue of the marginal, including26at singular marginals. The two eigenbases are identified by the spectral integral formula. -/27theorem exists_spatialSign_top_coordinate {M : Matrix D D ℂ} (hM : M.PosSemidef)28    (ht : M.trace = 1) :29    ∃ i, 0 < hM.isHermitian.eigenvalues i ∧30      (∫ t in Ioi (0 : ℝ), (hM.isHermitian.eigenvalues i / (1 + t * hM.isHermitian.eigenvalues i)) *31        ∏ j, (1 + t * hM.isHermitian.eigenvalues j)⁻¹) = ‖spatialSign M‖ := by32  let w := hM.isHermitian.eigenvalues33  let k (i : D) := ∫ t in Ioi (0 : ℝ),34    (w i / (1 + t*w i)) * ∏ j, (1+t*w j)⁻¹35  have hn := ne_zero_of_trace_one ht36  have : Nonempty D := by37    by_contra! he38    exact hn (Subsingleton.elim _ _)39  have hkn := ne_zero_of_trace_one (spatialSign_trace_one hM hn)40  have hpos (i : D) : 0 ≤ k i := by41    apply integral_nonneg_of_ae42    filter_upwards [ae_restrict_mem measurableSet_Ioi] with t ht'43    have hw := hM.eigenvalues_nonneg44    change 0 ≤ (w i / (1 + t * w i)) * ∏ j, (1 + t * w j)⁻¹45    have hw' (j : D) : 0 ≤ w j := hw j46    have ht'' : 0 ≤ t := ht'.le47    have hden (j : D) : 0 ≤ 1 + t * w j := add_nonneg zero_le_one (mul_nonneg ht'' (hw' j))48    exact mul_nonneg (div_nonneg (hw' i) (hden i))49      (Finset.prod_nonneg fun j _ ↦ inv_nonneg.mpr (hden j))50  obtain ⟨i, _, hi⟩ := Finset.exists_max_image Finset.univ k Finset.univ_nonempty51  have hnorm : ‖spatialSign M‖ = k i := by52    rw [spatialSign_spectral hM]53    simp only [Unitary.conjStarAlgAut_apply, ← Unitary.coe_star,54      CStarRing.norm_mul_coe_unitary, CStarRing.norm_coe_unitary_mul, l2_opNorm_diagonal]55    change ‖(fun u : D ↦ (k u : ℂ))‖ = _56    apply le_antisymm57    · apply (pi_norm_le_iff_of_nonneg (hpos i)).258      intro j59      simpa [Real.norm_of_nonneg (hpos j)] using hi j (Finset.mem_univ j)60    · simpa [Real.norm_of_nonneg (hpos i)] using norm_le_pi_norm (fun j : D ↦ (k j : ℂ)) i61  refine ⟨i, lt_of_le_of_ne (hM.eigenvalues_nonneg i) ?_, hnorm.symm⟩62  intro hz63  have hzero : w i = 0 := hz.symm64  exact hkn (norm_eq_zero.mp (by simpa [k, hzero] using hnorm))6566/-- A pure marginal has fixed-marginal coefficient one. -/67theorem spatialSign_norm_eq_one_of_rank_one {M : Matrix D D ℂ} (hM : M.PosSemidef)68    (hr : M.rank = 1) : ‖spatialSign M‖ = 1 := by69  have hn : M ≠ 0 := by rintro rfl; simp at hr70  let K := spatialSign M71  have hK : K.PosSemidef := spatialSign_posSemidef hM72  have ht : K.trace = 1 := spatialSign_trace_one hM hn73  have hcard : Fintype.card {j // hK.isHermitian.eigenvalues j ≠ 0} = 1 := by74    rw [← hK.isHermitian.rank_eq_card_non_zero_eigs]75    exact (spatialSign_rank hM).trans hr76  obtain ⟨a, ha⟩ := Fintype.card_eq_one_iff.mp hcard77  have : Nonempty D := ⟨a.val⟩78  have hspec := CStarAlgebra.norm_mem_spectrum_of_nonneg K hK.nonneg79  rw [hK.isHermitian.spectrum_real_eq_range_eigenvalues] at hspec80  obtain ⟨i, hi⟩ := hspec81  have hi0 : hK.isHermitian.eigenvalues i ≠ 0 := hi.trans_ne (norm_ne_zero_iff.mpr82    (ne_zero_of_trace_one ht))83  have hs : ∑ j, hK.isHermitian.eigenvalues j = 1 := by84    simpa [ht] using congrArg Complex.re hK.isHermitian.trace_eq_sum_eigenvalues.symm85  rw [Finset.sum_eq_single_of_mem i (Finset.mem_univ i) (fun j _ hj ↦ by86    by_contra he87    exact hj (congrArg Subtype.val ((ha ⟨j,he⟩).trans (ha ⟨i,hi0⟩).symm)))] at hs88  exact hi.symm.trans hs8990/-- For a maximally mixed marginal, the spatial sign operator is itself maximally mixed. -/91theorem spatialSign_maximallyMixed (D : Type*) [Fintype D] [DecidableEq D] [Nonempty D] :92    spatialSign (densityMatrix (maximallyMixed D)) = densityMatrix (maximallyMixed D) := by93  let M := densityMatrix (maximallyMixed D)94  let hM : M.PosSemidef := density_posSemidef (maximallyMixed D)95  let w := hM.isHermitian.eigenvalues96  let c : ℂ := 1 / (Fintype.card D : ℂ)97  let C := Unitary.conjStarAlgAut ℂ _ hM.isHermitian.eigenvectorUnitary98  have hm : M = c • 1 := maximallyMixed_matrix D99  have hd : diagonal (fun j ↦ (w j : ℂ)) = c • 1 := by100    apply C.injective101    change C (diagonal (fun j ↦ (w j : ℂ))) = C (c • 1)102    rw [map_smul, map_one, ← hm]103    exact hM.isHermitian.spectral_theorem.symm104  have hw (j : D) : (w j : ℂ) = c := by105    simpa using congrArg (fun N : Matrix D D ℂ ↦ N j j) hd106  let i : D := Classical.choice inferInstance107  have he (j : D) : w j = w i := Complex.ofReal_injective ((hw j).trans (hw i).symm)108  let z : ℝ := ∫ t in Ioi (0 : ℝ), (w i / (1 + t*w i)) * ∏ j, (1+t*w j)⁻¹109  have hsign : spatialSign M = (z : ℂ) • 1 := by110    rw [spatialSign_spectral hM]111    change C (diagonal _) = _112    rw [← map_one C, ← map_smul]113    apply congrArg C114    ext j l115    by_cases h : j = l116    · subst l117      simp only [diagonal_apply_eq, Matrix.smul_apply, one_apply_eq, smul_eq_mul, mul_one]118      change ((∫ t in Ioi (0 : ℝ), (w j / (1 + t * w j)) * ∏ u, (1 + t * w u)⁻¹ : ℝ) : ℂ) = _119      rw [he j]120    · simp [h]121  have ht : M.trace = 1 := (maximallyMixed D).2.2122  have htr := spatialSign_trace_one hM (ne_zero_of_trace_one ht)123  rw [hsign, trace_smul, trace_one, smul_eq_mul] at htr124  have hz : (z : ℂ) = c := by125    exact (eq_div_iff (Nat.cast_ne_zero.mpr Fintype.card_ne_zero)).2 htr126  exact hsign.trans ((congrArg (fun v : ℂ ↦ v • (1 : Matrix D D ℂ)) hz).trans hm.symm)127128/-- The optimal coefficient at the maximally mixed marginal is the reciprocal dimension. -/129theorem spatialSign_norm_maximallyMixed (D : Type*) [Fintype D] [DecidableEq D] [Nonempty D] :130    ‖spatialSign (densityMatrix (maximallyMixed D))‖ = 1 / (Fintype.card D : ℝ) := by131  rw [spatialSign_maximallyMixed, maximallyMixed_matrix, norm_smul, norm_one, mul_one]132  simp133134end SubentropyCertificates.ConditionalContinuity

Axioms used

Choose a statement to see which axioms its proof uses.