Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.BellOutput

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

Catalog entries: Bell-output entropy bound

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

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

69 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.EntropyMixtures7import Nonadditivity.PureChannelEntropy8import Nonadditivity.ChannelReindex910/-!11# Concrete normalized Bell states and conjugate-unitary invariance1213The Bell vectors and density matrices below are actual finite complex14vectors and positive trace-one matrices. No Bell entropy estimate is15postulated.16-/1718noncomputable section1920namespace Nonadditivity.BellOutput2122open Nonadditivity.Entropy23open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2425variable {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]2627/-- The normalized maximally entangled vector. -/28def normalizedBellVector : ι × ι → ℂ :=29  (Real.sqrt (1 / (Fintype.card ι : ℝ)) : ℂ) • bellVector3031theorem normalizedBellVector_normSq_sum :32    ∑ z : ι × ι, Complex.normSq (normalizedBellVector z) = 1 := by33  have hd : (Fintype.card ι : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero34  simp only [normalizedBellVector, Pi.smul_apply, smul_eq_mul,35    Complex.normSq_mul, Complex.normSq_ofReal, Real.mul_self_sqrt (by positivity :36      0 ≤ 1 / (Fintype.card ι : ℝ)), Fintype.sum_prod_type, bellVector]37  simp [hd]3839/-- The Bell density matrix as a normalized rank-one Gram matrix. -/40def bellState : DensityMatrix (ι × ι) where41  matrix := Matrix.vecMulVec normalizedBellVector (star normalizedBellVector)42  positive := by43    let V : Matrix (ι × ι) Unit ℂ := fun z _ => normalizedBellVector z44    have h := Matrix.posSemidef_self_mul_conjTranspose V45    convert h using 146    ext z w47    simp [V, Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.vecMulVec]48  normalized := by49    rw [Matrix.trace_vecMulVec]50    have h := congrArg Complex.ofReal51      (normalizedBellVector_normSq_sum (ι := ι))52    simpa [dotProduct, map_sum, Complex.mul_conj] using h5354theorem bellState_matrix :55    (bellState (ι := ι)).matrix =56      Matrix.vecMulVec normalizedBellVector (star normalizedBellVector) := rfl5758omit [Nonempty ι] in59/-- The normalized Bell vector is fixed by `U tensor conjugate(U)`. -/60theorem conjugate_unitary_fixes_normalizedBellVector61    (U : unitary (Matrix ι ι ℂ)) :62    ((U : Matrix ι ι ℂ) ⊗ₖ (U : Matrix ι ι ℂ).map (starRingEnd ℂ)) *ᵥ63      normalizedBellVector = normalizedBellVector := by64  exact unitary_kronecker_conjugate_fixes_scaled_bell U _6566/-- Entrywise conjugation of an actual unitary is an actual unitary. -/67def conjugateUnitary (U : unitary (Matrix ι ι ℂ)) : unitary (Matrix ι ι ℂ) :=68  ⟨(U : Matrix ι ι ℂ).map (starRingEnd ℂ), by69    rw [Unitary.mem_iff]70    constructor71    · ext i j72      have h := congrArg (fun M : Matrix ι ι ℂ => star (M i j))73        (Unitary.coe_star_mul_self U)74      simpa [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.star_apply,75        Matrix.map_apply, Matrix.one_apply, map_sum, mul_comm] using h76    · ext i j77      have h := congrArg (fun M : Matrix ι ι ℂ => star (M i j))78        (Unitary.coe_mul_star_self U)79      simpa [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.star_apply,80        Matrix.map_apply, Matrix.one_apply, map_sum, mul_comm] using h⟩8182omit [Fintype ι] [DecidableEq ι] [Nonempty ι] in83theorem star_mulVec {κ : Type*} [Fintype κ] (A : Matrix ι κ ℂ) (v : κ → ℂ) :84    star (A *ᵥ v) = star v ᵥ* A.conjTranspose := by85  ext i86  simp [Matrix.mulVec, Matrix.vecMul, dotProduct, Matrix.conjTranspose_apply,87    mul_comm]8889omit [Fintype ι] [DecidableEq ι] [Nonempty ι] in90/-- Conjugation transports the rank-one matrix of a vector. -/91theorem conjugation_vecMulVec {κ : Type*} [Fintype κ]92    (A : Matrix ι κ ℂ) (v : κ → ℂ) :93    A * Matrix.vecMulVec v (star v) * A.conjTranspose =94      Matrix.vecMulVec (A *ᵥ v) (star (A *ᵥ v)) := by95  rw [Matrix.mul_vecMulVec, Matrix.vecMulVec_mul, star_mulVec]9697/-- The Bell density matrix is fixed by the conjugate unitary action. -/98theorem conjugate_unitary_fixes_bellState (U : unitary (Matrix ι ι ℂ)) :99    (bellState (ι := ι)).unitaryConjugate (tensorUnitary U (conjugateUnitary U)) =100      bellState := by101  apply DensityMatrix.ext102  change _ * Matrix.vecMulVec normalizedBellVector (star normalizedBellVector) * _ = _103  rw [Matrix.star_eq_conjTranspose, conjugation_vecMulVec]104  have h := conjugate_unitary_fixes_normalizedBellVector U105  simp only [tensorUnitary, conjugateUnitary, h, bellState_matrix]106107end Nonadditivity.BellOutput108109namespace Nonadditivity.BellOutput110111open Nonadditivity.Entropy Nonadditivity.Channels112open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix113114variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]115  [Fintype κ] [DecidableEq κ] [Nonempty κ]116117abbrev OffDiagonal (κ : Type*) := {z : κ × κ // z.1 ≠ z.2}118abbrev MergedLabel (κ : Type*) := Option (OffDiagonal κ)119120def diagonalEquiv (κ : Type*) : {z : κ × κ // z.1 = z.2} ≃ κ where121  toFun := fun z => z.val.1122  invFun := fun i => ⟨(i,i), rfl⟩123  left_inv := by124    rintro ⟨⟨i,j⟩, h⟩125    cases h126    rfl127  right_inv := fun _ => rfl128129omit [Nonempty κ] in130theorem offDiagonal_card :131    Fintype.card (OffDiagonal κ) = Fintype.card κ * (Fintype.card κ - 1) := by132  have hd : Fintype.card {z : κ × κ // z.1 = z.2} = Fintype.card κ :=133    Fintype.card_congr (diagonalEquiv κ)134  change Fintype.card {z : κ × κ // ¬z.1 = z.2} = _135  rw [Fintype.card_subtype_compl, Fintype.card_prod, hd, Nat.mul_sub_left_distrib,136    Nat.mul_one]137138def mergedWeights : MergedLabel κ → ℝ139  | none => 1 / (Fintype.card κ : ℝ)140  | some _ => 1 / (Fintype.card κ : ℝ) ^ 2141142omit [DecidableEq κ] [Nonempty κ] in143theorem mergedWeights_nonneg (z : MergedLabel κ) : 0 ≤ mergedWeights z := by144  cases z <;> simp [mergedWeights]145146theorem mergedWeights_sum : ∑ z : MergedLabel κ, mergedWeights z = 1 := by147  have hk : (Fintype.card κ : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero148  have hK : 1 ≤ Fintype.card κ := Fintype.card_pos149  have hm : ((Fintype.card κ - 1 : ℕ) : ℝ) = (Fintype.card κ : ℝ) - 1 := by150    rw [Nat.cast_sub hK]151    simp152  simp only [Fintype.sum_option, mergedWeights, Finset.sum_const, Finset.card_univ,153    nsmul_eq_mul]154  rw [offDiagonal_card]155  push_cast156  rw [hm]157  field_simp158  ring159160theorem mergedWeights_shannon :161    shannon (mergedWeights (κ := κ)) =162      2 * Real.log (Fintype.card κ) - Real.log (Fintype.card κ) / Fintype.card κ := by163  have hk : (Fintype.card κ : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero164  have hK : 1 ≤ Fintype.card κ := Fintype.card_pos165  have hm : ((Fintype.card κ - 1 : ℕ) : ℝ) = (Fintype.card κ : ℝ) - 1 := by166    rw [Nat.cast_sub hK]167    simp168  simp only [shannon, Fintype.sum_option, mergedWeights, Finset.sum_const,169    Finset.card_univ, nsmul_eq_mul]170  rw [offDiagonal_card]171  push_cast172  rw [hm]173  simp only [one_div, Real.log_inv, Real.log_pow]174  field_simp175  ring176177/-- The pure state associated with a unitary pair acting on a Bell input. -/178def pairState (U : κ → unitary (Matrix ι ι ℂ)) (z : κ × κ) :179    DensityMatrix (ι × ι) :=180  bellState.unitaryConjugate (tensorUnitary (U z.1) (conjugateUnitary (U z.2)))181182omit [Fintype κ] [DecidableEq κ] [Nonempty κ] in183theorem pairState_diagonal (U : κ → unitary (Matrix ι ι ℂ)) (i : κ) :184    pairState U (i,i) = bellState := conjugate_unitary_fixes_bellState (U i)185186def mergedStates (U : κ → unitary (Matrix ι ι ℂ)) :187    MergedLabel κ → DensityMatrix (ι × ι)188  | none => bellState189  | some z => pairState U z190191def pairedChannel (U : κ → unitary (Matrix ι ι ℂ)) :192    KrausChannel (ι × ι) (ι × ι) (κ × κ) :=193  (KrausChannel.uniformUnitary U).tensor (KrausChannel.uniformUnitary U).conjugate194195omit [Nonempty ι] [DecidableEq κ] in196theorem pairedChannel_kraus (U : κ → unitary (Matrix ι ι ℂ)) (z : κ × κ) :197    (pairedChannel U).kraus z = (1 / (Fintype.card κ : ℂ)) •198      (tensorUnitary (U z.1) (conjugateUnitary (U z.2)) : Matrix (ι × ι) (ι × ι) ℂ) := by199  have hs : (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) *200      (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) = 1 / (Fintype.card κ : ℂ) := by201    rw [← Complex.ofReal_mul,202      Real.mul_self_sqrt (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]203    simp204  ext ⟨a,b⟩ ⟨c,d⟩205  change ((Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) *206      (U z.1 : Matrix ι ι ℂ) a c) *207      star ((Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) *208        (U z.2 : Matrix ι ι ℂ) b d) =209    (1 / (Fintype.card κ : ℂ)) *210      ((U z.1 : Matrix ι ι ℂ) a c * star ((U z.2 : Matrix ι ι ℂ) b d))211  rw [star_mul]212  simp only [Complex.star_def, Complex.conj_ofReal]213  calc214    _ = ((Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) *215      (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ)) *216      ((U z.1 : Matrix ι ι ℂ) a c * conj ((U z.2 : Matrix ι ι ℂ) b d)) := by ring217    _ = _ := by rw [hs]218219omit [DecidableEq κ] in220/-- The tensor random-unitary output has the actual pure-pair ensemble. -/221theorem pairedChannel_bell_matrix (U : κ → unitary (Matrix ι ι ℂ)) :222    ((pairedChannel U).output bellState).matrix =223      ∑ z : κ × κ, ((1 / (Fintype.card κ : ℝ) ^ 2 : ℝ) : ℂ) •224        (pairState U z).matrix := by225  simp only [KrausChannel.output_matrix, KrausChannel.map]226  apply Finset.sum_congr rfl227  intro z _228  rw [pairedChannel_kraus]229  simp only [Matrix.conjTranspose_smul, Matrix.smul_mul, Matrix.mul_smul, smul_smul,230    pairState, DensityMatrix.unitaryConjugate, Matrix.star_eq_conjTranspose]231  congr 1232  simp [pow_two]233234omit [Nonempty κ] in235theorem split_pair_sum {E : Type*} [AddCommMonoid E] (f : κ × κ → E) :236    (∑ z : κ × κ, f z) = (∑ i : κ, f (i,i)) + ∑ z : OffDiagonal κ, f z := by237  have h := Fintype.sum_subtype_add_sum_subtype (fun z : κ × κ => z.1 = z.2) f238  have hd : (∑ z : {z : κ × κ // z.1 = z.2}, f z) = ∑ i : κ, f (i,i) := by239    apply Fintype.sum_equiv (diagonalEquiv κ)240    rintro ⟨⟨i,j⟩, h⟩241    cases h242    rfl243  rw [hd] at h244  exact h.symm245246/-- All diagonal branches coincide, so their weights merge into one `1/K`. -/247theorem pairedChannel_bell_eq_merged (U : κ → unitary (Matrix ι ι ℂ)) :248    (pairedChannel U).output bellState =249      DensityMatrix.mixture mergedWeights mergedWeights_nonneg mergedWeights_sum250        (mergedStates U) := by251  apply DensityMatrix.ext252  rw [pairedChannel_bell_matrix, split_pair_sum]253  have hdiag : (∑ _i : κ, ((1 / (Fintype.card κ : ℝ) ^ 2 : ℝ) : ℂ) •254      (bellState (ι := ι)).matrix) =255      ((1 / (Fintype.card κ : ℝ) : ℝ) : ℂ) • bellState.matrix := by256    have hk : (Fintype.card κ : ℂ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero257    ext i j258    simp only [Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul, Finset.sum_const,259      Finset.card_univ, nsmul_eq_mul, Complex.ofReal_div, Complex.ofReal_one,260      Complex.ofReal_pow, Complex.ofReal_natCast]261    field_simp262  simp only [pairState_diagonal, hdiag,263    DensityMatrix.mixture_matrix, Fintype.sum_option, mergedWeights, mergedStates]264265theorem bellState_eq_pureState :266    (bellState (ι := ι)) =267      pureState normalizedBellVector normalizedBellVector_normSq_sum := by268  apply DensityMatrix.ext269  rfl270271theorem bellState_entropy_zero : (bellState (ι := ι)).vonNeumann = 0 := by272  rw [bellState_eq_pureState]273  exact pureState_entropy_zero _ _274275omit [Fintype κ] [DecidableEq κ] [Nonempty κ] in276theorem pairState_entropy_zero (U : κ → unitary (Matrix ι ι ℂ)) (z : κ × κ) :277    (pairState U z).vonNeumann = 0 := by278  rw [pairState, DensityMatrix.unitaryConjugate_entropy, bellState_entropy_zero]279280omit [Fintype κ] [DecidableEq κ] [Nonempty κ] in281theorem mergedStates_entropy_zero (U : κ → unitary (Matrix ι ι ℂ))282    (z : MergedLabel κ) : (mergedStates U z).vonNeumann = 0 := by283  cases z284  · exact bellState_entropy_zero285  · exact pairState_entropy_zero U _286287/-- The actual mixed-unitary Bell output obeys the manuscript's entropy bound. -/288theorem pairedChannel_bell_entropy_le (U : κ → unitary (Matrix ι ι ℂ)) :289    ((pairedChannel U).output bellState).vonNeumann ≤290      2 * Real.log (Fintype.card κ) - Real.log (Fintype.card κ) / Fintype.card κ := by291  rw [pairedChannel_bell_eq_merged]292  have h := EntropyMixtures.densityMatrix_mixture_entropy_upper mergedWeights293    mergedWeights_nonneg mergedWeights_sum (mergedStates U)294  simp_rw [mergedStates_entropy_zero] at h295  simpa [mergedWeights_shannon] using h296297/-- The local complementary-channel Bell estimate for arbitrary finite unitaries.298This proves the quantum claim, rather than assuming a Bell-output entropy bound. -/299theorem complementary_bell_entropy_le (U : κ → unitary (Matrix ι ι ℂ)) :300    (((KrausChannel.uniformUnitary U).complementary.tensor301      (KrausChannel.uniformUnitary U).complementary.conjugate).output bellState).vonNeumann ≤302      2 * Real.log (Fintype.card κ) - Real.log (Fintype.card κ) / Fintype.card κ := by303  have hstate : (pairedChannel U).complementary.output bellState =304      ((KrausChannel.uniformUnitary U).complementary.tensor305        (KrausChannel.uniformUnitary U).complementary.conjugate).output bellState := by306    apply DensityMatrix.ext307    rfl308  have he := (pairedChannel U).pure_output_complementary_entropy_eq309    normalizedBellVector normalizedBellVector_normSq_sum310  rw [← bellState_eq_pureState, hstate] at he311  rw [← he]312  exact pairedChannel_bell_entropy_le U313314end Nonadditivity.BellOutput