Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.ChannelTensorControl

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

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

13 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.ChannelExtensions7import Nonadditivity.EntropyProducts89/-!10# Two-use control embeddings and output unitaries1112Classical labels are attached to arbitrary joint density matrices, including13entangled inputs. The controlled tensor channel then applies the selected two14branches to that same joint state.15-/1617noncomputable section1819namespace Nonadditivity.Channels2021open Entropy22open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2324variable {ι ο κ ζ μ ν η ξ : Type*}25variable [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο]26variable [Fintype κ] [Fintype ζ] [DecidableEq ζ]27variable [Fintype μ] [DecidableEq μ] [Fintype ν] [DecidableEq ν]28variable [Fintype η] [Fintype ξ] [DecidableEq ξ]2930/-- Select one classical label in each half of a joint input. -/31def jointSelector (z : ζ) (w : ξ) : Matrix (ι × μ) ((ζ × ι) × (ξ × μ)) ℂ :=32  selector z ⊗ₖ selector w3334theorem jointSelector_mul_adjoint (z z' : ζ) (w w' : ξ) :35    jointSelector (ι := ι) (μ := μ) z w * (jointSelector (ι := ι) (μ := μ) z' w').conjTranspose =36      if z = z' ∧ w = w' then 1 else 0 := by37  rw [jointSelector, jointSelector, Matrix.conjTranspose_kronecker,38    ← Matrix.mul_kronecker_mul, selector_mul_adjoint, selector_mul_adjoint]39  by_cases hz : z = z' <;> by_cases hw : w = w' <;>40    simp [hz, hw]4142/-- Embed any joint state while fixing both classical input labels. -/43def jointLabelledState (z : ζ) (w : ξ) (ρ : DensityMatrix (ι × μ)) :44    DensityMatrix ((ζ × ι) × (ξ × μ)) where45  matrix := (jointSelector z w).conjTranspose * ρ.matrix * jointSelector z w46  positive := ρ.positive.conjTranspose_mul_mul_same _47  normalized := by48    rw [Matrix.trace_mul_cycle, jointSelector_mul_adjoint]49    simp [ρ.normalized]5051/-- Every other label block vanishes; the selected block is the original joint state. -/52theorem select_jointLabelledState (z z' : ζ) (w w' : ξ) (ρ : DensityMatrix (ι × μ)) :53    jointSelector z w * (jointLabelledState z' w' ρ).matrix *54      (jointSelector z w).conjTranspose =55      if z = z' ∧ w = w' then ρ.matrix else 0 := by56  change jointSelector z w *57    ((jointSelector z' w').conjTranspose * ρ.matrix * jointSelector z' w') *58    (jointSelector z w).conjTranspose = _59  have hmat : jointSelector z w *60      ((jointSelector z' w').conjTranspose * ρ.matrix * jointSelector z' w') *61      (jointSelector z w).conjTranspose =62      (jointSelector z w * (jointSelector z' w').conjTranspose) * ρ.matrix *63      (jointSelector z' w' * (jointSelector z w).conjTranspose) := by64    simp only [Matrix.mul_assoc]65  rw [hmat, jointSelector_mul_adjoint, jointSelector_mul_adjoint]66  by_cases hz : z = z' <;> by_cases hw : w = w' <;>67    simp [hz, hw, eq_comm]6869namespace KrausChannel7071omit [DecidableEq ο] [DecidableEq ν] in72/-- Expand a tensor of controlled channels as its concrete pair of measured blocks. -/73theorem controlled_tensor_map (T : ζ → KrausChannel ι ο κ)74    (S : ξ → KrausChannel μ ν η)75    (X : Matrix ((ζ × ι) × (ξ × μ)) ((ζ × ι) × (ξ × μ)) ℂ) :76    ((controlled T).tensor (controlled S)).map X =77      ∑ z, ∑ w, ((T z).tensor (S w)).map78        (jointSelector z w * X * (jointSelector z w).conjTranspose) := by79  simp only [map, tensor, controlled, jointSelector, Matrix.mul_kronecker_mul,80    Matrix.conjTranspose_mul, Fintype.sum_prod_type, Matrix.mul_assoc]81  apply Finset.sum_congr rfl82  intro z _83  rw [Finset.sum_comm]8485/-- Two fixed classical labels select the corresponding two channel branches on86an arbitrary entangled density matrix. -/87@[simp] theorem controlled_tensor_output_labelled (T : ζ → KrausChannel ι ο κ)88    (S : ξ → KrausChannel μ ν η) (z : ζ) (w : ξ) (ρ : DensityMatrix (ι × μ)) :89    ((controlled T).tensor (controlled S)).output (jointLabelledState z w ρ) =90      ((T z).tensor (S w)).output ρ := by91  apply DensityMatrix.ext92  simp only [output_matrix, controlled_tensor_map, select_jointLabelledState]93  simp [ite_and, apply_ite, map_zero]9495/-- Tensoring two output conjugations is conjugation by the tensor unitary,96also for entangled inputs. -/97theorem tensor_outputUnitary_map (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)98    (U : unitary (Matrix ο ο ℂ)) (V : unitary (Matrix ν ν ℂ))99    (X : Matrix (ι × μ) (ι × μ) ℂ) :100    ((T.outputUnitary U).tensor (S.outputUnitary V)).map X =101      ((T.tensor S).outputUnitary (tensorUnitary U V)).map X := by102  have hk (k : κ × η) :103      ((T.outputUnitary U).tensor (S.outputUnitary V)).kraus k =104        ((T.tensor S).outputUnitary (tensorUnitary U V)).kraus k := by105    exact Matrix.mul_kronecker_mul _ _ _ _106  simp only [map, hk]107108/-- The actual joint output states satisfy the tensor-unitary conjugation identity. -/109theorem tensor_outputUnitary_output (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)110    (U : unitary (Matrix ο ο ℂ)) (V : unitary (Matrix ν ν ℂ))111    (ρ : DensityMatrix (ι × μ)) :112    ((T.outputUnitary U).tensor (S.outputUnitary V)).output ρ =113      ((T.tensor S).output ρ).unitaryConjugate (tensorUnitary U V) := by114  apply DensityMatrix.ext115  change ((T.outputUnitary U).tensor (S.outputUnitary V)).map ρ.matrix = _116  rw [tensor_outputUnitary_map, outputUnitary_map]117  rfl118119end KrausChannel120end Nonadditivity.Channels