Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.PositiveLinearization

Download original .lean · View on GitHub · Jump to source

Direct imports

  • Nonadditivity.Linearization
  • Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order dependency
  • Mathlib.Analysis.CStarAlgebra.Hom dependency

Imported by project modules

3 direct reverse imports

Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.

Declarations in this module

25 project constants, including generated, internal and private declarations.

25 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Linearization7import Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order8import Mathlib.Analysis.CStarAlgebra.Hom910/-!11# Unconditional positive blocks for finite-set linearization1213The positive block used in Appendix A is constructed directly by functional14calculus, so no polar-decomposition identities are supplied as hypotheses.15-/1617set_option backward.isDefEq.respectTransparency false1819namespace Nonadditivity.Linearization2021open scoped ComplexOrder MatrixOrder Matrix.Norms.L2Operator2223variable {ι : Type*} [Fintype ι] [DecidableEq ι]2425/-- A diagonal block matrix with positive blocks is positive. -/26theorem diagonal_blocks_posSemidef (A B : Matrix ι ι ℂ)27    (hA : A.PosSemidef) (hB : B.PosSemidef) :28    (Matrix.fromBlocks A 0 0 B).PosSemidef := by29  let R := Matrix.fromBlocks (CFC.sqrt A) 0 0 (CFC.sqrt B)30  have hR := Matrix.posSemidef_conjTranspose_mul_self R31  simpa [R, Matrix.fromBlocks_conjTranspose, Matrix.fromBlocks_multiply,32    positive_sqrt_gram A hA, positive_sqrt_gram B hB] using hR3334/-- The modulus of a Hermitian dilation is the diagonal pair of moduli. -/35theorem abs_hermitianDilation (c : Matrix ι ι ℂ) :36    CFC.abs (hermitianDilation c) =37      Matrix.fromBlocks (CFC.abs c.conjTranspose) 0 0 (CFC.abs c) := by38  have hD := diagonal_blocks_posSemidef (CFC.abs c.conjTranspose) (CFC.abs c)39    (Matrix.LE.le.posSemidef (CFC.abs_nonneg c.conjTranspose))40    (Matrix.LE.le.posSemidef (CFC.abs_nonneg c))41  apply (CFC.sq_eq_sq_iff _ _ (CFC.abs_nonneg _) hD.nonneg).mp42  rw [CFC.abs_sq, Matrix.star_eq_conjTranspose,43    (hermitianDilation_isHermitian c), hermitianDilation_sq]44  simp [pow_two, Matrix.fromBlocks_multiply, CFC.abs_mul_abs,45    Matrix.star_eq_conjTranspose]4647/-- The exact positive polar block, valid for every complex square matrix. -/48theorem modulus_block_posSemidef (c : Matrix ι ι ℂ) :49    (Matrix.fromBlocks (CFC.abs c.conjTranspose) c c.conjTranspose50      (CFC.abs c)).PosSemidef := by51  have hH : IsSelfAdjoint (hermitianDilation c) := hermitianDilation_isHermitian c52  have h : 0 ≤ CFC.abs (hermitianDilation c) + hermitianDilation c := by53    rw [CFC.abs_add_self _ hH]54    exact nsmul_nonneg (CFC.posPart_nonneg _) 255  have hp := Matrix.LE.le.posSemidef h56  rw [abs_hermitianDilation] at hp57  simpa [hermitianDilation, Matrix.fromBlocks_add] using hp5859/-- The constant-block correction in the appendix is positive, with its60scalar chosen explicitly. -/61theorem constant_correction_posSemidef (D c : Matrix ι ι ℂ)62    (hD : D.PosSemidef) (hc : c.IsHermitian) :63    (algebraMap ℝ (Matrix ι ι ℂ) ‖D + CFC.abs c‖ + c - D).PosSemidef := by64  letI : CStarAlgebra (Matrix ι ι ℂ) := { }65  have hsum : 0 ≤ D + CFC.abs c := add_nonneg hD.nonneg (CFC.abs_nonneg c)66  have hupper := (IsSelfAdjoint.of_nonneg hsum).le_algebraMap_norm_self67  have hpos : 0 ≤ CFC.abs c + c := by68    rw [CFC.abs_add_self c hc.isSelfAdjoint]69    exact nsmul_nonneg (CFC.posPart_nonneg c) 270  have h := add_nonneg (sub_nonneg.mpr hupper) hpos71  have heq : algebraMap ℝ (Matrix ι ι ℂ) ‖D + CFC.abs c‖ -72      (D + CFC.abs c) + (CFC.abs c + c) =73      algebraMap ℝ (Matrix ι ι ℂ) ‖D + CFC.abs c‖ + c - D := by abel74  rw [heq] at h75  exact Matrix.LE.le.posSemidef h7677/-- Taking the matrix modulus preserves every vector's output norm. -/78theorem modulus_apply_norm (c : Matrix ι ι ℂ) (x : EuclideanSpace ℂ ι) :79    ‖Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) (CFC.abs c) x‖ = ‖Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) c x‖ := by80  have hgram : star (Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) (CFC.abs c)) *81      Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) (CFC.abs c) =82      star (Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) c) * Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) c := by83    rw [← map_star, ← map_mul, ← map_star, ← map_mul]84    congr 185    rw [(IsSelfAdjoint.of_nonneg (CFC.abs_nonneg c)).star_eq, CFC.abs_mul_abs]86  apply (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp87  rw [ContinuousLinearMap.apply_norm_sq_eq_inner_adjoint_left,88    ContinuousLinearMap.apply_norm_sq_eq_inner_adjoint_left]89  exact congrArg (fun T : EuclideanSpace ℂ ι →L[ℂ] EuclideanSpace ℂ ι =>90    (inner ℂ (T x) x).re) hgram9192/-- The precise additive-constant bound from coefficient energy. The moduli93and the matrix operator norm here are the actual functional-calculus ones. -/94theorem modulus_sum_norm_le_sqrt_card {κ : Type*} (s : Finset κ)95    (c : κ → Matrix ι ι ℂ) (ρ : ℝ) (hρ : 0 ≤ ρ)96    (henergy : ∀ x : EuclideanSpace ℂ ι,97      ∑ w ∈ s, ‖Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) (c w) x‖ ^ 2 ≤ ρ ^ 2 * ‖x‖ ^ 2) :98    ‖∑ w ∈ s, CFC.abs (c w)‖ ≤ Real.sqrt (s.card : ℝ) * ρ := by99  rw [← Matrix.l2_opNorm_toEuclideanCLM, map_sum]100  apply operator_sum_norm_le_sqrt_card s (fun w => Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) (CFC.abs (c w)))101    ρ hρ102  intro x103  simpa only [modulus_apply_norm] using henergy x104105/-- Diagonal blocks give an injective star-algebra homomorphism. -/106def diagonalBlocksHom :107    (Matrix ι ι ℂ × Matrix ι ι ℂ) →⋆ₐ[ℂ] Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ where108  toFun p := Matrix.fromBlocks p.1 0 0 p.2109  map_zero' := Matrix.fromBlocks_zero110  map_one' := Matrix.fromBlocks_one111  map_add' p q := by simp [Matrix.fromBlocks_add]112  map_mul' p q := by simp [Matrix.fromBlocks_multiply]113  commutes' z := by ext i j; cases i <;> cases j <;>114    simp [Algebra.algebraMap_eq_smul_one, Matrix.smul_apply, Matrix.one_apply]115  map_star' p := by simp [Matrix.star_eq_conjTranspose, Matrix.fromBlocks_conjTranspose]116117theorem diagonalBlocksHom_injective :118    Function.Injective (diagonalBlocksHom (ι := ι)) := by119  intro p q h120  apply Prod.ext121  · ext i j122    exact congrArg (fun A => A (Sum.inl i) (Sum.inl j)) h123  · ext i j124    exact congrArg (fun A => A (Sum.inr i) (Sum.inr j)) h125126/-- The Euclidean operator norm of diagonal blocks is the larger block norm. -/127theorem diagonal_blocks_norm (A B : Matrix ι ι ℂ) :128    ‖Matrix.fromBlocks A 0 0 B‖ = max ‖A‖ ‖B‖ := by129  letI : CStarAlgebra (Matrix ι ι ℂ) := { }130  letI : CStarAlgebra (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) := { }131  exact NonUnitalStarAlgHom.norm_map (diagonalBlocksHom (ι := ι))132    diagonalBlocksHom_injective (A, B)133134/-- Hermitian dilation preserves the actual matrix operator norm. -/135theorem hermitianDilation_norm (c : Matrix ι ι ℂ) :136    ‖hermitianDilation c‖ = ‖c‖ := by137  have h := Matrix.l2_opNorm_conjTranspose_mul_self (hermitianDilation c)138  rw [(hermitianDilation_isHermitian c), hermitianDilation_sq,139    diagonal_blocks_norm] at h140  have hc : ‖c * c.conjTranspose‖ = ‖c‖ * ‖c‖ := by141    simpa [Matrix.l2_opNorm_conjTranspose] using142      Matrix.l2_opNorm_conjTranspose_mul_self c.conjTranspose143  rw [hc, Matrix.l2_opNorm_conjTranspose_mul_self, max_self] at h144  nlinarith [norm_nonneg c, norm_nonneg (hermitianDilation c)]145146/-- The grading unitary exchanges the two spectral signs of a dilation. -/147def dilationSign : unitary (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) :=148  ⟨Matrix.fromBlocks 1 0 0 (-1), by149    rw [Unitary.mem_iff]150    constructor <;>151      simp [Matrix.star_eq_conjTranspose, Matrix.fromBlocks_conjTranspose,152        Matrix.fromBlocks_multiply, Matrix.fromBlocks_one]⟩153154theorem dilationSign_conjugate (c : Matrix ι ι ℂ) :155    (dilationSign (ι := ι) : Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) * hermitianDilation c *156      (star (dilationSign (ι := ι)) : Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) = -hermitianDilation c := by157  simp [dilationSign, hermitianDilation, Matrix.star_eq_conjTranspose,158    Matrix.fromBlocks_conjTranspose, Matrix.fromBlocks_multiply, Matrix.fromBlocks_neg]159160/-- The positive spectral endpoint is the original matrix's norm. -/161theorem norm_mem_dilation_spectrum [Nonempty ι] (c : Matrix ι ι ℂ) :162    ‖c‖ ∈ spectrum ℝ (hermitianDilation c) := by163  letI : CStarAlgebra (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) := { }164  have hsym : spectrum ℝ (-hermitianDilation c) = spectrum ℝ (hermitianDilation c) := by165    rw [← dilationSign_conjugate c]166    exact Unitary.spectrum_star_right_conjugate167  rcases CStarAlgebra.norm_or_neg_norm_mem_spectrum168    (hermitianDilation_isHermitian c).isSelfAdjoint with h | h169  · simpa only [hermitianDilation_norm] using h170  · rw [hermitianDilation_norm] at h171    have hneg : ‖c‖ ∈ spectrum ℝ (-hermitianDilation c) := by172      rw [← spectrum.neg_eq]173      exact h174    rwa [hsym] at hneg175176/-- The exact norm identity needed after the positive Gram construction. -/177theorem shifted_dilation_norm [Nonempty ι] (c : Matrix ι ι ℂ)178    (θ : ℝ) (hθ : 0 ≤ θ) :179    ‖hermitianDilation c + algebraMap ℝ (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) θ‖ =180      ‖c‖ + θ := by181  letI : CStarAlgebra (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) := { }182  apply le_antisymm183  · calc184      _ ≤ ‖hermitianDilation c‖ +185          ‖algebraMap ℝ (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) θ‖ := norm_add_le _ _186      _ = ‖c‖ + θ := by187        rw [hermitianDilation_norm, norm_algebraMap', Real.norm_eq_abs, abs_of_nonneg hθ]188  · have hmem : ‖c‖ + θ ∈ spectrum ℝ189        (hermitianDilation c + algebraMap ℝ (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) θ) := by190      rw [← spectrum.add_singleton_eq]191      exact Set.add_mem_add (norm_mem_dilation_spectrum c) (Set.mem_singleton θ)192    have h := spectrum.norm_le_norm_of_mem hmem193    rwa [Real.norm_eq_abs, abs_of_nonneg (add_nonneg (norm_nonneg c) hθ)] at h194195/-- The matrix Gram identity alone supplies the exact squared norm;196no factor norm equality is assumed. -/197theorem factor_norm_sq_of_shifted_gram [Nonempty ι]198    {κ : Type*} [Fintype κ] (c : Matrix ι ι ℂ)199    (Q : Matrix κ (ι ⊕ ι) ℂ) (θ : ℝ) (hθ : 0 ≤ θ)200    (hgram : Q.conjTranspose * Q = hermitianDilation c +201      algebraMap ℝ (Matrix (ι ⊕ ι) (ι ⊕ ι) ℂ) θ) :202    ‖Q‖ ^ 2 = ‖c‖ + θ := by203  rw [pow_two, ← Matrix.l2_opNorm_conjTranspose_mul_self, hgram]204  exact shifted_dilation_norm c θ hθ205206/-- Padding a rectangular polynomial into a fixed block column preserves207its Euclidean operator norm. -/208theorem right_isometry_mul_norm {κ ν : Type*} [Fintype κ] [Fintype ν] [DecidableEq ν]209    (Q : Matrix κ ι ℂ) (V : Matrix ι ν ℂ)210    (hV : V * V.conjTranspose = 1) : ‖Q * V‖ = ‖Q‖ := by211  classical212  have hgram : (Q * V) * (Q * V).conjTranspose = Q * Q.conjTranspose := by213    rw [Matrix.conjTranspose_mul]214    simp only [Matrix.mul_assoc]215    rw [← Matrix.mul_assoc V, hV, Matrix.one_mul]216  have hQ : ‖Q * Q.conjTranspose‖ = ‖Q‖ * ‖Q‖ := by217    simpa only [Matrix.conjTranspose_conjTranspose, Matrix.l2_opNorm_conjTranspose] using218      Matrix.l2_opNorm_conjTranspose_mul_self Q.conjTranspose219  have hQV : ‖(Q * V) * (Q * V).conjTranspose‖ = ‖Q * V‖ * ‖Q * V‖ := by220    simpa only [Matrix.conjTranspose_conjTranspose, Matrix.l2_opNorm_conjTranspose] using221      Matrix.l2_opNorm_conjTranspose_mul_self (Q * V).conjTranspose222  rw [hgram, hQ] at hQV223  nlinarith [norm_nonneg Q, norm_nonneg (Q * V)]224225end Nonadditivity.Linearization