Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.TensorPowers

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

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

44 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.PureChannelEntropy78/-!9# Finite tensor blocks of genuine density matrices and channels1011The Hilbert-space indices are nested products. Block states and channels12are defined recursively using their actual Kronecker products, and the13entropy identities are proved by induction from the concrete binary law.14-/1516namespace Nonadditivity.Entropy1718open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix1920noncomputable section2122universe u2324/-- Index type of a finite block, with the empty block the one-dimensional space. -/25def TensorChainIndex (ι : Type u) : ℕ → Type u26  | 0 => PUnit.{u + 1}27  | n + 1 => TensorChainIndex ι n × ι2829instance tensorChainIndexFintype (ι : Type u) [Fintype ι] :30    (n : ℕ) → Fintype (TensorChainIndex ι n)31  | 0 => inferInstanceAs (Fintype PUnit.{u + 1})32  | n + 1 => by33    change Fintype (TensorChainIndex ι n × ι)34    letI := tensorChainIndexFintype ι n35    infer_instance3637instance tensorChainIndexDecidableEq (ι : Type u) [DecidableEq ι] :38    (n : ℕ) → DecidableEq (TensorChainIndex ι n)39  | 0 => inferInstanceAs (DecidableEq PUnit.{u + 1})40  | n + 1 => by41    change DecidableEq (TensorChainIndex ι n × ι)42    letI := tensorChainIndexDecidableEq ι n43    infer_instance4445universe v4647/-- Regroup a finite interleaved tensor index into its two tensor blocks. -/48def pairChainEquiv (ι : Type u) (μ : Type v) :49    (n : ℕ) → TensorChainIndex (ι × μ) n ≃ TensorChainIndex ι n × TensorChainIndex μ n50  | 0 =>51    { toFun := fun _ => (PUnit.unit, PUnit.unit)52      invFun := fun _ => PUnit.unit53      left_inv := fun x => by cases x; rfl54      right_inv := fun x => by rcases x with ⟨a,b⟩; cases a; cases b; rfl }55  | n + 1 =>56    { toFun := fun x =>57        let a := (pairChainEquiv ι μ n) x.158        ((a.1, x.2.1), (a.2, x.2.2))59      invFun := fun x =>60        ((pairChainEquiv ι μ n).symm (x.1.1, x.2.1), (x.1.2, x.2.2))61      left_inv := fun x => by62        rcases x with ⟨a, ⟨i,j⟩⟩63        simp64      right_inv := fun x => by65        rcases x with ⟨⟨a,i⟩, ⟨b,j⟩⟩66        simp }6768@[simp] theorem pairChainEquiv_succ_apply (ι : Type u) (μ : Type v) (n : ℕ)69    (a : TensorChainIndex (ι × μ) n) (i : ι) (j : μ) :70    pairChainEquiv ι μ (n + 1) (a, (i,j)) =71      (((pairChainEquiv ι μ n a).1, i), ((pairChainEquiv ι μ n a).2, j)) := rfl7273@[simp] theorem pairChainEquiv_succ_symm_apply (ι : Type u) (μ : Type v) (n : ℕ)74    (a : TensorChainIndex ι n) (b : TensorChainIndex μ n) (i : ι) (j : μ) :75    (pairChainEquiv ι μ (n + 1)).symm ((a,i),(b,j)) =76      ((pairChainEquiv ι μ n).symm (a,b), (i,j)) := rfl7778/-- The unique density matrix of the one-dimensional empty tensor block. -/79def emptyTensorState : DensityMatrix PUnit.{u + 1} where80  matrix := 181  positive := Matrix.PosSemidef.one82  normalized := by simp [Matrix.trace_one]8384theorem emptyTensorState_entropy : emptyTensorState.{u}.vonNeumann = 0 := by85  apply le_antisymm86  · simpa using emptyTensorState.{u}.vonNeumann_le_log_dim87  · exact emptyTensorState.{u}.vonNeumann_nonneg8889/-- An actual finite tensor block of an arbitrary state family. -/90def DensityMatrix.tensorChain {ι : Type u} [Fintype ι] [DecidableEq ι]91    (ρ : ℕ → DensityMatrix ι) : (n : ℕ) → DensityMatrix (TensorChainIndex ι n)92  | 0 => emptyTensorState93  | n + 1 => (tensorChain ρ n).tensor (ρ n)9495theorem DensityMatrix.tensorChain_entropy {ι : Type u} [Fintype ι] [DecidableEq ι]96    (ρ : ℕ → DensityMatrix ι) (n : ℕ) :97    (tensorChain ρ n).vonNeumann = ∑ j ∈ Finset.range n, (ρ j).vonNeumann := by98  induction n with99  | zero =>100    change emptyTensorState.{u}.vonNeumann = 0101    exact emptyTensorState_entropy102  | succ n ih =>103    calc104      (tensorChain ρ (n + 1)).vonNeumann = (tensorChain ρ n).vonNeumann +105          (ρ n).vonNeumann := (tensorChain ρ n).tensor_entropy (ρ n)106      _ = ∑ j ∈ Finset.range (n + 1), (ρ j).vonNeumann := by107        rw [ih, Finset.sum_range_succ]108109/-- The exact entropy of an actual constant tensor-power state. -/110theorem DensityMatrix.tensorPower_entropy {ι : Type u} [Fintype ι] [DecidableEq ι]111    (ρ : DensityMatrix ι) (n : ℕ) :112    (tensorChain (fun _ => ρ) n).vonNeumann = (n : ℝ) * ρ.vonNeumann := by113  rw [tensorChain_entropy]114  simp115116end117118end Nonadditivity.Entropy119120namespace Nonadditivity.Channels.KrausChannel121122open Nonadditivity.Entropy123open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix124125noncomputable section126127/-- Concrete tensor channels produce the concrete tensor of their product-input outputs. -/128theorem tensor_output {ι μ ο ν κ η : Type*}129    [Fintype ι] [DecidableEq ι] [Fintype μ] [DecidableEq μ]130    [Fintype ο] [DecidableEq ο] [Fintype ν] [DecidableEq ν]131    [Fintype κ] [Fintype η]132    (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)133    (ρ : DensityMatrix ι) (σ : DensityMatrix μ) :134    (T.tensor S).output (ρ.tensor σ) = (T.output ρ).tensor (S.output σ) := by135  apply Nonadditivity.Channels.densityMatrix_ext136  exact T.tensor_map S ρ.matrix σ.matrix137138/-- Entropy of a product-input block's actual output is the sum of output entropies. -/139theorem tensor_output_entropy {ι μ ο ν κ η : Type*}140    [Fintype ι] [DecidableEq ι] [Fintype μ] [DecidableEq μ]141    [Fintype ο] [DecidableEq ο] [Fintype ν] [DecidableEq ν]142    [Fintype κ] [Fintype η]143    (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)144    (ρ : DensityMatrix ι) (σ : DensityMatrix μ) :145    ((T.tensor S).output (ρ.tensor σ)).vonNeumann =146      (T.output ρ).vonNeumann + (S.output σ).vonNeumann := by147  rw [tensor_output, DensityMatrix.tensor_entropy]148149universe u v w150151/-- The empty channel sends the unique one-dimensional input state to its unique output state. -/152def emptyTensorChannel :153    KrausChannel PUnit.{u + 1} PUnit.{v + 1} PUnit.{w + 1} where154  kraus := fun _ _ _ => 1155  complete := by156    ext i j157    cases i158    cases j159    simp [Matrix.sum_apply, Matrix.mul_apply, Matrix.conjTranspose_apply]160161theorem emptyTensorChannel_output :162    emptyTensorChannel.{u,v,w}.output emptyTensorState.{u} = emptyTensorState.{v} := by163  apply Nonadditivity.Channels.densityMatrix_ext164  ext i j165  cases i166  cases j167  simp [output, map, emptyTensorChannel, emptyTensorState, Matrix.mul_apply,168    Matrix.conjTranspose_apply]169170/-- The actual tensor block of a local Kraus-channel family. -/171def tensorChain {ι : Type u} {ο : Type v} {κ : Type w}172    [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]173    (T : ℕ → KrausChannel ι ο κ) :174    (n : ℕ) → KrausChannel (TensorChainIndex ι n) (TensorChainIndex ο n)175      (TensorChainIndex κ n)176  | 0 => emptyTensorChannel177  | n + 1 => (tensorChain T n).tensor (T n)178179/-- Actual tensor blocks map actual product states to actual products of local outputs. -/180theorem tensorChain_output {ι : Type u} {ο : Type v} {κ : Type w}181    [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]182    (T : ℕ → KrausChannel ι ο κ) (ρ : ℕ → DensityMatrix ι) (n : ℕ) :183    (tensorChain T n).output (DensityMatrix.tensorChain ρ n) =184      DensityMatrix.tensorChain (fun j => (T j).output (ρ j)) n := by185  induction n with186  | zero => exact emptyTensorChannel_output187  | succ n ih =>188    change ((tensorChain T n).tensor (T n)).output189      ((DensityMatrix.tensorChain ρ n).tensor (ρ n)) =190        (DensityMatrix.tensorChain (fun j => (T j).output (ρ j)) n).tensor191          ((T n).output (ρ n))192    exact (tensor_output (tensorChain T n) (T n) (DensityMatrix.tensorChain ρ n) (ρ n)).trans193      (congrArg (fun q : DensityMatrix (TensorChainIndex ο n) =>194        q.tensor ((T n).output (ρ n))) ih)195196/-- Exact entropy sum for the outputs of a genuine finite channel tensor block. -/197theorem tensorChain_output_entropy {ι : Type u} {ο : Type v} {κ : Type w}198    [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]199    (T : ℕ → KrausChannel ι ο κ) (ρ : ℕ → DensityMatrix ι) (n : ℕ) :200    ((tensorChain T n).output (DensityMatrix.tensorChain ρ n)).vonNeumann =201      ∑ j ∈ Finset.range n, ((T j).output (ρ j)).vonNeumann := by202  rw [tensorChain_output, DensityMatrix.tensorChain_entropy]203204/-- Exact output entropy of the genuine tensor power on a product input. -/205theorem tensorPower_output_entropy {ι : Type u} {ο : Type v} {κ : Type w}206    [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ]207    (T : KrausChannel ι ο κ) (ρ : DensityMatrix ι) (n : ℕ) :208    ((tensorChain (fun _ => T) n).output (DensityMatrix.tensorChain (fun _ => ρ) n)).vonNeumann =209      (n : ℝ) * (T.output ρ).vonNeumann := by210  rw [tensorChain_output_entropy]211  simp212213end214215end Nonadditivity.Channels.KrausChannel