Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.WeightedBlock

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.CanonicalBlockBell7import Nonadditivity.WeightedCertificate8import Mathlib.Topology.Instances.Matrix910/-! # Weighted block channels and their exact output scaling1112Changing the local random-unitary probabilities changes each complementary13output by a diagonal scaling. The full tensor block has the corresponding14product scaling, independent of its input dimension.15-/16noncomputable section17set_option backward.isDefEq.respectTransparency false18set_option linter.unusedSectionVars false19set_option maxHeartbeats 90000020namespace Nonadditivity.WeightedBlock21open Entropy Channels Channels.KrausChannel BlockConstruction22open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker Topology2324variable {K : ℕ} [NeZero K]2526/-- Product of the local output scaling coefficients, in the actual tensor basis. -/27def chainScale (p : Fin K → ℝ) : (n : ℕ) → TensorChainIndex (Fin K) n → ℝ28  | 0, _ => 129  | n+1, a => chainScale p n a.1 * Real.sqrt ((K:ℝ)*p a.2)3031/-- The scaling matrix in the standardized output basis. -/32def outputScale (p : Fin K → ℝ) (n : ℕ) : Matrix (ZMod (K^n)) (ZMod (K^n)) ℂ :=33  Matrix.diagonal (fun a => (chainScale p n ((blockOutputEquiv K n).symm a):ℂ))3435theorem outputScale_isHermitian (p : Fin K → ℝ) (n : ℕ) :36    (outputScale p n).IsHermitian := by37  change (Matrix.diagonal _).conjTranspose = _38  simp [outputScale]3940theorem scale_mul_uniform (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (a : Fin K) :41    Real.sqrt ((K:ℝ)*p a)*Real.sqrt (1/(K:ℝ)) = Real.sqrt (p a) := by42  rw [←Real.sqrt_mul (mul_nonneg (Nat.cast_nonneg _) (hp a))]43  congr 144  have hK : (K:ℝ) ≠ 0 := by exact_mod_cast NeZero.ne K45  field_simp4647theorem chainScale_uniform (n : ℕ) (a : TensorChainIndex (Fin K) n) :48    chainScale (fun _ => 1/(K:ℝ)) n a = 1 := by49  have hK : (K:ℝ) ≠ 0 := by exact_mod_cast NeZero.ne K50  induction n with51  | zero => rfl52  | succ n ih =>53    rw [chainScale,ih]54    simp [hK]5556theorem outputScale_uniform (n : ℕ) : outputScale (K := K) (fun _ => 1/(K:ℝ)) n = 1 := by57  unfold outputScale58  simp only [chainScale_uniform]59  simp6061/-- Continuity requires no positivity restriction on the parameterized weights. -/62theorem continuous_chainScale (p : ℝ → Fin K → ℝ) (hp : ∀a, Continuous (fun t => p t a))63    (n : ℕ) (a : TensorChainIndex (Fin K) n) :64    Continuous (fun t => chainScale (p t) n a) := by65  induction n with66  | zero => exact continuous_const67  | succ n ih =>68    exact (ih a.1).mul ((continuous_const.mul (hp a.2)).sqrt)6970/-- The scaling is continuous in the finite-dimensional operator norm. -/71theorem continuous_outputScale (p : ℝ → Fin K → ℝ) (hp : ∀a, Continuous (fun t => p t a))72    (n : ℕ) : Continuous (fun t => outputScale (p t) n) := by73  apply continuous_matrix74  intro a b75  by_cases hab : a=b76  · subst b77    simpa [outputScale,Matrix.diagonal_apply] using78      Complex.continuous_ofReal.comp (continuous_chainScale p hp n ((blockOutputEquiv K n).symm a))79  · simpa [outputScale,Matrix.diagonal_apply,hab] using80      (continuous_const : Continuous (fun _ : ℝ => (0:ℂ)))8182theorem outputScale_norm_sub_one_tendsto (p : ℝ → Fin K → ℝ)83    (hp : ∀a, Continuous (fun t => p t a)) (hp0 : p 0 = fun _ => 1/(K:ℝ)) (n : ℕ) :84    Filter.Tendsto (fun t => ‖outputScale (p t) n-1‖) (nhds 0) (nhds 0) := by85  have hc : ContinuousAt (fun t => ‖outputScale (p t) n-1‖) 0 :=86    ((continuous_outputScale p hp n).sub continuous_const).norm.continuousAt87  simpa only [hp0,outputScale_uniform,sub_self,norm_zero] using hc.tendsto8889section Channel90variable {ι : Type*} [Fintype ι] [DecidableEq ι]9192/-- Actual tensor block of the weighted complementary channels. -/93def weightedComplementary (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))94    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ) :95    KrausChannel (TensorChainIndex ι n) (TensorChainIndex (Fin K) n) (TensorChainIndex ι n) :=96  tensorChain (fun j => (randomUnitary p hp hsum (U j)).complementary) n9798/-- The genuine weighted block in the manuscript's standard output basis. -/99def weightedBlock (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))100    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ) :101    KrausChannel (TensorChainIndex ι n) (ZMod (K^n)) (TensorChainIndex ι n) :=102  (weightedComplementary U p hp hsum n).reindex (Equiv.refl _) (blockOutputEquiv K n)103104theorem weightedComplementary_kraus_entry (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))105    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ)106    (k b : TensorChainIndex ι n) (a : TensorChainIndex (Fin K) n) :107    (weightedComplementary U p hp hsum n).kraus k a b =108      (chainScale p n a:ℂ)*(BlockBell.blockComplementary U n).kraus k a b := by109  induction n with110  | zero => simp [weightedComplementary,BlockBell.blockComplementary,tensorChain,111      emptyTensorChannel,chainScale]112  | succ n ih =>113    rcases k with ⟨k₀,k₁⟩114    rcases b with ⟨b₀,b₁⟩115    rcases a with ⟨a₀,a₁⟩116    change (weightedComplementary U p hp hsum n).kraus k₀ a₀ b₀ *117        ((randomUnitary p hp hsum (U n)).complementary).kraus k₁ a₁ b₁ =118      (chainScale p (n+1) (a₀,a₁):ℂ) *119        ((BlockBell.blockComplementary U n).kraus k₀ a₀ b₀ *120          ((uniformUnitary (U n)).complementary).kraus k₁ a₁ b₁)121    simp only [complementary,randomUnitary,uniformUnitary,Matrix.smul_apply,smul_eq_mul,122      Fintype.card_fin]123    rw [ih]124    have hs : (Real.sqrt (p a₁):ℂ) =125        (Real.sqrt ((K:ℝ)*p a₁):ℂ)*(Real.sqrt (1/(K:ℝ)):ℂ) := by126      rw [←Complex.ofReal_mul,scale_mul_uniform p hp a₁]127    rw [hs]128    simp only [chainScale,Complex.ofReal_mul]129    ring130131/-- The exact Kraus scaling, including standard output-basis transport. -/132theorem weightedBlock_kraus (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))133    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ)134    (k : TensorChainIndex ι n) :135    (weightedBlock U p hp hsum n).kraus k = outputScale p n*(blockChannel U n).kraus k := by136  ext a b137  simp only [weightedBlock,blockChannel,reindex,Matrix.submatrix_apply,Equiv.refl_symm,138    Equiv.refl_apply,outputScale,Matrix.diagonal_mul]139  exact weightedComplementary_kraus_entry U p hp hsum n k b ((blockOutputEquiv K n).symm a)140141/-- The scaling obeys the exact channel-normalization identity. -/142theorem block_adjoint_outputScale_sq (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))143    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ) :144    (blockChannel U n).adjointMap (outputScale p n*outputScale p n)=1 := by145  have hc := (weightedBlock U p hp hsum n).complete146  simp only [weightedBlock_kraus,Matrix.conjTranspose_mul,147    (outputScale_isHermitian p n).eq,Matrix.mul_assoc] at hc148  simpa only [adjointMap,Matrix.mul_assoc] using hc149150/-- The weighted channel map is output conjugation by the fixed diagonal scale. -/151theorem weightedBlock_map (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))152    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ)153    (X : Matrix (TensorChainIndex ι n) (TensorChainIndex ι n) ℂ) :154    (weightedBlock U p hp hsum n).map X = outputScale p n*(blockChannel U n).map X*outputScale p n := by155  simp only [map,weightedBlock_kraus,Matrix.conjTranspose_mul,156    (outputScale_isHermitian p n).eq,Matrix.mul_sum,Matrix.sum_mul,Matrix.mul_assoc]157158end Channel159160/-- The weighted tensor construction is the actual output-scaled channel used161by the perturbation certificate theorem. -/162theorem weightedBlock_eq_weighted {ι : Type} [Fintype ι] [DecidableEq ι]163    (U : ℕ → Fin K → unitary (Matrix ι ι ℂ))164    (p : Fin K → ℝ) (hp : ∀a, 0 ≤ p a) (hsum : ∑ a, p a=1) (n : ℕ) :165    weightedBlock U p hp hsum n =166      WeightedCertificate.weighted (blockChannel U n) (outputScale p n)167        (outputScale_isHermitian p n) (block_adjoint_outputScale_sq U p hp hsum n) := by168  apply KrausChannel.ext169  funext k170  exact weightedBlock_kraus U p hp hsum n k171172end Nonadditivity.WeightedBlock