Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.WeightedBell

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

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

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

18 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.WeightedBellScalar78/-! # Bell entropy for genuinely weighted random-unitary complementary channels910Nonuniform branch weights supply a strict Bell entropy margin while leaving11the output dimension unchanged.12-/1314noncomputable section15set_option backward.isDefEq.respectTransparency false16set_option maxHeartbeats 80000017set_option linter.unusedSectionVars false1819namespace Nonadditivity.WeightedBell2021open Entropy Channels BellOutput22open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2324variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]25  [Fintype κ] [DecidableEq κ] [Nonempty κ]2627def pairedChannel (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)28    (U : κ → unitary (Matrix ι ι ℂ)) :29    KrausChannel (ι×ι) (ι×ι) (κ×κ) :=30  (KrausChannel.randomUnitary p hp hs U).tensor31    (KrausChannel.randomUnitary p hp hs U).conjugate3233theorem pairedChannel_kraus (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)34    (U : κ → unitary (Matrix ι ι ℂ)) (z : κ×κ) :35    (pairedChannel p hp hs U).kraus z =36      ((Real.sqrt (p z.1)*Real.sqrt (p z.2):ℝ):ℂ) •37        (tensorUnitary (U z.1) (conjugateUnitary (U z.2)) : Matrix (ι×ι) (ι×ι) ℂ) := by38  ext ⟨a,b⟩ ⟨c,d⟩39  change ((Real.sqrt (p z.1):ℂ)*(U z.1 : Matrix ι ι ℂ) a c)*40    star ((Real.sqrt (p z.2):ℂ)*(U z.2 : Matrix ι ι ℂ) b d) =41    ((Real.sqrt (p z.1)*Real.sqrt (p z.2):ℝ):ℂ)*42      ((U z.1 : Matrix ι ι ℂ) a c*star ((U z.2 : Matrix ι ι ℂ) b d))43  rw [star_mul]44  simp only [Complex.star_def,Complex.conj_ofReal,Complex.ofReal_mul]45  ring4647/-- The literal pure-state ensemble of the weighted paired channel. -/48theorem pairedChannel_bell_matrix (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)49    (U : κ → unitary (Matrix ι ι ℂ)) :50    ((pairedChannel p hp hs U).output bellState).matrix =51      ∑ z : κ×κ, ((p z.1*p z.2:ℝ):ℂ) • (pairState U z).matrix := by52  simp only [KrausChannel.output_matrix,KrausChannel.map]53  apply Finset.sum_congr rfl54  intro z _55  rw [pairedChannel_kraus]56  simp only [Matrix.conjTranspose_smul,Matrix.smul_mul,Matrix.mul_smul,smul_smul,57    pairState,DensityMatrix.unitaryConjugate,Matrix.star_eq_conjTranspose]58  congr 159  simp only [Complex.star_def,Complex.conj_ofReal,← Complex.ofReal_mul]60  congr 161  nlinarith [Real.mul_self_sqrt (hp z.1),Real.mul_self_sqrt (hp z.2)]6263/-- The diagonal weighted branches coincide and merge into their squared-mass sum. -/64theorem pairedChannel_bell_eq_merged (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)65    (U : κ → unitary (Matrix ι ι ℂ)) :66    (pairedChannel p hp hs U).output bellState =67      DensityMatrix.mixture (WeightedBellScalar.weights p)68        (WeightedBellScalar.weights_nonneg p hp) (WeightedBellScalar.weights_sum p hs)69        (mergedStates U) := by70  apply DensityMatrix.ext71  rw [pairedChannel_bell_matrix,split_pair_sum]72  have hdiag : (∑ i : κ, ((p i*p i:ℝ):ℂ) • (bellState (ι := ι)).matrix) =73      ((∑ i, p i^2 : ℝ):ℂ) • bellState.matrix := by74    rw [← Finset.sum_smul]75    congr 176    simp only [← Complex.ofReal_sum,pow_two]77  simp only [pairState_diagonal,hdiag,DensityMatrix.mixture_matrix,Fintype.sum_option,78    WeightedBellScalar.weights,mergedStates]7980/-- Actual weighted mixed-unitary Bell entropy, including its strict nonuniform margin. -/81theorem pairedChannel_bell_entropy_le (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)82    (U : κ → unitary (Matrix ι ι ℂ)) :83    ((pairedChannel p hp hs U).output bellState).vonNeumann ≤84      2*Real.log (Fintype.card κ)-(∑ i, p i^2)*Real.log (Fintype.card κ) := by85  rw [pairedChannel_bell_eq_merged]86  have h := EntropyMixtures.densityMatrix_mixture_entropy_upper87    (WeightedBellScalar.weights p) (WeightedBellScalar.weights_nonneg p hp)88    (WeightedBellScalar.weights_sum p hs) (mergedStates U)89  simp_rw [mergedStates_entropy_zero] at h90  have h' : (DensityMatrix.mixture (WeightedBellScalar.weights p)91      (WeightedBellScalar.weights_nonneg p hp) (WeightedBellScalar.weights_sum p hs)92      (mergedStates U)).vonNeumann ≤ shannon (WeightedBellScalar.weights p) := by93    simpa only [mul_zero,Finset.sum_const_zero,add_zero] using h94  exact h'.trans (WeightedBellScalar.weights_shannon_le p hp hs)9596/-- The weighted complementary channel obeys the same Bell bound by actual97pure-input complementary entropy equality. -/98theorem complementary_bell_entropy_le (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)99    (U : κ → unitary (Matrix ι ι ℂ)) :100    (((KrausChannel.randomUnitary p hp hs U).complementary.tensor101      (KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState).vonNeumann ≤102      2*Real.log (Fintype.card κ)-(∑ i, p i^2)*Real.log (Fintype.card κ) := by103  have hstate : (pairedChannel p hp hs U).complementary.output bellState =104      ((KrausChannel.randomUnitary p hp hs U).complementary.tensor105        (KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState := by106    apply DensityMatrix.ext107    rfl108  have he := (pairedChannel p hp hs U).pure_output_complementary_entropy_eq109    normalizedBellVector normalizedBellVector_normSq_sum110  rw [← bellState_eq_pureState,hstate] at he111  rw [← he]112  exact pairedChannel_bell_entropy_le p hp hs U113114/-- Explicit margin over the uniform-weight Bell entropy budget. -/115theorem complementary_bell_entropy_le_with_margin116    (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)117    (U : κ → unitary (Matrix ι ι ℂ)) :118    (((KrausChannel.randomUnitary p hp hs U).complementary.tensor119      (KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState).vonNeumann ≤120      2*Real.log (Fintype.card κ)-Real.log (Fintype.card κ)/(Fintype.card κ:ℝ) -121        ((∑ i, p i^2)-1/(Fintype.card κ:ℝ))*Real.log (Fintype.card κ) := by122  convert complementary_bell_entropy_le p hp hs U using 1; ring123124/-- Every output of the weighted complementary channel has the prescribed125branch probabilities on its diagonal. -/126theorem complementary_output_diagonal (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i)127    (hs : ∑ i, p i=1) (U : κ → unitary (Matrix ι ι ℂ))128    (ρ : DensityMatrix ι) (i : κ) :129    ((KrausChannel.randomUnitary p hp hs U).complementary.output ρ).matrix i i = (p i:ℂ) := by130  rw [KrausChannel.output_matrix,KrausChannel.complementary_map_entry]131  change (((Real.sqrt (p i):ℂ) • (U i : Matrix ι ι ℂ)) * ρ.matrix *132    ((Real.sqrt (p i):ℂ) • (U i : Matrix ι ι ℂ)).conjTranspose).trace = _133  have ht : ((U i : Matrix ι ι ℂ) * ρ.matrix *134      (U i : Matrix ι ι ℂ).conjTranspose).trace = 1 := by135    rw [Matrix.trace_mul_cycle,← Matrix.star_eq_conjTranspose,136      Unitary.coe_star_mul_self,Matrix.one_mul]137    exact ρ.normalized138  simp only [Matrix.conjTranspose_smul,Matrix.smul_mul,Matrix.mul_smul,smul_smul,139    Matrix.trace_smul,ht,smul_eq_mul,mul_one]140  simp [← Complex.ofReal_mul,Real.mul_self_sqrt (hp i)]141142end Nonadditivity.WeightedBell