HalfTracePairing.lean
1module23public import SubentropyCertificates.HelstromSpectral4public import SubentropyCertificates.SpatialSignBlockDiagonal56/-! Trace pairings of a positive operator with a traceless Hermitian perturbation. -/7@[expose] public section8noncomputable section9open Matrix10open scoped BigOperators MatrixOrder ComplexOrder Matrix.Norms.L2Operator1112namespace SubentropyCertificates.ConditionalContinuity1314variable {D X : Type*} [Fintype D] [DecidableEq D] [Fintype X] [DecidableEq X]1516/-- For a traceless perturbation, the tests F and I - F give opposite trace pairings. -/17private theorem effect_pairing_half {F H : Matrix D D ℂ} (hh : H.IsHermitian)18 (ht : H.trace = 0) (hf : 0 ≤ F) (hu : F ≤ 1) :19 |(F * H).trace.re| ≤ (∑ i, |hh.eigenvalues i|) / 2 := by20 obtain ⟨E, _, _, _, he, hmax⟩ := SubentropyCertificates.Helstrom.spectral_test hh21 have hupper := hmax F hf.posSemidef (sub_nonneg.mpr hu).posSemidef22 have hother : (1 - (1 - F)).PosSemidef := by simpa using hf.posSemidef23 have hlower := hmax (1 - F) (sub_nonneg.mpr hu).posSemidef hother24 rw [Matrix.sub_mul, Matrix.one_mul, trace_sub, ht, zero_sub, Complex.neg_re] at hlower25 rw [ht, Complex.zero_re, sub_zero] at he26 exact abs_le.mpr ⟨by linarith, by linarith⟩2728/-- If 0 ≤ B ≤ k I and H is Hermitian with trace zero, the absolute trace pairing is29bounded by k times half the sum of the absolute eigenvalues of H. -/30theorem trace_pairing_half_bound {B H : Matrix D D ℂ} (k : ℝ) (hk : 0 ≤ k)31 (hb : 0 ≤ B) (hu : B ≤ k • 1) (hh : H.IsHermitian) (ht : H.trace = 0) :32 |(B * H).trace.re| ≤ k * ((∑ i, |hh.eigenvalues i|) / 2) := by33 rcases hk.eq_or_lt with h | h34 · subst k35 have he : B = 0 := le_antisymm (by simpa using hu) hb36 simp [he]37 · let F := k⁻¹ • B38 have hp : 0 ≤ F := smul_nonneg (inv_nonneg.mpr hk) hb39 have hf : F ≤ 1 := by40 simpa [F, smul_smul, h.ne'] using smul_le_smul_of_nonneg_left hu (inv_nonneg.mpr hk)41 have he := effect_pairing_half hh ht hp hf42 have hb' : k • F = B := by simp [F, smul_smul, h.ne']43 rw [← hb', Matrix.smul_mul, trace_smul]44 simpa [Complex.real_smul, abs_mul, abs_of_nonneg hk] using mul_le_mul_of_nonneg_left he hk4546omit [Fintype D] [DecidableEq D] [Fintype X] in47/-- A direct sum of Hermitian blocks is Hermitian. -/48theorem blockHermitian (H : X → Matrix D D ℂ) (hh : ∀ x, (H x).IsHermitian) :49 (blockDiagonal H).IsHermitian := by50 change (blockDiagonal H)ᴴ = blockDiagonal H51 rw [blockDiagonal_conjTranspose]52 exact congrArg blockDiagonal (funext fun x ↦ (hh x).eq)5354/-- The half-trace bound for a whole block family only needs the total trace to vanish. -/55theorem block_pairing_half_bound (B H : X → Matrix D D ℂ) (k : ℝ) (hk : 0 ≤ k)56 (hb : ∀ x, 0 ≤ B x) (hu : ∀ x, B x ≤ k • 1) (hh : ∀ x, (H x).IsHermitian)57 (ht : (∑ x, H x).trace = 0) :58 |∑ x, ((B x * H x).trace).re| ≤ k * ((∑ i, |(blockHermitian H hh).eigenvalues i|) / 2) := by59 have hp := (blocks_posSemidef B (fun x ↦ (hb x).posSemidef)).nonneg60 have hu' : blockDiagonal B ≤ k • 1 := by61 have h := (blocks_posSemidef (k • (1 : X → Matrix D D ℂ) - B)62 (fun x ↦ (sub_nonneg.mpr (hu x)).posSemidef)).nonneg63 rw [blockDiagonal_sub, blockDiagonal_smul, blockDiagonal_one] at h64 exact sub_nonneg.mp h65 have htr : (blockDiagonal H).trace = 0 := by66 simpa only [trace_blockDiagonal, trace_sum] using ht67 simpa only [← blockDiagonal_mul, trace_blockDiagonal, Complex.re_sum] using68 trace_pairing_half_bound k hk hp hu' (blockHermitian H hh) htr6970end SubentropyCertificates.ConditionalContinuity
Axioms used
Choose a statement to see which axioms its proof uses.