Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.StrictEntropy

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

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

11 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.StateEnsembles78/-! # Strictness of the finite-dimensional entropy maximum -/910noncomputable section1112namespace Nonadditivity.Entropy1314open scoped BigOperators Matrix ComplexOrder1516theorem shannon_lt_log_card_of_not_uniform {ι : Type*} [Fintype ι] [Nonempty ι]17    (p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (hsum : ∑ i, p i = 1)18    (hne : ∃ i, p i ≠ 1 / (Fintype.card ι : ℝ)) :19    shannon p < Real.log (Fintype.card ι) := by20  classical21  let d : ℝ := Fintype.card ι22  have hd : 0 < d := by23    change (0 : ℝ) < Fintype.card ι24    exact_mod_cast (Fintype.card_pos : 0 < Fintype.card ι)25  have hterm (i : ι) : p i - 1 / d - p i * Real.log d ≤ p i * Real.log (p i) := by26    by_cases hz : p i = 027    · simp only [hz, zero_sub, zero_mul, sub_zero]28      exact neg_nonpos.mpr (le_of_lt (div_pos zero_lt_one hd))29    · have hi : 0 < p i := lt_of_le_of_ne (hp i) (Ne.symm hz)30      have hlog := Real.one_sub_inv_le_log_of_pos (mul_pos hd hi)31      rw [Real.log_mul hd.ne' hz] at hlog32      have hm := mul_le_mul_of_nonneg_left hlog (hp i)33      have hfrac : p i * (1 - (d * p i)⁻¹) = p i - 1 / d := by field_simp34      rw [hfrac] at hm35      nlinarith36  obtain ⟨i, hi⟩ := hne37  have hstrict : p i - 1 / d - p i * Real.log d < p i * Real.log (p i) := by38    by_cases hz : p i = 039    · simp only [hz, zero_sub, zero_mul, sub_zero]40      exact neg_lt_zero.mpr (div_pos zero_lt_one hd)41    · have hip : 0 < p i := lt_of_le_of_ne (hp i) (Ne.symm hz)42      have hmne : (d * p i)⁻¹ ≠ 1 := by43        intro h44        have hh : d * p i = 1 := inv_eq_one.mp h45        apply hi46        change p i = 1 / d47        apply (eq_div_iff hd.ne').mpr48        simpa [mul_comm] using hh49      have hlog := Real.log_lt_sub_one_of_pos (inv_pos.mpr (mul_pos hd hip)) hmne50      rw [Real.log_inv, Real.log_mul hd.ne' hz] at hlog51      have hm := mul_lt_mul_of_pos_left hlog hip52      have hfrac : p i * ((d * p i)⁻¹ - 1) = 1 / d - p i := by field_simp53      rw [hfrac] at hm54      nlinarith55  have hsumterm := Finset.sum_lt_sum (fun i (_ : i ∈ Finset.univ) => hterm i)56    ⟨i, Finset.mem_univ i, hstrict⟩57  have hleft : (∑ i, (p i - 1 / d - p i * Real.log d)) = -Real.log d := by58    simp only [Finset.sum_sub_distrib, ← Finset.sum_mul, hsum, Finset.sum_const,59      Finset.card_univ, nsmul_eq_mul, one_mul]60    change 1 - d * (1 / d) - Real.log d = -Real.log d61    field_simp62    ring63  rw [hleft] at hsumterm64  unfold shannon65  change _ < Real.log d66  linarith6768theorem DensityMatrix.eq_maximallyMixed_of_weights_eq69    {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι] (ρ : DensityMatrix ι)70    (h : ∀ i, ρ.weights i = 1 / (Fintype.card ι : ℝ)) :71    ρ = maximallyMixed ι := by72  apply DensityMatrix.ext73  rw [ρ.positive.isHermitian.spectral_theorem]74  have hd : Matrix.diagonal (fun i => (ρ.weights i : ℂ)) =75      ((1 / (Fintype.card ι : ℝ) : ℝ) : ℂ) • (1 : Matrix ι ι ℂ) := by76    simp only [h]77    ext i j78    by_cases hij : i = j <;> simp [Matrix.diagonal, hij]79  change Unitary.conjStarAlgAut ℂ _ _ (Matrix.diagonal (fun i => (ρ.weights i : ℂ))) = _80  rw [hd, map_smul, map_one]81  rfl8283theorem DensityMatrix.vonNeumann_lt_log_card_of_ne_maximallyMixed84    {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι] (ρ : DensityMatrix ι)85    (hne : ρ ≠ maximallyMixed ι) :86    ρ.vonNeumann < Real.log (Fintype.card ι) := by87  apply shannon_lt_log_card_of_not_uniform ρ.weights ρ.weights_nonneg ρ.weights_sum88  by_contra h89  push_neg at h90  exact hne (ρ.eq_maximallyMixed_of_weights_eq h)9192end Nonadditivity.Entropy