Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.DampedBellStability

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

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

37 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.GeneralBell7import Nonadditivity.DampedChannel89/-! # Bell-output stability under a filter with small normalized trace loss -/1011noncomputable section12set_option maxHeartbeats 120000013set_option backward.isDefEq.respectTransparency false14set_option linter.unusedSectionVars false1516namespace Nonadditivity.DampedBellStability1718open Entropy Channels BellOutput19open scoped BigOperators ComplexOrder Matrix MatrixOrder Kronecker Matrix.Norms.L2Operator2021variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]22  [Fintype ο] [DecidableEq ο] [Fintype κ]2324def vectorLength (v : ι → ℂ) : ℝ := ‖WithLp.toLp 2 v‖2526omit [DecidableEq ι] in27lemma vectorLength_sq (v : ι → ℂ) :28    vectorLength v ^ 2 = ∑ i, ‖v i‖ ^ 2 := by29  exact EuclideanSpace.norm_sq_eq (WithLp.toLp 2 v)3031lemma pure_trace (v : ι → ℂ) :32    (Matrix.vecMulVec v (star v)).trace.re = vectorLength v ^ 2 := by33  rw [vectorLength_sq, Matrix.trace_vecMulVec]34  simp only [dotProduct, Complex.re_sum, Pi.star_apply, Complex.star_def,35    Complex.mul_conj, Complex.ofReal_re, Complex.normSq_eq_norm_sq]3637omit [DecidableEq ο] in38lemma pure_map_energy (T : KrausChannel ι ο κ) (v : ι → ℂ) :39    ∑ a, ∑ k, ‖(T.kraus k *ᵥ v) a‖ ^ 2 = vectorLength v ^ 2 := by40  have h := congrArg Complex.re (T.trace_map (Matrix.vecMulVec v (star v)))41  rw [pure_trace] at h42  simp only [KrausChannel.map, conjugation_vecMulVec, Matrix.trace_sum,43    Matrix.trace_vecMulVec, Complex.re_sum, dotProduct, Pi.star_apply,44    Complex.star_def, Complex.mul_conj, Complex.ofReal_re,45    Complex.normSq_eq_norm_sq] at h46  rw [Finset.sum_comm]47  exact h4849lemma pure_map_row_energy (T : KrausChannel ι ο κ) (v : ι → ℂ) (a : ο) :50    ∑ k, ‖(T.kraus k *ᵥ v) a‖ ^ 2 ≤ vectorLength v ^ 2 := by51  rw [← pure_map_energy T v]52  exact Finset.single_le_sum (f := fun b => ∑ k, ‖(T.kraus k *ᵥ v) b‖ ^ 2)53    (fun b _ => Finset.sum_nonneg (fun k _ => sq_nonneg _))54    (Finset.mem_univ a)5556lemma map_rank_one_entry (T : KrausChannel ι ο κ) (v w : ι → ℂ) (a b : ο) :57    T.map (Matrix.vecMulVec v (star w)) a b =58      ∑ k, (T.kraus k *ᵥ v) a * star ((T.kraus k *ᵥ w) b) := by59  simp only [KrausChannel.map, Matrix.sum_apply, Matrix.mul_apply,60    Matrix.vecMulVec_apply, Matrix.conjTranspose_apply, Matrix.mulVec, dotProduct,61    Pi.star_apply, Finset.sum_mul, star_sum, star_mul, Finset.mul_sum]62  apply Finset.sum_congr rfl63  intro k _64  apply Finset.sum_congr rfl65  intro i _66  apply Finset.sum_congr rfl67  intro j _68  ring6970/-- Channel completeness controls each rank-one off-diagonal output entry. -/71theorem map_rank_one_entry_norm_le (T : KrausChannel ι ο κ)72    (v w : ι → ℂ) (a b : ο) :73    ‖T.map (Matrix.vecMulVec v (star w)) a b‖ ≤ vectorLength v * vectorLength w := by74  rw [map_rank_one_entry]75  have htri : ‖∑ k, (T.kraus k *ᵥ v) a * star ((T.kraus k *ᵥ w) b)‖ ≤76      ∑ k, ‖(T.kraus k *ᵥ v) a‖ * ‖(T.kraus k *ᵥ w) b‖ := by77    simpa only [norm_mul, norm_star] using78      norm_sum_le (Finset.univ) (fun k => (T.kraus k *ᵥ v) a * star ((T.kraus k *ᵥ w) b))79  apply htri.trans80  have hcs := Finset.sum_mul_sq_le_sq_mul_sq Finset.univ81    (fun k => ‖(T.kraus k *ᵥ v) a‖) (fun k => ‖(T.kraus k *ᵥ w) b‖)82  have hv := pure_map_row_energy T v a83  have hw := pure_map_row_energy T w b84  have hmul := mul_le_mul hv hw85    (Finset.sum_nonneg (fun k _ => sq_nonneg _)) (sq_nonneg _)86  have hn : 0 ≤ ∑ k, ‖(T.kraus k *ᵥ v) a‖ * ‖(T.kraus k *ᵥ w) b‖ :=87    Finset.sum_nonneg (fun k _ => mul_nonneg (norm_nonneg _) (norm_nonneg _))88  have hvn : 0 ≤ vectorLength v := norm_nonneg _89  have hwn : 0 ≤ vectorLength w := norm_nonneg _90  apply (sq_le_sq₀ hn (mul_nonneg hvn hwn)).mp91  simpa only [mul_pow] using hcs.trans hmul9293omit [Fintype ι] [DecidableEq ι] in94lemma rank_one_sub (v w : ι → ℂ) :95    Matrix.vecMulVec v (star v) - Matrix.vecMulVec w (star w) =96      Matrix.vecMulVec (v-w) (star v) + Matrix.vecMulVec w (star (v-w)) := by97  ext i j98  simp only [Matrix.sub_apply, Matrix.add_apply, Matrix.vecMulVec_apply,99    Pi.sub_apply, Pi.star_apply, star_sub]100  ring101102/-- Pure-input output stability, with no factor depending on the input dimension. -/103theorem pure_map_entry_sub_norm_le (T : KrausChannel ι ο κ)104    (v w : ι → ℂ) (a b : ο) :105    ‖T.map (Matrix.vecMulVec v (star v)) a b -106      T.map (Matrix.vecMulVec w (star w)) a b‖ ≤107      (vectorLength v + vectorLength w) * vectorLength (v-w) := by108  have hsub : T.map (Matrix.vecMulVec v (star v)) - T.map (Matrix.vecMulVec w (star w)) =109      T.map (Matrix.vecMulVec (v-w) (star v)) +110        T.map (Matrix.vecMulVec w (star (v-w))) := by111    change T.linearMap _ - T.linearMap _ = T.linearMap _ + T.linearMap _112    rw [← T.linearMap.map_sub, rank_one_sub, T.linearMap.map_add]113  have he := congrArg (fun M : Matrix ο ο ℂ => M a b) hsub114  simp only [Matrix.sub_apply, Matrix.add_apply] at he115  rw [he]116  have hv := map_rank_one_entry_norm_le T (v-w) v a b117  have hw := map_rank_one_entry_norm_le T w (v-w) a b118  exact (norm_add_le _ _).trans (by nlinarith)119120lemma posSemidef_entry_norm_le_trace (A : Matrix ι ι ℂ) (hA : A.PosSemidef)121    (a b : ι) : ‖A a b‖ ≤ A.trace.re := by122  let R := CFC.sqrt A123  have hR : R.conjTranspose = R :=124    (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg A)).isHermitian.eq125  have hRR : R * R.conjTranspose = A := by126    rw [hR]127    exact CFC.sqrt_mul_sqrt_self A hA.nonneg128  have ht : ∑ i, ∑ j, ‖R i j‖ ^ 2 = A.trace.re := by129    rw [← hRR]130    simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply,131      Matrix.conjTranspose_apply, Complex.re_sum, Complex.star_def,132      Complex.mul_conj, Complex.ofReal_re, Complex.normSq_eq_norm_sq]133  have ha : ∑ j, ‖R a j‖ ^ 2 ≤ A.trace.re := by134    rw [← ht]135    exact Finset.single_le_sum (f := fun i => ∑ j, ‖R i j‖ ^ 2)136      (fun i _ => Finset.sum_nonneg (fun j _ => sq_nonneg _)) (Finset.mem_univ a)137  have hb : ∑ j, ‖R b j‖ ^ 2 ≤ A.trace.re := by138    rw [← ht]139    exact Finset.single_le_sum (f := fun i => ∑ j, ‖R i j‖ ^ 2)140      (fun i _ => Finset.sum_nonneg (fun j _ => sq_nonneg _)) (Finset.mem_univ b)141  have hsum : 2 * (∑ j, ‖R a j‖ * ‖R b j‖) ≤142      (∑ j, ‖R a j‖ ^ 2) + ∑ j, ‖R b j‖ ^ 2 := by143    rw [Finset.mul_sum, ← Finset.sum_add_distrib]144    exact Finset.sum_le_sum (fun j _ => by nlinarith [sq_nonneg (‖R a j‖-‖R b j‖)])145  calc146    ‖A a b‖ = ‖∑ j, R a j * star (R b j)‖ := by147      rw [← hRR]; rfl148    _ ≤ ∑ j, ‖R a j‖ * ‖R b j‖ := by149      simpa only [norm_mul,norm_star] using150        norm_sum_le Finset.univ (fun j => R a j * star (R b j))151    _ ≤ A.trace.re := by linarith152153section BellFilter154variable [Nonempty ι]155156def vectorize (A : Matrix ι ι ℂ) : ι × ι → ℂ :=157  fun z => (Real.sqrt (1/(Fintype.card ι:ℝ)):ℂ) * A z.1 z.2158159lemma vectorize_sq (A : Matrix ι ι ℂ) :160    vectorLength (vectorize A) ^ 2 =161      (A.conjTranspose * A).trace.re / Fintype.card ι := by162  rw [vectorLength_sq]163  simp only [vectorize, norm_mul, Complex.norm_real, Real.norm_eq_abs,164    abs_of_nonneg (Real.sqrt_nonneg _), mul_pow,165    Real.sq_sqrt (by positivity : 0 ≤ 1/(Fintype.card ι:ℝ)),166    Fintype.sum_prod_type, ← Finset.mul_sum,167    Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.conjTranspose_apply,168    Complex.re_sum, Complex.star_def]169  simp_rw [← Complex.normSq_eq_conj_mul_self, Complex.ofReal_re,170    Complex.normSq_eq_norm_sq]171  rw [Finset.sum_comm]172  ring173174lemma vectorize_sub (A B : Matrix ι ι ℂ) : vectorize (A-B) = vectorize A-vectorize B := by175  ext z176  simp [vectorize, mul_sub]177178lemma vectorize_one : vectorize (1 : Matrix ι ι ℂ) = normalizedBellVector := by179  ext ⟨i,j⟩180  by_cases h : i=j <;> simp [vectorize,normalizedBellVector,bellVector,Matrix.one_apply,h]181182lemma bell_length : vectorLength (normalizedBellVector (ι := ι)) = 1 := by183  have h := normalizedBellVector_normSq_sum (ι := ι)184  simp only [Complex.normSq_eq_norm_sq] at h185  rw [← vectorLength_sq] at h186  have hn : 0 ≤ vectorLength (normalizedBellVector (ι := ι)) := norm_nonneg _187  nlinarith188189def filteredBell (F : Matrix ι ι ℂ) : ι × ι → ℂ :=190  (F ⊗ₖ F.map star) *ᵥ normalizedBellVector191192lemma filteredBell_eq (F : Matrix ι ι ℂ) (hF : F.IsHermitian) :193    filteredBell F = vectorize (F*F) := by194  ext ⟨i,j⟩195  rw [filteredBell, GeneralBell.tensor_mul_bell]196  dsimp [vectorize]197  congr 1198  rw [Matrix.mul_apply]199  apply Finset.sum_congr rfl200  intro k _201  have he := congrArg (fun M : Matrix ι ι ℂ => M k j) hF.eq202  change star (F j k) = F k j at he203  change F i k * star (F j k) = F i k * F k j204  rw [he]205206def loss (F : Matrix ι ι ℂ) : ℝ := (1-F*F).trace.re / Fintype.card ι207208lemma loss_nonneg (F : Matrix ι ι ℂ) (hres : (1-F*F).PosSemidef) : 0 ≤ loss F := by209  exact div_nonneg (RCLike.nonneg_iff.mp hres.trace_nonneg).1 (Nat.cast_nonneg _)210211lemma residual_square_trace_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)212    (hres : (1-F*F).PosSemidef) :213    ((1-F*F)*(1-F*F)).trace.re ≤ (1-F*F).trace.re := by214  have hFF : (F*F).PosSemidef := by215    simpa only [hF.eq] using Matrix.posSemidef_conjTranspose_mul_self F216  have hp : 0 ≤ ((1-F*F)*(F*F)).trace.re :=217    (RCLike.nonneg_iff.mp (AdjointPurity.trace_mul_nonneg hres hFF)).1218  have he : (1-F*F)*(F*F) = (1-F*F) - (1-F*F)*(1-F*F) := by noncomm_ring219  rw [he, Matrix.trace_sub, Complex.sub_re] at hp220  linarith221222lemma filteredBell_sub_length_sq_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)223    (hres : (1-F*F).PosSemidef) :224    vectorLength (filteredBell F-normalizedBellVector)^2 ≤ loss F := by225  rw [filteredBell_eq F hF, ← vectorize_one, ← vectorize_sub, vectorize_sq]226  have hh : (F*F-1).conjTranspose = F*F-1 := by227    simp only [Matrix.conjTranspose_sub,Matrix.conjTranspose_mul,hF.eq,Matrix.conjTranspose_one]228  rw [hh]229  have he : (F*F-1)*(F*F-1) = (1-F*F)*(1-F*F) := by noncomm_ring230  rw [he]231  exact div_le_div_of_nonneg_right (residual_square_trace_le F hF hres) (Nat.cast_nonneg _)232233lemma filteredBell_length_sq_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)234    (hres : (1-F*F).PosSemidef) : vectorLength (filteredBell F)^2 ≤ 1 := by235  have hFF : (F*F).PosSemidef := by236    simpa only [hF.eq] using Matrix.posSemidef_conjTranspose_mul_self F237  have hp : 0 ≤ ((1-F*F)*(F*F)).trace.re :=238    (RCLike.nonneg_iff.mp (AdjointPurity.trace_mul_nonneg hres hFF)).1239  have htr : 0 ≤ (1-F*F).trace.re := (RCLike.nonneg_iff.mp hres.trace_nonneg).1240  rw [Matrix.sub_mul, Matrix.one_mul, Matrix.trace_sub, Complex.sub_re] at hp241  simp only [Matrix.trace_sub,Matrix.trace_one,Complex.sub_re,Complex.natCast_re] at htr242  rw [filteredBell_eq F hF,vectorize_sq,Matrix.conjTranspose_mul,hF.eq]243  apply (div_le_one (by positivity : (0:ℝ)<Fintype.card ι)).mpr244  linarith245246lemma filteredBell_mass_loss_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)247    (_hres : (1-F*F).PosSemidef) :248    1-vectorLength (filteredBell F)^2 ≤ 2*loss F := by249  have hp : 0 ≤ ((1-F*F).conjTranspose*(1-F*F)).trace.re :=250    (RCLike.nonneg_iff.mp251      (Matrix.posSemidef_conjTranspose_mul_self (1-F*F)).trace_nonneg).1252  have hh : (1-F*F).conjTranspose = 1-F*F := by253    simp only [Matrix.conjTranspose_sub,Matrix.conjTranspose_mul,hF.eq,Matrix.conjTranspose_one]254  rw [hh] at hp255  have he : (1-F*F)*(1-F*F) = 1-(F*F+F*F)+(F*F)*(F*F) := by noncomm_ring256  simp only [he,Matrix.trace_add,Matrix.trace_sub,Matrix.trace_one,257    Complex.add_re,Complex.sub_re,Complex.natCast_re] at hp258  rw [filteredBell_eq F hF,vectorize_sq,Matrix.conjTranspose_mul,hF.eq]259  dsimp [loss]260  simp only [Matrix.trace_sub,Matrix.trace_one,Complex.sub_re,Complex.natCast_re]261  have hd : (0:ℝ)<Fintype.card ι := by positivity262  field_simp263  nlinarith264265variable [Nonempty ο]266267def pairedBellOutput (T : KrausChannel ι ο κ) : DensityMatrix (ο×ο) :=268  (T.tensor T.conjugate).output bellState269270def retainedBellOutput (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ) : Matrix (ο×ο) (ο×ο) ℂ :=271  (T.tensor T.conjugate).map (Matrix.vecMulVec (filteredBell F) (star (filteredBell F)))272273lemma damped_pair_retained_le (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)274    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) :275    retainedBellOutput T F ≤ (pairedBellOutput (DampedChannel.damped T F hF hres)).matrix := by276  let D := DampedChannel.damped T F hF hres277  let f := fun (k l : κ ⊕ (ο×ι)) =>278    (D.tensor D.conjugate).kraus (k,l) * (bellState (ι := ι)).matrix *279      ((D.tensor D.conjugate).kraus (k,l)).conjTranspose280  have hf (k l : κ ⊕ (ο×ι)) : 0 ≤ f k l :=281    ((bellState (ι := ι)).positive.mul_mul_conjTranspose_same _).nonneg282  have hsum : (∑ k : κ, ∑ l : κ, f (Sum.inl k) (Sum.inl l)) ≤283      ∑ k : κ ⊕ (ο×ι), ∑ l : κ ⊕ (ο×ι), f k l := by284    rw [Fintype.sum_sum_type]285    have houter : 0 ≤ ∑ k : ο×ι, ∑ l : κ ⊕ (ο×ι), f (Sum.inr k) l :=286      Finset.sum_nonneg (fun k _ => Finset.sum_nonneg (fun l _ => hf (Sum.inr k) l))287    apply le_trans _ (le_add_of_nonneg_right houter)288    exact Finset.sum_le_sum (fun k _ => by289      rw [Fintype.sum_sum_type]290      exact le_add_of_nonneg_right291        (Finset.sum_nonneg (fun l _ => hf (Sum.inl k) (Sum.inr l))))292  have hterm (k l : κ) : f (Sum.inl k) (Sum.inl l) =293      (T.tensor T.conjugate).kraus (k,l) *294        Matrix.vecMulVec (filteredBell F) (star (filteredBell F)) *295          ((T.tensor T.conjugate).kraus (k,l)).conjTranspose := by296    have hmap : (T.kraus l * F).map star = (T.kraus l).map star * F.map star := by297      ext i j298      simp [Matrix.mul_apply,Matrix.map_apply]299    have hk : (D.tensor D.conjugate).kraus (Sum.inl k,Sum.inl l) =300        (T.tensor T.conjugate).kraus (k,l) * (F ⊗ₖ F.map star) := by301      change (T.kraus k*F) ⊗ₖ (T.kraus l*F).map star =302        (T.kraus k ⊗ₖ (T.kraus l).map star) * (F ⊗ₖ F.map star)303      rw [hmap,Matrix.mul_kronecker_mul]304    dsimp [f]305    rw [hk,Matrix.conjTranspose_mul,bellState_matrix]306    have hz : (F ⊗ₖ F.map star) * Matrix.vecMulVec normalizedBellVector (star normalizedBellVector) *307        (F ⊗ₖ F.map star).conjTranspose =308        Matrix.vecMulVec (filteredBell F) (star (filteredBell F)) :=309      conjugation_vecMulVec (F ⊗ₖ F.map star) normalizedBellVector310    rw [← hz]311    simp only [Matrix.mul_assoc]312  simp only [retainedBellOutput,KrausChannel.map,Fintype.sum_prod_type]313  simp_rw [← hterm]314  simpa only [pairedBellOutput,KrausChannel.output_matrix,KrausChannel.map,315    Fintype.sum_prod_type] using hsum316317lemma damped_pair_remainder_trace (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)318    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) :319    ((pairedBellOutput (DampedChannel.damped T F hF hres)).matrix-retainedBellOutput T F).trace.re =320      1-vectorLength (filteredBell F)^2 := by321  rw [Matrix.trace_sub,Complex.sub_re,(pairedBellOutput _).normalized]322  simp only [retainedBellOutput,KrausChannel.trace_map,pure_trace,Complex.one_re]323324/-- Each entry of the actual paired Bell output is stable under damping.325The bound has no factor depending on the input or environment dimension. -/326theorem damped_pair_entry_sub_norm_le (T : KrausChannel ι ο κ) (F : Matrix ι ι ℂ)327    (hF : F.IsHermitian) (hres : (1-F*F).PosSemidef) (a b : ο×ο) :328    ‖(pairedBellOutput (DampedChannel.damped T F hF hres)).matrix a b -329      (pairedBellOutput T).matrix a b‖ ≤ 2*Real.sqrt (loss F)+2*loss F := by330  have hr := Matrix.le_iff.mp (damped_pair_retained_le T F hF hres)331  have hre := posSemidef_entry_norm_le_trace _ hr a b332  rw [damped_pair_remainder_trace T F hF hres] at hre333  have hmass := filteredBell_mass_loss_le F hF hres334  have hv : vectorLength (filteredBell F) ≤ 1 := by335    have h := filteredBell_length_sq_le F hF hres336    have hnon : 0 ≤ vectorLength (filteredBell F) := norm_nonneg _337    nlinarith338  have hd : vectorLength (filteredBell F-normalizedBellVector) ≤ Real.sqrt (loss F) := by339    have h := filteredBell_sub_length_sq_le F hF hres340    have hs := Real.sq_sqrt (loss_nonneg F hres)341    have hn : 0 ≤ vectorLength (filteredBell F-normalizedBellVector) := norm_nonneg _342    nlinarith [Real.sqrt_nonneg (loss F)]343  have hp := pure_map_entry_sub_norm_le (T.tensor T.conjugate)344    (filteredBell F) normalizedBellVector a b345  rw [bell_length] at hp346  have hret : ‖retainedBellOutput T F a b-(pairedBellOutput T).matrix a b‖ ≤347      2*Real.sqrt (loss F) := by348    have hn : 0 ≤ vectorLength (filteredBell F-normalizedBellVector) := norm_nonneg _349    exact hp.trans (by nlinarith [Real.sqrt_nonneg (loss F)])350  have he : (pairedBellOutput (DampedChannel.damped T F hF hres)).matrix a b -351      (pairedBellOutput T).matrix a b =352      ((pairedBellOutput (DampedChannel.damped T F hF hres)).matrix-retainedBellOutput T F) a b +353        (retainedBellOutput T F a b-(pairedBellOutput T).matrix a b) := by354    simp only [Matrix.sub_apply]355    ring356  rw [he]357  exact (norm_add_le _ _).trans (by linarith)358359end BellFilter360361end Nonadditivity.DampedBellStability