Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.ChannelReindex

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

Direct imports

Imported by project modules

4 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

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

15 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Channels7import Nonadditivity.EntropyProducts8import Mathlib.LinearAlgebra.Matrix.Reindex910/-!11# Channel reindexing and environment-coordinate identities1213These are actual finite matrix identities. In particular, complementing a tensor14product and conjugating a complement commute without an assumed entropy law.15-/1617noncomputable section1819namespace Nonadditivity2021open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2223namespace Entropy2425variable {ι μ : Type*} [Fintype ι] [DecidableEq ι] [Fintype μ] [DecidableEq μ]2627/-- Relabel an actual density matrix by a basis equivalence. -/28def DensityMatrix.reindex (ρ : DensityMatrix ι) (e : ι ≃ μ) : DensityMatrix μ where29  matrix := Matrix.reindex e e ρ.matrix30  positive := ρ.positive.submatrix e.symm31  normalized := by32    change (∑ j, ρ.matrix (e.symm j) (e.symm j)) = 133    exact (e.symm.sum_comp (fun i => ρ.matrix i i)).trans ρ.normalized3435/-- Relabeling preserves the actual von Neumann entropy, via characteristic roots. -/36theorem DensityMatrix.reindex_entropy (ρ : DensityMatrix ι) (e : ι ≃ μ) :37    (ρ.reindex e).vonNeumann = ρ.vonNeumann := by38  have hc : (ρ.reindex e).matrix.charpoly = ρ.matrix.charpoly :=39    Matrix.charpoly_reindex e ρ.matrix40  have he := (ρ.reindex e).positive.isHermitian.roots_charpoly_eq_eigenvalues41  rw [hc, ρ.positive.isHermitian.roots_charpoly_eq_eigenvalues] at he42  have hs := congrArg (fun s : Multiset ℂ =>43    (s.map (fun z => z.re * Real.log z.re)).sum) he44  simp only [Multiset.map_map, Function.comp_def] at hs45  change (∑ i, ρ.weights i * Real.log (ρ.weights i)) =46    ∑ i, (ρ.reindex e).weights i * Real.log ((ρ.reindex e).weights i) at hs47  exact congrArg Neg.neg hs.symm4849end Entropy5051namespace Channels.KrausChannel5253variable {ι ο κ μ ν η : Type*}54variable [Fintype ι] [DecidableEq ι] [Fintype ο] [Fintype κ]5556/-- The complement and complex conjugation have identical Kraus tensors. -/57theorem complementary_conjugate_map (T : Channels.KrausChannel ι ο κ)58    (X : Matrix ι ι ℂ) :59    T.conjugate.complementary.map X = T.complementary.conjugate.map X := rfl6061/-- The complement of a tensor product equals the tensor of the complements. -/62theorem complementary_tensor_map [Fintype μ] [DecidableEq μ] [Fintype ν] [Fintype η]63    (T : Channels.KrausChannel ι ο κ) (S : Channels.KrausChannel μ ν η)64    (X : Matrix (ι × μ) (ι × μ) ℂ) :65    (T.tensor S).complementary.map X = (T.complementary.tensor S.complementary).map X := rfl6667/-- Relabel the input and output basis indices of an actual Kraus channel. -/68def reindex [Fintype μ] [DecidableEq μ] [Fintype ν]69    (T : Channels.KrausChannel ι ο κ) (ei : ι ≃ μ) (eo : ο ≃ ν) :70    Channels.KrausChannel μ ν κ where71  kraus := fun k => (T.kraus k).submatrix eo.symm ei.symm72  complete := by73    simp only [Matrix.conjTranspose_submatrix, Matrix.submatrix_mul_equiv]74    calc75      (∑ k, ((T.kraus k).conjTranspose * T.kraus k).submatrix ei.symm ei.symm) =76          (∑ k, (T.kraus k).conjTranspose * T.kraus k).submatrix ei.symm ei.symm := by77        ext a b78        simp only [Matrix.sum_apply, Matrix.submatrix_apply]79      _ = 1 := by rw [T.complete]; exact Matrix.submatrix_one_equiv ei.symm8081/-- The channel's reindexing is the concrete conjugation of its input/output coordinates. -/82theorem reindex_map [Fintype μ] [DecidableEq μ] [Fintype ν]83    (T : Channels.KrausChannel ι ο κ) (ei : ι ≃ μ) (eo : ο ≃ ν)84    (X : Matrix ι ι ℂ) :85    (T.reindex ei eo).map (Matrix.reindex ei ei X) = Matrix.reindex eo eo (T.map X) := by86  simp only [map, reindex, Matrix.reindex_apply, Matrix.conjTranspose_submatrix,87    Matrix.submatrix_mul_equiv]88  ext a b89  simp only [Matrix.sum_apply, Matrix.submatrix_apply]9091/-- Kraus-index equivalences do not change the actual channel map. -/92theorem map_eq_of_kraus_equiv [Fintype η]93    (T : Channels.KrausChannel ι ο κ) (S : Channels.KrausChannel ι ο η)94    (e : κ ≃ η) (h : ∀ l, S.kraus l = T.kraus (e.symm l)) (X : Matrix ι ι ℂ) :95    S.map X = T.map X := by96  simp only [map, h]97  exact e.symm.sum_comp (fun k => T.kraus k * X * (T.kraus k).conjTranspose)9899/-- Relabel the environment index; the represented channel is unchanged. -/100def reindexKraus [Fintype η] (T : Channels.KrausChannel ι ο κ) (e : κ ≃ η) :101    Channels.KrausChannel ι ο η where102  kraus := fun l => T.kraus (e.symm l)103  complete := (e.symm.sum_comp (fun k => (T.kraus k).conjTranspose * T.kraus k)).trans T.complete104105@[simp] theorem reindexKraus_map [Fintype η] (T : Channels.KrausChannel ι ο κ)106    (e : κ ≃ η) (X : Matrix ι ι ℂ) : (T.reindexKraus e).map X = T.map X :=107  map_eq_of_kraus_equiv T _ e (fun _ => rfl) X108109section FourFactorShuffle110111variable {i₁ i₂ i₃ i₄ o₁ o₂ o₃ o₄ k₁ k₂ k₃ k₄ : Type*}112variable [Fintype i₁] [DecidableEq i₁] [Fintype i₂] [DecidableEq i₂]113variable [Fintype i₃] [DecidableEq i₃] [Fintype i₄] [DecidableEq i₄]114variable [Fintype o₁] [Fintype o₂] [Fintype o₃] [Fintype o₄]115variable [Fintype k₁] [Fintype k₂] [Fintype k₃] [Fintype k₄]116117/-- Regroup four actual channel factors, with the input and output basis118permutations explicit. This applies to arbitrary entangled inputs. -/119theorem tensor_shuffle_map120    (T₁ : Channels.KrausChannel i₁ o₁ k₁) (T₂ : Channels.KrausChannel i₂ o₂ k₂)121    (T₃ : Channels.KrausChannel i₃ o₃ k₃) (T₄ : Channels.KrausChannel i₄ o₄ k₄)122    (X : Matrix ((i₁ × i₂) × (i₃ × i₄)) ((i₁ × i₂) × (i₃ × i₄)) ℂ) :123    ((T₁.tensor T₃).tensor (T₂.tensor T₄)).map124      (Matrix.reindex (Equiv.prodProdProdComm i₁ i₂ i₃ i₄)125        (Equiv.prodProdProdComm i₁ i₂ i₃ i₄) X) =126      Matrix.reindex (Equiv.prodProdProdComm o₁ o₂ o₃ o₄)127        (Equiv.prodProdProdComm o₁ o₂ o₃ o₄)128        (((T₁.tensor T₂).tensor (T₃.tensor T₄)).map X) := by129  rw [← reindex_map ((T₁.tensor T₂).tensor (T₃.tensor T₄))130    (Equiv.prodProdProdComm i₁ i₂ i₃ i₄) (Equiv.prodProdProdComm o₁ o₂ o₃ o₄) X]131  apply map_eq_of_kraus_equiv _ _ (Equiv.prodProdProdComm k₁ k₂ k₃ k₄)132  intro k133  ext a b134  simp [reindex, tensor, Matrix.submatrix_apply, Matrix.kroneckerMap_apply,135    Equiv.prodProdProdComm]136  ring137138end FourFactorShuffle139140end Channels.KrausChannel141end Nonadditivity