Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingChannelWords

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

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

30 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.QuantumCodingFamilySpectrum7import Nonadditivity.OperationalCapacity8import Nonadditivity.OperationalReindex910/-! # Word coordinates for actual channel tensor powers1112The product states used by spectral coding are identified with the nested13tensor indices of the actual Kraus channel. No channel-output identity is14supplied as a coding hypothesis.15-/16noncomputable section17namespace Nonadditivity.QuantumCoding18open Entropy Channels Channels.KrausChannel RegularizedHolevo Operational19open scoped BigOperators Matrix Kronecker20set_option backward.isDefEq.respectTransparency false2122def positiveWordEquiv (ι : Type*) : (n : ℕ) → PositiveTensorIndex ι n ≃ (Fin (n+1) → ι)23  | 0 =>24    { toFun := fun a _ => a25      invFun := fun f => f 026      left_inv := fun _ => rfl27      right_inv := fun f => by funext i; fin_cases i; rfl }28  | n+1 =>29    ((Equiv.prodCongr (positiveWordEquiv ι n) (Equiv.refl ι)).trans30      (Equiv.prodComm _ _)).trans (Fin.snocEquiv (fun _ : Fin (n+2) => ι))3132variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]33  [Fintype ο] [DecidableEq ο] [Fintype κ]3435/-- The product input on exactly `n+1` genuine channel tensor factors. -/36def productInputState : (n : ℕ) → (Fin (n+1) → DensityMatrix ι) →37    DensityMatrix (PositiveTensorIndex ι n)38  | 0, ρ => ρ 039  | n+1, ρ => (productInputState n (fun j => ρ j.castSucc)).tensor (ρ (Fin.last (n+1)))4041theorem productInputState_entries (n : ℕ) (ρ : Fin (n+1) → DensityMatrix ι)42    (x y : PositiveTensorIndex ι n) :43    (productInputState n ρ).matrix x y =44      ∏ j, (ρ j).matrix (positiveWordEquiv ι n x j) (positiveWordEquiv ι n y j) := by45  induction n with46  | zero => simp [productInputState,positiveWordEquiv]47  | succ n ih =>48    rcases x with ⟨x,i⟩49    rcases y with ⟨y,j⟩50    rw [Fin.prod_univ_castSucc]51    change (productInputState n (fun k => ρ k.castSucc)).matrix x y *52      (ρ (Fin.last (n+1))).matrix i j = _53    rw [ih]54    simp [positiveWordEquiv,Fin.snocEquiv]55    rfl5657/-- The word-basis tensor state is the exact reindexing of the channel input. -/58theorem productInputState_reindex (n : ℕ) (ρ : Fin (n+1) → DensityMatrix ι) :59    (productInputState n ρ).reindex (positiveWordEquiv ι n)=tensorFamilyState ρ := by60  apply DensityMatrix.ext61  ext x y62  change (productInputState n ρ).matrix ((positiveWordEquiv ι n).symm x)63    ((positiveWordEquiv ι n).symm y) = _64  rw [productInputState_entries]65  simp only [Equiv.apply_symm_apply]66  rfl6768/-- Actual product inputs give the componentwise channel outputs. -/69theorem positiveTensorPower_productInputState (T : KrausChannel ι ο κ)70    (n : ℕ) (ρ : Fin (n+1) → DensityMatrix ι) :71    (positiveTensorPower T n).output (productInputState n ρ) =72      productInputState n (fun j => T.output (ρ j)) := by73  induction n with74  | zero => rfl75  | succ n ih =>76    change ((positiveTensorPower T n).tensor T).output77      ((productInputState n (fun j => ρ j.castSucc)).tensor (ρ (Fin.last (n+1)))) = _78    rw [tensor_output,ih]79    rfl8081theorem positiveTensorPower_word_output (T : KrausChannel ι ο κ)82    (n : ℕ) (ρ : Fin (n+1) → DensityMatrix ι) :83    ((positiveTensorPower T n).output (productInputState n ρ)).reindex84      (positiveWordEquiv ο n) = tensorFamilyState (fun j => T.output (ρ j)) := by85  rw [positiveTensorPower_productInputState,productInputState_reindex]8687/-- A selected word codebook and its word-basis POVM give an actual channel code. -/88def wordCode (T : KrausChannel ι ο κ) (n M : ℕ)89    (ρ : Fin M → Fin (n+1) → DensityMatrix ι)90    (D : POVM (Fin (n+1) → ο) (Fin M)) : Code (positiveTensorPower T n) M where91  encode := fun m => productInputState n (ρ m)92  decode := D.reindex (positiveWordEquiv ο n).symm9394theorem wordCode_probability (T : KrausChannel ι ο κ) (n M : ℕ)95    (ρ : Fin M → Fin (n+1) → DensityMatrix ι)96    (D : POVM (Fin (n+1) → ο) (Fin M)) (m : Fin M) :97    (wordCode T n M ρ D).decode.probability98      ((positiveTensorPower T n).output ((wordCode T n M ρ D).encode m)) m =99      D.probability (tensorFamilyState (fun j => T.output (ρ m j))) m := by100  let σ := (positiveTensorPower T n).output (productInputState n (ρ m))101  have he : (σ.reindex (positiveWordEquiv ο n)).reindex102      (positiveWordEquiv ο n).symm = σ := by103    apply DensityMatrix.ext104    ext i j105    simp [DensityMatrix.reindex,Matrix.reindex_apply]106  have h := D.probability_reindex (positiveWordEquiv ο n).symm107    (σ.reindex (positiveWordEquiv ο n)) m108  rw [he] at h109  change (D.reindex (positiveWordEquiv ο n).symm).probability σ m = _110  rw [h]111  dsimp [σ]112  rw [positiveTensorPower_word_output]113114theorem wordCode_error (T : KrausChannel ι ο κ) (n M : ℕ)115    (ρ : Fin M → Fin (n+1) → DensityMatrix ι)116    (D : POVM (Fin (n+1) → ο) (Fin M)) :117    (wordCode T n M ρ D).error =118      1-(∑ m, D.probability (tensorFamilyState (fun j => T.output (ρ m j))) m)/(M:ℝ) := by119  simp only [Code.error,Code.success,wordCode_probability]120121end Nonadditivity.QuantumCoding