Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.ComplementaryAdjoint

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

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

25 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.BlockConstruction7import Mathlib.Tactic.Ring89/-!10# The actual complementary adjoint polynomial1112This proves the manuscript's Gram channel and polynomial formula from the13actual Kraus implementation. The indices can be arbitrary finite types,14including the tensor-word index set used for blocks.15-/1617noncomputable section1819namespace Nonadditivity.Channels.KrausChannel2021open Nonadditivity.Entropy22open scoped Matrix BigOperators ComplexConjugate2324variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]25  [Fintype ο] [Fintype κ]2627/-- Complementary adjoints are Gram-polynomial evaluations in the Kraus28operators. This is a matrix identity, including rectangular Kraus families. -/29theorem complementary_adjointMap_eq_gram (T : KrausChannel ι ο κ)30    (A : Matrix κ κ ℂ) :31    T.complementary.adjointMap A =32      ∑ a, ∑ b, A a b • ((T.kraus a).conjTranspose * T.kraus b) := by33  ext i j34  simp only [adjointMap, complementary, Matrix.sum_apply, Matrix.smul_apply,35    Matrix.mul_apply, Matrix.conjTranspose_apply, smul_eq_mul, Finset.sum_mul, Finset.mul_sum]36  calc37    (∑ o, ∑ b, ∑ a, star (T.kraus a o i) * A a b * T.kraus b o j) =38        ∑ o, ∑ a, ∑ b, A a b * (star (T.kraus a o i) * T.kraus b o j) := by39      apply Finset.sum_congr rfl40      intro o _41      rw [Finset.sum_comm]42      apply Finset.sum_congr rfl43      intro a _44      apply Finset.sum_congr rfl45      intro b _46      ring47    _ = ∑ a, ∑ b, ∑ o, A a b * (star (T.kraus a o i) * T.kraus b o j) := by48      rw [Finset.sum_comm]49      apply Finset.sum_congr rfl50      intro a _51      rw [Finset.sum_comm]5253variable [Nonempty κ]5455private theorem sqrt_weight_product (p : ℝ) (hp : 0 ≤ p) :56    star (Real.sqrt p : ℂ) * (Real.sqrt p : ℂ) = (p : ℂ) := by57  rw [Complex.star_def, Complex.conj_ofReal, ← Complex.ofReal_mul, Real.mul_self_sqrt hp]5859/-- The Gram entries of a uniform unitary family carry exactly the factor60`1 / card κ`, proved from the positive square-root Kraus weights. -/61theorem uniformUnitary_kraus_gram (U : κ → unitary (Matrix ι ι ℂ)) (a b : κ) :62    ((uniformUnitary U).kraus a).conjTranspose * (uniformUnitary U).kraus b =63      (1 / (Fintype.card κ : ℂ)) •64        ((U a : Matrix ι ι ℂ).conjTranspose * (U b : Matrix ι ι ℂ)) := by65  simp only [uniformUnitary, randomUnitary, Matrix.conjTranspose_smul,66    Matrix.smul_mul, Matrix.mul_smul, smul_smul]67  rw [mul_comm (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ)]68  rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]69  simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast]7071/-- The exact polynomial `Γ_N(A)` of the manuscript, with the normalization72and word orientation established from the concrete complementary channel. -/73theorem uniform_complementary_adjoint_eq_polynomial74    (U : κ → unitary (Matrix ι ι ℂ)) (A : Matrix κ κ ℂ) :75    (uniformUnitary U).complementary.adjointMap A =76      (1 / (Fintype.card κ : ℂ)) •77        ∑ a, ∑ b, A a b •78          ((U a : Matrix ι ι ℂ).conjTranspose * (U b : Matrix ι ι ℂ)) := by79  rw [complementary_adjointMap_eq_gram]80  simp_rw [uniformUnitary_kraus_gram]81  simp only [Finset.smul_sum, smul_smul]82  apply Finset.sum_congr rfl83  intro a _84  apply Finset.sum_congr rfl85  intro b _86  rw [mul_comm (A a b)]8788/-- The actual complementary Gram-channel entries are the specified input89overlaps, with the correct order `U_bᴴ U_a`. -/90theorem uniform_complementary_map_entry91    (U : κ → unitary (Matrix ι ι ℂ)) (X : Matrix ι ι ℂ) (a b : κ) :92    ((uniformUnitary U).complementary.map X) a b =93      (1 / (Fintype.card κ : ℂ)) *94        (X * (U b : Matrix ι ι ℂ).conjTranspose * (U a : Matrix ι ι ℂ)).trace := by95  rw [complementary_map_entry]96  simp only [uniformUnitary, randomUnitary, Matrix.conjTranspose_smul,97    Matrix.smul_mul, Matrix.mul_smul, Matrix.trace_smul, smul_smul, smul_eq_mul]98  rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]99  rw [Matrix.trace_mul_cycle, Matrix.trace_mul_comm]100  simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast, Matrix.mul_assoc]101102/-- The same formula for the output of an actual density matrix. -/103theorem uniform_complementary_output_entry [DecidableEq κ]104    (U : κ → unitary (Matrix ι ι ℂ)) (ρ : DensityMatrix ι) (a b : κ) :105    ((uniformUnitary U).complementary.output ρ).matrix a b =106      (1 / (Fintype.card κ : ℂ)) *107        (ρ.matrix * (U b : Matrix ι ι ℂ).conjTranspose * (U a : Matrix ι ι ℂ)).trace :=108  uniform_complementary_map_entry U ρ.matrix a b109110open Nonadditivity.Entropy111open scoped Kronecker112113omit [Nonempty κ] in114/-- Complementing a concrete tensor block gives the tensor block of the115complementary channels, as actual Kraus-channel data. -/116theorem tensorChain_complementary [DecidableEq ο] [DecidableEq κ]117    (T : ℕ → KrausChannel ι ο κ) (n : ℕ) :118    (tensorChain T n).complementary = tensorChain (fun j => (T j).complementary) n := by119  induction n with120  | zero =>121    apply KrausChannel.ext122    funext k123    ext a b124    simp [tensorChain, emptyTensorChannel, complementary]125  | succ n ih =>126    change ((tensorChain T n).tensor (T n)).complementary =127      (tensorChain (fun j => (T j).complementary) n).tensor (T n).complementary128    have hswap : ((tensorChain T n).tensor (T n)).complementary =129        (tensorChain T n).complementary.tensor (T n).complementary := by130      apply KrausChannel.ext131      rfl132    rw [hswap, ih]133134/-- Tensor words in the actual block Hilbert space, retaining the ordered135recursively nested branch indices. -/136def tensorWord [DecidableEq κ] (U : ℕ → κ → unitary (Matrix ι ι ℂ)) :137    (n : ℕ) → TensorChainIndex κ n →138      Matrix (TensorChainIndex ι n) (TensorChainIndex ι n) ℂ139  | 0, _ => 1140  | n + 1, a => tensorWord U n a.1 ⊗ₖ (U n a.2 : Matrix ι ι ℂ)141142/-- The actual tensor-unitary Kraus operators are exactly the tensor words143times the product of their normalized square-root branch weights. -/144theorem tensorChain_uniform_kraus [DecidableEq κ]145    (U : ℕ → κ → unitary (Matrix ι ι ℂ)) (n : ℕ) (a : TensorChainIndex κ n) :146    (tensorChain (fun j => uniformUnitary (U j)) n).kraus a =147      (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n • tensorWord U n a := by148  induction n with149  | zero =>150    ext i j151    cases i152    cases j153    simp [tensorChain, emptyTensorChannel, tensorWord]154    rfl155  | succ n ih =>156    rcases a with ⟨a,b⟩157    change (tensorChain (fun j => uniformUnitary (U j)) n).kraus a ⊗ₖ158      (uniformUnitary (U n)).kraus b = _159    rw [ih]160    simp only [uniformUnitary, randomUnitary, tensorWord, Matrix.smul_kronecker,161      Matrix.kronecker_smul, smul_smul, pow_succ]162    rw [mul_comm]163    rfl164165/-- The precise normalized polynomial for the actual complementary tensor166block, before standardizing its output labels. -/167theorem blockComplementary_adjoint_eq_tensor_polynomial [DecidableEq κ]168    (U : ℕ → κ → unitary (Matrix ι ι ℂ)) (n : ℕ)169    (A : Matrix (TensorChainIndex κ n) (TensorChainIndex κ n) ℂ) :170    (Nonadditivity.BlockBell.blockComplementary U n).adjointMap A =171      (1 / (Fintype.card κ : ℂ)) ^ n •172        ∑ a, ∑ b, A a b •173          ((tensorWord U n a).conjTranspose * tensorWord U n b) := by174  change (tensorChain (fun j => (uniformUnitary (U j)).complementary) n).adjointMap A = _175  rw [← tensorChain_complementary, complementary_adjointMap_eq_gram]176  simp_rw [tensorChain_uniform_kraus]177  have hweight :178      (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n *179        star ((Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n) =180      (1 / (Fintype.card κ : ℂ)) ^ n := by181    rw [star_pow, ← mul_pow, mul_comm]182    rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]183    simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast]184  simp only [Matrix.conjTranspose_smul, Matrix.smul_mul, Matrix.mul_smul,185    smul_smul, hweight, Finset.smul_sum]186  apply Finset.sum_congr rfl187  intro a _188  apply Finset.sum_congr rfl189  intro b _190  rw [mul_comm (A a b)]191192omit [Nonempty κ] in193/-- Changing only the output labels pulls the observable back by that194same equivalence. This is proved from the Kraus adjoint formula. -/195theorem reindex_output_adjointMap {ν : Type*} [Fintype ν]196    (T : KrausChannel ι ο κ) (e : ο ≃ ν) (A : Matrix ν ν ℂ) :197    (T.reindex (Equiv.refl ι) e).adjointMap A =198      T.adjointMap (A.submatrix e e) := by199  have hA : (A.submatrix e e).submatrix e.symm e.symm = A := by200    ext i j201    simp202  conv_lhs => rw [← hA]203  simp only [adjointMap, reindex, Matrix.conjTranspose_submatrix,204    Matrix.submatrix_mul_equiv]205  rfl206207/-- The exact normalized tensor-word polynomial of the manuscript, now for208the actual `blockChannel` with its explicitly standardized output basis. -/209theorem blockChannel_adjoint_eq_tensor_polynomial {K : ℕ} [NeZero K]210    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ)211    (A : Matrix (ZMod (K ^ n)) (ZMod (K ^ n)) ℂ) :212    (Nonadditivity.BlockConstruction.blockChannel U n).adjointMap A =213      (1 / ((K : ℂ) ^ n)) •214        ∑ a, ∑ b,215          A (Nonadditivity.BlockConstruction.blockOutputEquiv K n a)216            (Nonadditivity.BlockConstruction.blockOutputEquiv K n b) •217          ((tensorWord U n a).conjTranspose * tensorWord U n b) := by218  unfold Nonadditivity.BlockConstruction.blockChannel219  rw [reindex_output_adjointMap, blockComplementary_adjoint_eq_tensor_polynomial]220  simp only [Fintype.card_fin, one_div, inv_pow, Matrix.submatrix_apply]221222end Nonadditivity.Channels.KrausChannel