Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.SmallEnvironment

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

Direct imports

Imported by project modules

2 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

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

16 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.GeneralBell7import Nonadditivity.PositiveHolevo8import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv910/-! # Positive Holevo information for channels with a small environment1112A channel with equally sized input and Kraus-label spaces, and at least two13output coordinates, has a pure input whose output is singular. This gives14a positive Holevo denominator after the switch/Weyl conversion.15-/1617noncomputable section18set_option maxHeartbeats 80000019set_option backward.isDefEq.respectTransparency false2021namespace Nonadditivity.SmallEnvironment2223open Entropy Channels Channels.KrausChannel24open scoped BigOperators Matrix ComplexOrder2526theorem shannon_le_log_card_sub_one {ι : Type*} [Fintype ι] [DecidableEq ι]27    (p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)28    (j : ι) (hj : p j = 0) (hd : 2 ≤ Fintype.card ι) :29    shannon p ≤ Real.log (Fintype.card ι - 1 : ℕ) := by30  let J := {i : ι // i ≠ j}31  have hc : Fintype.card J = Fintype.card ι - 1 := by32    simp [J, Fintype.card_subtype_compl]33  letI : Nonempty J := Fintype.card_pos_iff.mp (by rw [hc]; omega)34  have hsum : ∑ i : J, p i.val = 1 := by35    have h := Fintype.sum_eq_add_sum_subtype_ne p j36    rw [hs, hj, zero_add] at h37    exact h.symm38  have he : shannon p = shannon (fun i : J => p i.val) := by39    unfold shannon40    rw [Fintype.sum_eq_add_sum_subtype_ne (fun i => p i * Real.log (p i)) j]41    simp only [hj, zero_mul, zero_add]42    rfl43  rw [he, ← hc]44  exact shannon_le_log_card _ (fun i => hp i.val) hsum4546theorem entropy_le_of_singular {ι : Type*} [Fintype ι] [DecidableEq ι]47    (ρ : DensityMatrix ι) (hd : 2 ≤ Fintype.card ι) (hdet : ρ.matrix.det = 0) :48    ρ.vonNeumann ≤ Real.log (Fintype.card ι - 1 : ℕ) := by49  rw [ρ.positive.isHermitian.det_eq_prod_eigenvalues] at hdet50  obtain ⟨j, _, hj⟩ := Finset.prod_eq_zero_iff.mp hdet51  apply shannon_le_log_card_sub_one ρ.weights ρ.weights_nonneg ρ.weights_sum j _ hd52  change (ρ.weights j : ℂ) = 0 at hj53  exact Complex.ofReal_eq_zero.mp hj5455section Square56variable {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]5758omit [Nonempty ι] in59lemma normalized_kernel (M : Matrix ι ι ℂ) (hd : M.det = 0) :60    ∃ v : ι → ℂ, (∑ i, Complex.normSq (v i)) = 1 ∧ M *ᵥ v = 0 := by61  obtain ⟨x, hx, he⟩ := Matrix.exists_mulVec_eq_zero_iff.mpr hd62  obtain ⟨j,hj⟩ := Function.ne_iff.mp hx63  have hS : 0 < ∑ i, Complex.normSq (x i) := by64    apply Finset.sum_pos'65    · intro i _; exact Complex.normSq_nonneg _66    · exact ⟨j, Finset.mem_univ _, Complex.normSq_pos.mpr hj⟩67  let r : ℝ := Real.sqrt (∑ i, Complex.normSq (x i))68  have hr : 0 < r := Real.sqrt_pos.mpr hS69  refine ⟨Complex.ofReal (r⁻¹) • x, ?_, ?_⟩70  · simp only [Pi.smul_apply, smul_eq_mul, Complex.normSq_mul,71      Complex.normSq_ofReal, ← Finset.mul_sum]72    have hs : r * r = ∑ i, Complex.normSq (x i) := Real.mul_self_sqrt hS.le73    rw [← hs]74    field_simp75  · rw [Matrix.mulVec_smul, he, smul_zero]7677lemma square_pair_dependent (A B : Matrix ι ι ℂ) :78    ∃ v : ι → ℂ, (∑ i, Complex.normSq (v i)) = 1 ∧79      (B *ᵥ v = 0 ∨ ∃ z : ℂ, A *ᵥ v = z • (B *ᵥ v)) := by80  by_cases hB : B.det = 081  · obtain ⟨v,hv,he⟩ := normalized_kernel B hB82    exact ⟨v,hv,Or.inl he⟩83  · obtain ⟨z,v,hv,he⟩ := PositiveHolevo.exists_normalized_eigenvector (B⁻¹ * A)84    refine ⟨v,hv,Or.inr ⟨z,?_⟩⟩85    have h := congrArg (fun w => B *ᵥ w) he86    simpa only [Matrix.mulVec_mulVec, ← Matrix.mul_assoc,87      Matrix.mul_nonsing_inv B (isUnit_iff_ne_zero.mpr hB), Matrix.one_mul,88      Matrix.mulVec_smul] using h8990variable {ο : Type*} [Fintype ο] [DecidableEq ο]9192def environmentMatrix (T : KrausChannel ι ο ι) (a : ο) : Matrix ι ι ℂ :=93  fun e i => T.kraus e a i9495omit [Nonempty ι] in96lemma output_entry (T : KrausChannel ι ο ι) (v : ι → ℂ)97    (hv : ∑ i, Complex.normSq (v i) = 1) (a b : ο) :98    (T.output (pureState v hv)).matrix a b =99      ∑ e, ((environmentMatrix T a) *ᵥ v) e * star (((environmentMatrix T b) *ᵥ v) e) := by100  simp only [KrausChannel.output_matrix, KrausChannel.map, pureState,101    BellOutput.conjugation_vecMulVec, Matrix.sum_apply, Matrix.vecMulVec_apply,102    Pi.star_apply]103  rfl104105/-- The matrix-pencil argument constructs a pure input with dependent106environment vectors in two output coordinates. -/107theorem exists_singular_output (T : KrausChannel ι ο ι) (a b : ο) (hab : a ≠ b) :108    ∃ ρ : DensityMatrix ι, (T.output ρ).matrix.det = 0 := by109  obtain ⟨v,hv,hdep⟩ := square_pair_dependent (environmentMatrix T a) (environmentMatrix T b)110  refine ⟨pureState v hv, Matrix.exists_vecMul_eq_zero_iff.mp ?_⟩111  rcases hdep with hb | ⟨z,hz⟩112  · refine ⟨Pi.single b 1, ?_, ?_⟩113    · intro h114      have := congrFun h b115      simp at this116    · ext c117      simp only [Matrix.vecMul, dotProduct, Pi.zero_apply]118      simp only [Pi.single_apply, ite_mul, one_mul, zero_mul, Finset.sum_ite_eq',119        Finset.mem_univ, if_true]120      rw [output_entry, hb]121      simp122  · refine ⟨(Pi.single a (1:ℂ) : ο → ℂ) - z • (Pi.single b (1:ℂ) : ο → ℂ), ?_, ?_⟩123    · intro h124      have := congrFun h a125      simp [hab] at this126    · ext c127      simp only [Matrix.vecMul, dotProduct, Pi.zero_apply, Pi.sub_apply,128        Pi.smul_apply, smul_eq_mul, sub_mul, Finset.sum_sub_distrib]129      simp only [Pi.single_apply, ite_mul, one_mul, zero_mul, mul_ite, mul_one, mul_zero,130        Finset.sum_ite_eq', Finset.mem_univ, if_true]131      rw [output_entry, output_entry, hz]132      simp [Pi.smul_apply, smul_eq_mul, Finset.mul_sum, mul_assoc]133134theorem exists_output_entropy_lt (T : KrausChannel ι ο ι)135    (hd : 2 ≤ Fintype.card ο) :136    ∃ ρ : DensityMatrix ι, (T.output ρ).vonNeumann < Real.log (Fintype.card ο : ℝ) := by137  obtain ⟨a,b,_,_,hab⟩ := Finset.one_lt_card_iff.mp138    (show 1 < (Finset.univ : Finset ο).card by simpa using hd)139  obtain ⟨ρ,hρ⟩ := exists_singular_output T a b hab140  refine ⟨ρ, (entropy_le_of_singular _ hd hρ).trans_lt ?_⟩141  apply Real.log_lt_log142  · exact_mod_cast (show 0 < Fintype.card ο - 1 by omega)143  · exact_mod_cast (show Fintype.card ο - 1 < Fintype.card ο by omega)144145theorem converted_holevo_pos {K : ℕ} [NeZero K] (hK : 2 ≤ K)146    (T : KrausChannel ι (ZMod K) ι) : 0 < (Conversion.converted T).holevo := by147  obtain ⟨ρ,hρ⟩ := exists_output_entropy_lt T (by simpa using hK)148  have hmin : T.minimumEntropy ≤ (T.output ρ).vonNeumann :=149    StateEnsembles.minimumEntropy_le (outputs := T.outputs) ⟨ρ,rfl⟩150  rw [Conversion.converted_holevo]151  simp only [ZMod.card] at hρ152  linarith153154end Square155end Nonadditivity.SmallEnvironment