Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.PositiveHolevo

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

Direct imports

  • Nonadditivity.HolevoBits
  • Mathlib.LinearAlgebra.Eigenspace.Triangularizable dependency
  • Mathlib.Analysis.Complex.Polynomial.Basic dependency

Imported by project modules

4 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

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

28 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HolevoBits7import Mathlib.LinearAlgebra.Eigenspace.Triangularizable8import Mathlib.Analysis.Complex.Polynomial.Basic910/-! # A universal lower bound for the constructed channel's Holevo quantity1112The witnesses are actual pure inputs, obtained from complex eigenvectors of13the relative unitary of two branches. No adjoint norm bound is used.14-/1516noncomputable section1718namespace Nonadditivity.PositiveHolevo1920open Entropy Channels Channels.KrausChannel BlockConstruction Conversion21open scoped BigOperators ComplexOrder ComplexConjugate Matrix2223variable {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]2425/-- Every complex square matrix on a nonempty finite space has a normalized26eigenvector. Normalization uses the actual sum of coordinate norm squares. -/27theorem exists_normalized_eigenvector (M : Matrix ι ι ℂ) :28    ∃ z : ℂ, ∃ v : ι → ℂ,29      (∑ i, Complex.normSq (v i)) = 1 ∧ M *ᵥ v = z • v := by30  obtain ⟨z,hz⟩ := Module.End.exists_eigenvalue (Matrix.toLin' M)31  obtain ⟨x,hx⟩ := hz.exists_hasEigenvector32  obtain ⟨j,hj⟩ := Function.ne_iff.mp hx.233  have hS : 0 < ∑ i, Complex.normSq (x i) := by34    apply Finset.sum_pos'35    · intro i _36      exact Complex.normSq_nonneg _37    · exact ⟨j, Finset.mem_univ _, Complex.normSq_pos.mpr hj⟩38  let r : ℝ := Real.sqrt (∑ i, Complex.normSq (x i))39  have hr : 0 < r := Real.sqrt_pos.mpr hS40  let v : ι → ℂ := Complex.ofReal (r⁻¹) • x41  refine ⟨z,v,?_,?_⟩42  · simp only [v, Pi.smul_apply, smul_eq_mul, Complex.normSq_mul,43      Complex.normSq_ofReal, ← Finset.mul_sum]44    have hs : r * r = ∑ i, Complex.normSq (x i) := Real.mul_self_sqrt hS.le45    rw [← hs]46    field_simp [ne_of_gt hr]47  · have he : M *ᵥ x = z • x := by48      simpa only [Matrix.toLin'_apply] using hx.apply_eq_smul49    dsimp only [v]50    rw [Matrix.mulVec_smul, he, smul_smul, smul_smul, mul_comm]5152/-- Two unitary branches have a pure input whose output projections agree.53The phase modulus is derived from trace normalization of the actual states. -/54theorem exists_pure_input_equal_unitary_outputs55    (U V : unitary (Matrix ι ι ℂ)) :56    ∃ v : ι → ℂ, ∃ hv : (∑ i, Complex.normSq (v i)) = 1,57      (pureState v hv).unitaryConjugate U = (pureState v hv).unitaryConjugate V := by58  obtain ⟨z,v,hv,he⟩ := exists_normalized_eigenvector59    ((U : Matrix ι ι ℂ).conjTranspose * (V : Matrix ι ι ℂ))60  have hUV : (U : Matrix ι ι ℂ) * (U : Matrix ι ι ℂ).conjTranspose = 1 := by61    simpa only [← Matrix.star_eq_conjTranspose] using Unitary.coe_mul_star_self U62  have hphase : (V : Matrix ι ι ℂ) *ᵥ v = z • ((U : Matrix ι ι ℂ) *ᵥ v) := by63    have h := congrArg (fun x => (U : Matrix ι ι ℂ) *ᵥ x) he64    simpa only [Matrix.mulVec_mulVec, ← Matrix.mul_assoc, hUV,65      Matrix.one_mul, Matrix.mulVec_smul] using h66  let σ := (pureState v hv).unitaryConjugate U67  let τ := (pureState v hv).unitaryConjugate V68  have hm : τ.matrix = (Complex.normSq z : ℂ) • σ.matrix := by69    change (V : Matrix ι ι ℂ) * Matrix.vecMulVec v (star v) * _ =70      (Complex.normSq z : ℂ) •71        ((U : Matrix ι ι ℂ) * Matrix.vecMulVec v (star v) * _)72    rw [Matrix.star_eq_conjTranspose, Matrix.star_eq_conjTranspose,73      BellOutput.conjugation_vecMulVec, BellOutput.conjugation_vecMulVec, hphase]74    ext a b75    simp only [Matrix.vecMulVec_apply, Pi.smul_apply, Pi.star_apply, star_mul,76      smul_eq_mul, Matrix.smul_apply]77    rw [← Complex.mul_conj z]78    simp only [Complex.star_def]79    ring80  have hz : (Complex.normSq z : ℂ) = 1 := by81    have ht := congrArg Matrix.trace hm82    simpa only [τ.normalized, Matrix.trace_smul, σ.normalized, smul_eq_mul, mul_one] using ht.symm83  refine ⟨v,hv,?_⟩84  apply DensityMatrix.ext85  exact (hm.trans (by rw [hz, one_smul])).symm8687section MergedWeights8889variable {κ : Type*} [Fintype κ] [DecidableEq κ] [Nonempty κ]9091/-- The two first branch weights are merged, retaining a zero-weight label. -/92def twoMergedWeights (a b : κ) (i : κ) : ℝ :=93  if i = a then 2 / (Fintype.card κ : ℝ)94  else if i = b then 0 else 1 / (Fintype.card κ : ℝ)9596theorem twoMergedWeights_nonneg (a b i : κ) : 0 ≤ twoMergedWeights a b i := by97  unfold twoMergedWeights98  split_ifs <;> positivity99100omit [Nonempty κ] in101theorem twoMergedWeights_eq (a b : κ) (hab : a ≠ b) (i : κ) :102    twoMergedWeights a b i = 1 / (Fintype.card κ : ℝ) +103      (if i = a then 1 / (Fintype.card κ : ℝ) else 0) -104      (if i = b then 1 / (Fintype.card κ : ℝ) else 0) := by105  by_cases ha : i = a106  · subst i107    simp [twoMergedWeights, hab]108    ring109  · by_cases hb : i = b110    · subst i111      simp [twoMergedWeights, Ne.symm hab]112    · simp [twoMergedWeights, ha, hb]113114theorem twoMergedWeights_sum (a b : κ) (hab : a ≠ b) :115    ∑ i, twoMergedWeights a b i = 1 := by116  simp_rw [twoMergedWeights_eq a b hab]117  rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]118  simp [Fintype.card_ne_zero]119120theorem twoMergedWeights_shannon (a b : κ) (hab : a ≠ b) :121    shannon (twoMergedWeights a b) = Real.log (Fintype.card κ) -122      2 * Real.log 2 / (Fintype.card κ : ℝ) := by123  have hK : (Fintype.card κ : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero124  have hterm (i : κ) :125      twoMergedWeights a b i * Real.log (twoMergedWeights a b i) =126        (1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ)) +127        (if i = a then128          (2 / (Fintype.card κ : ℝ)) * Real.log (2 / (Fintype.card κ : ℝ)) -129            (1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ))130         else 0) -131        (if i = b then132          (1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ))133         else 0) := by134    by_cases ha : i = a135    · subst i136      simp [twoMergedWeights, hab]137    · by_cases hb : i = b138      · subst i139        simp [twoMergedWeights, Ne.symm hab]140      · simp [twoMergedWeights, ha, hb]141  unfold shannon142  simp_rw [hterm]143  rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]144  simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul,145    Finset.sum_ite_eq', Finset.mem_univ, if_true]146  rw [Real.log_div (by norm_num : (2 : ℝ) ≠ 0) hK]147  simp only [one_div, Real.log_inv]148  field_simp149  ring150151omit [Nonempty ι] in152set_option maxHeartbeats 150000 in153/-- The equality of two actual output states merges their weights in the154actual random-unitary output matrix. No orthogonality is needed. -/155theorem uniformUnitary_output_eq_twoMerged156    (U : κ → unitary (Matrix ι ι ℂ)) (ρ : DensityMatrix ι)157    (a b : κ) (hab : a ≠ b)158    (heq : ρ.unitaryConjugate (U a) = ρ.unitaryConjugate (U b)) :159    (uniformUnitary U).output ρ =160      DensityMatrix.mixture (twoMergedWeights a b) (twoMergedWeights_nonneg a b)161        (twoMergedWeights_sum a b hab) (fun i => ρ.unitaryConjugate (U i)) := by162  let pu : κ → ℝ := fun _ => 1 / (Fintype.card κ : ℝ)163  have hpu : ∀ i, 0 ≤ pu i := fun _ => by dsimp [pu]; positivity164  have hsu : ∑ i, pu i = 1 := by simp [pu, Fintype.card_ne_zero]165  have houtput : (uniformUnitary U).output ρ =166      DensityMatrix.mixture pu hpu hsu (fun i => ρ.unitaryConjugate (U i)) := by167    apply DensityMatrix.ext168    change (randomUnitary _ _ _ U).map ρ.matrix = _169    rw [randomUnitary_map]170    simp only [DensityMatrix.mixture_matrix, DensityMatrix.unitaryConjugate,171      Matrix.star_eq_conjTranspose, pu]172  rw [houtput]173  apply DensityMatrix.ext174  simp only [DensityMatrix.mixture_matrix]175  ext x y176  simp only [Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul]177  have hp (i : κ) : (twoMergedWeights a b i : ℂ) =178      Complex.ofReal (1 / (Fintype.card κ : ℝ)) +179      (if i = a then Complex.ofReal (1 / (Fintype.card κ : ℝ)) else 0) -180      (if i = b then Complex.ofReal (1 / (Fintype.card κ : ℝ)) else 0) := by181    have hh := congrArg Complex.ofReal (twoMergedWeights_eq a b hab i)182    simpa only [Complex.ofReal_add, Complex.ofReal_sub, apply_ite,183      Complex.ofReal_zero] using hh184  have hterm (i : κ) : (twoMergedWeights a b i : ℂ) *185      (ρ.unitaryConjugate (U i)).matrix x y =186      Complex.ofReal (1 / (Fintype.card κ : ℝ)) * (ρ.unitaryConjugate (U i)).matrix x y +187      (if i = a then Complex.ofReal (1 / (Fintype.card κ : ℝ)) *188        (ρ.unitaryConjugate (U i)).matrix x y else 0) -189      (if i = b then Complex.ofReal (1 / (Fintype.card κ : ℝ)) *190        (ρ.unitaryConjugate (U i)).matrix x y else 0) := by191    rw [hp]192    split_ifs <;> ring193  simp_rw [hterm]194  rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]195  simp only [Finset.sum_ite_eq', Finset.mem_univ, if_true]196  rw [heq]197  simp only [pu, add_sub_cancel_right]198199/-- The phase-aligned eigenvector is an actual local complementary-channel200input with the stated output entropy deficit. -/201theorem exists_complementary_entropy_le202    (U : κ → unitary (Matrix ι ι ℂ)) (a b : κ) (hab : a ≠ b) :203    ∃ ρ : DensityMatrix ι,204      ((uniformUnitary U).complementary.output ρ).vonNeumann ≤205        Real.log (Fintype.card κ) - 2 * Real.log 2 / (Fintype.card κ : ℝ) := by206  obtain ⟨v,hv,heq⟩ := exists_pure_input_equal_unitary_outputs (U a) (U b)207  let ρ := pureState v hv208  have hm := uniformUnitary_output_eq_twoMerged U ρ a b hab heq209  have h := EntropyMixtures.densityMatrix_mixture_entropy_upper210    (twoMergedWeights a b) (twoMergedWeights_nonneg a b)211    (twoMergedWeights_sum a b hab) (fun i => ρ.unitaryConjugate (U i))212  have hz (i : κ) : (ρ.unitaryConjugate (U i)).vonNeumann = 0 := by213    rw [DensityMatrix.unitaryConjugate_entropy]214    exact pureState_entropy_zero v hv215  simp only [hz, mul_zero, Finset.sum_const_zero, add_zero,216    twoMergedWeights_shannon a b hab] at h217  refine ⟨ρ,?_⟩218  rw [← (uniformUnitary U).pure_output_complementary_entropy_eq v hv, hm]219  exact h220221end MergedWeights222223/-- Product inputs tensor the actual local eigenvector witnesses. -/224theorem exists_block_entropy_le {K : ℕ} [NeZero K] (hK : 2 ≤ K)225    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :226    ∃ ρ : DensityMatrix (TensorChainIndex ι n),227      ((blockChannel U n).output ρ).vonNeumann ≤228        (n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) := by229  let a : Fin K := ⟨0, by omega⟩230  let b : Fin K := ⟨1, by omega⟩231  have hab : a ≠ b := by232    intro h233    have h' := congrArg Fin.val h234    change (0 : ℕ) = 1 at h'235    omega236  have hex (j : ℕ) := exists_complementary_entropy_le (U j) a b hab237  choose ρ hρ using hex238  let σ := DensityMatrix.tensorChain ρ n239  have hsum : ((BlockBell.blockComplementary U n).output σ).vonNeumann ≤240      (n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) := by241    change ((tensorChain (fun j => (uniformUnitary (U j)).complementary) n).output242      (DensityMatrix.tensorChain ρ n)).vonNeumann ≤ _243    rw [tensorChain_output_entropy]244    calc245      _ ≤ ∑ j ∈ Finset.range n,246          (Real.log K - 2 * Real.log 2 / (K : ℝ)) := by247        apply Finset.sum_le_sum248        intro j _249        simpa only [Fintype.card_fin] using hρ j250      _ = _ := by simp; ring251  have hout := reindex_output_eq (BlockBell.blockComplementary U n)252    (Equiv.refl _) (blockOutputEquiv K n) σ253  rw [DensityMatrix.reindex_refl] at hout254  refine ⟨σ,?_⟩255  change (((BlockBell.blockComplementary U n).reindex (Equiv.refl _)256    (blockOutputEquiv K n)).output σ).vonNeumann ≤ _257  rw [hout, DensityMatrix.reindex_entropy]258  exact hsum259260/-- Every constructed switch/Weyl block channel has a universal single-use261Holevo lower bound, independently of any analytic certificate. -/262theorem block_converted_holevo_lower {K : ℕ} [NeZero K] (hK : 2 ≤ K)263    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :264    2 * (n : ℝ) * Real.log 2 / (K : ℝ) ≤ (converted (blockChannel U n)).holevo := by265  obtain ⟨ρ,hρ⟩ := exists_block_entropy_le hK U n266  have hmin : (blockChannel U n).minimumEntropy ≤267      ((blockChannel U n).output ρ).vonNeumann :=268    StateEnsembles.minimumEntropy_le ⟨ρ,rfl⟩269  rw [converted_holevo]270  have hlog : Real.log ((K ^ n : ℕ) : ℝ) = (n : ℝ) * Real.log K := by271    rw [Nat.cast_pow, Real.log_pow]272  rw [hlog]273  have halg : (n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) =274      (n : ℝ) * Real.log K - 2 * (n : ℝ) * Real.log 2 / (K : ℝ) := by ring275  rw [halg] at hρ276  linarith277278/-- The supplemental manuscript estimate in bits, on the actual channels. -/279theorem block_converted_holevoBits_lower {K : ℕ} [NeZero K] (hK : 2 ≤ K)280    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :281    2 * (n : ℝ) / (K : ℝ) ≤ (converted (blockChannel U n)).holevoBits := by282  apply (le_div_iff₀ Scalar.log_two_pos).mpr283  have h := block_converted_holevo_lower hK U n284  convert h using 1285  ring286287/-- Strict positivity, including the denominator needed for channel ratios. -/288theorem block_converted_holevoBits_pos {K : ℕ} [NeZero K] (hK : 2 ≤ K)289    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) {n : ℕ} (hn : 1 ≤ n) :290    0 < (converted (blockChannel U n)).holevoBits := by291  have h := block_converted_holevoBits_lower hK U n292  have hpos : 0 < 2 * (n : ℝ) / (K : ℝ) := by293    have hnpos : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n)294    have hKpos : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)295    positivity296  exact hpos.trans_le h297298end Nonadditivity.PositiveHolevo