Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.DampedChannel

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

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

40 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.AdjointPurity8import Mathlib.Data.Matrix.Basis910/-! # A concrete channel obtained by damping its input1112The lost input mass is sent to the maximally mixed output. The displayed13formulas follow from an actual finite Kraus family, including its completeness14equation. On traceless observables the adjoint is exactly compression by the15chosen Hermitian contraction.16-/1718noncomputable section19set_option backward.isDefEq.respectTransparency false20set_option linter.unusedSectionVars false21set_option maxHeartbeats 6000002223namespace Nonadditivity.DampedChannel24open Channels Channels.KrausChannel25open scoped BigOperators Matrix ComplexOrder MatrixOrder Matrix.Norms.L2Operator2627variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]28  [Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]2930/-- The positive square root of the discarded input mass. -/31def residualRoot (F : Matrix ι ι ℂ) : Matrix ι ι ℂ := CFC.sqrt (1-F*F)3233theorem residualRoot_isHermitian (F : Matrix ι ι ℂ) :34    (residualRoot F).IsHermitian :=35  (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg _)).isHermitian3637theorem residualRoot_mul_self (F : Matrix ι ι ℂ)38    (hres : (1-F*F).PosSemidef) : residualRoot F * residualRoot F = 1-F*F :=39  CFC.sqrt_mul_sqrt_self _ hres.nonneg4041/-- Elementary Kraus operators for replacing a state by its trace times I/d. -/42def replacementKraus (z : ο × ι) : Matrix ο ι ℂ :=43  (Real.sqrt (1/(Fintype.card ο:ℝ)):ℂ) • Matrix.single z.1 z.2 14445theorem replacementKraus_adjoint_sum (A : Matrix ο ο ℂ) :46    ∑ z : ο × ι, (replacementKraus z).conjTranspose * A * replacementKraus z =47      ((1/(Fintype.card ο:ℂ))*A.trace) • (1 : Matrix ι ι ℂ) := by48  have ht (a : ο) (i : ι) :49      (replacementKraus (a,i)).conjTranspose * A * replacementKraus (a,i) =50        (1/(Fintype.card ο:ℂ)) • Matrix.single i i (A a a) := by51    simp only [replacementKraus, Matrix.conjTranspose_smul, Matrix.smul_mul,52      Matrix.mul_smul, smul_smul, Matrix.conjTranspose_single,53      Complex.star_def, Complex.conj_ofReal, map_one,54      Matrix.single_mul_mul_single, one_mul, mul_one]55    rw [← Complex.ofReal_mul, Real.mul_self_sqrt (by positivity)]56    simp57  simp only [Fintype.sum_prod_type, ht, ← Finset.smul_sum]58  ext i j59  by_cases h : i=j60  · subst j61    simp [Matrix.sum_apply, Matrix.single, Matrix.trace, Matrix.smul_apply]62  · have hf (x : ι) : ¬ (x=i ∧ x=j) := fun hx => h (hx.1.symm.trans hx.2)63    simp [Matrix.sum_apply, Matrix.single, Matrix.smul_apply, h, hf]6465theorem replacementKraus_map_sum (X : Matrix ι ι ℂ) :66    ∑ z : ο × ι, replacementKraus z * X * (replacementKraus z).conjTranspose =67      ((1/(Fintype.card ο:ℂ))*X.trace) • (1 : Matrix ο ο ℂ) := by68  have ht (a : ο) (i : ι) :69      replacementKraus (a,i) * X * (replacementKraus (a,i)).conjTranspose =70        (1/(Fintype.card ο:ℂ)) • Matrix.single a a (X i i) := by71    simp only [replacementKraus, Matrix.conjTranspose_smul, Matrix.smul_mul,72      Matrix.mul_smul, smul_smul, Matrix.conjTranspose_single,73      Complex.star_def, Complex.conj_ofReal, map_one,74      Matrix.single_mul_mul_single, one_mul, mul_one]75    rw [← Complex.ofReal_mul, Real.mul_self_sqrt (by positivity)]76    simp77  simp only [Fintype.sum_prod_type, ht, ← Finset.smul_sum]78  ext i j79  by_cases h : i=j80  · subst j81    simp [Matrix.sum_apply, Matrix.single, Matrix.trace, Matrix.smul_apply]82  · have hf (x : ο) : ¬ (x=i ∧ x=j) := fun hx => h (hx.1.symm.trans hx.2)83    simp [Matrix.sum_apply, Matrix.single, Matrix.smul_apply, h, hf]8485theorem replacementKraus_complete :86    ∑ z : ο × ι, (replacementKraus z).conjTranspose * replacementKraus z =87      (1 : Matrix ι ι ℂ) := by88  simpa [Matrix.trace_one, Fintype.card_ne_zero] using89    replacementKraus_adjoint_sum (ι := ι) (1 : Matrix ο ο ℂ)9091/-- Damping Kraus family: the retained branch and replacement branches. -/92def dampedKraus (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ) :93    κ ⊕ (ο × ι) → Matrix ο ι ℂ94  | Sum.inl k => T.kraus k * F95  | Sum.inr z => replacementKraus z * residualRoot F9697/-- A genuine CPTP channel for any Hermitian F with F² ≤ I. -/98def damped (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)99    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) :100    KrausChannel ι ο (κ ⊕ (ο × ι)) where101  kraus := dampedKraus T F102  complete := by103    simp only [Fintype.sum_sum_type, dampedKraus, Matrix.conjTranspose_mul,104      hF.eq, (residualRoot_isHermitian F).eq, Matrix.mul_assoc]105    simp only [← Matrix.mul_sum]106    simp only [← Matrix.sum_mul, ← Matrix.mul_assoc]107    rw [T.complete, replacementKraus_complete, Matrix.mul_one, Matrix.mul_one,108      residualRoot_mul_self F hres]109    abel110111@[simp] theorem damped_kraus_inl (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)112    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (k : κ) :113    (damped T F hF hres).kraus (Sum.inl k) = T.kraus k * F := rfl114115@[simp] theorem damped_kraus_inr (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)116    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (z : ο × ι) :117    (damped T F hF hres).kraus (Sum.inr z) = replacementKraus z * residualRoot F := rfl118119/-- The exact Schrödinger map, including the trace of the discarded mass. -/120theorem damped_map (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)121    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (X : Matrix ι ι ℂ) :122    (damped T F hF hres).map X = T.map (F*X*F) +123      ((1/(Fintype.card ο:ℂ))*((1-F*F)*X).trace) • (1 : Matrix ο ο ℂ) := by124  have ht : (residualRoot F * X * residualRoot F).trace = ((1-F*F)*X).trace := by125    rw [Matrix.trace_mul_cycle, residualRoot_mul_self F hres]126  simp only [map, damped, Fintype.sum_sum_type, dampedKraus,127    Matrix.conjTranspose_mul, hF.eq, (residualRoot_isHermitian F).eq]128  simp only [Matrix.mul_assoc]129  rw [show (∑ z : ο × ι, replacementKraus z * (residualRoot F *130      (X * (residualRoot F * (replacementKraus z).conjTranspose)))) =131      ∑ z : ο × ι, replacementKraus z * (residualRoot F * X * residualRoot F) *132        (replacementKraus z).conjTranspose by simp only [Matrix.mul_assoc],133    replacementKraus_map_sum, ht]134135/-- The exact Heisenberg map, before imposing trace zero. -/136theorem damped_adjointMap (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)137    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (A : Matrix ο ο ℂ) :138    (damped T F hF hres).adjointMap A = F*T.adjointMap A*F +139      ((1/(Fintype.card ο:ℂ))*A.trace) • (1-F*F) := by140  have he : (damped T F hF hres).adjointMap A = F*T.adjointMap A*F +141      residualRoot F *142        (∑ z : ο × ι, (replacementKraus z).conjTranspose * A * replacementKraus z) *143          residualRoot F := by144    simp only [adjointMap, damped, Fintype.sum_sum_type, dampedKraus,145      Matrix.conjTranspose_mul, hF.eq, (residualRoot_isHermitian F).eq,146      Matrix.mul_sum, Matrix.sum_mul, Matrix.mul_assoc]147  rw [he]148  rw [replacementKraus_adjoint_sum]149  simp only [Matrix.mul_smul, Matrix.smul_mul, Matrix.mul_one,150    residualRoot_mul_self F hres]151152/-- Damping acts by exact compression on every traceless observable. -/153theorem damped_adjointMap_traceless (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)154    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (A : Matrix ο ο ℂ)155    (hA : A.trace=0) :156    (damped T F hF hres).adjointMap A = F*T.adjointMap A*F := by157  simp [damped_adjointMap, hA]158159end Nonadditivity.DampedChannel