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
Nonadditivity.DampedBellStability.bell_lengthNonadditivity.DampedBellStability.damped_pair_entry_sub_norm_leNonadditivity.DampedBellStability.damped_pair_remainder_traceNonadditivity.DampedBellStability.damped_pair_retained_leNonadditivity.DampedBellStability.filteredBellNonadditivity.DampedBellStability.filteredBell.congr_simpNonadditivity.DampedBellStability.filteredBell.eq_1internal/detail/privateNonadditivity.DampedBellStability.filteredBell_eqNonadditivity.DampedBellStability.filteredBell_length_sq_leNonadditivity.DampedBellStability.filteredBell_mass_loss_leNonadditivity.DampedBellStability.filteredBell_sub_length_sq_leNonadditivity.DampedBellStability.lossNonadditivity.DampedBellStability.loss_nonnegNonadditivity.DampedBellStability.map_rank_one_entryNonadditivity.DampedBellStability.map_rank_one_entry_norm_leNonadditivity.DampedBellStability.pairedBellOutputNonadditivity.DampedBellStability.pairedBellOutput.congr_simpNonadditivity.DampedBellStability.pairedBellOutput.eq_1internal/detail/privateNonadditivity.DampedBellStability.posSemidef_entry_norm_le_traceNonadditivity.DampedBellStability.pure_map_energyNonadditivity.DampedBellStability.pure_map_entry_sub_norm_leNonadditivity.DampedBellStability.pure_map_row_energyNonadditivity.DampedBellStability.pure_traceNonadditivity.DampedBellStability.rank_one_subNonadditivity.DampedBellStability.residual_square_trace_leNonadditivity.DampedBellStability.retainedBellOutputNonadditivity.DampedBellStability.retainedBellOutput.eq_1internal/detail/privateNonadditivity.DampedBellStability.vectorLengthNonadditivity.DampedBellStability.vectorLength._proof_1internal/detail/privateNonadditivity.DampedBellStability.vectorLength_sqNonadditivity.DampedBellStability.vectorizeNonadditivity.DampedBellStability.vectorize.eq_1internal/detail/privateNonadditivity.DampedBellStability.vectorize_oneNonadditivity.DampedBellStability.vectorize_sqNonadditivity.DampedBellStability.vectorize_sq._simp_1_2internal/detail/privateNonadditivity.DampedBellStability.vectorize_sq._simp_1_3internal/detail/privateNonadditivity.DampedBellStability.vectorize_sub
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 : ι → ℂ) :28vectorLength v ^ 2 = ∑ i, ‖v i‖ ^ 2 := by29exact EuclideanSpace.norm_sq_eq (WithLp.toLp 2 v)3031lemma pure_trace (v : ι → ℂ) :32(Matrix.vecMulVec v (star v)).trace.re = vectorLength v ^ 2 := by33rw [vectorLength_sq, Matrix.trace_vecMulVec]34simp only [dotProduct, Complex.re_sum, Pi.star_apply, Complex.star_def,35Complex.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 := by40have h := congrArg Complex.re (T.trace_map (Matrix.vecMulVec v (star v)))41rw [pure_trace] at h42simp only [KrausChannel.map, conjugation_vecMulVec, Matrix.trace_sum,43Matrix.trace_vecMulVec, Complex.re_sum, dotProduct, Pi.star_apply,44Complex.star_def, Complex.mul_conj, Complex.ofReal_re,45Complex.normSq_eq_norm_sq] at h46rw [Finset.sum_comm]47exact h4849lemma pure_map_row_energy (T : KrausChannel ι ο κ) (v : ι → ℂ) (a : ο) :50∑ k, ‖(T.kraus k *ᵥ v) a‖ ^ 2 ≤ vectorLength v ^ 2 := by51rw [← pure_map_energy T v]52exact 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 : ο) :57T.map (Matrix.vecMulVec v (star w)) a b =58∑ k, (T.kraus k *ᵥ v) a * star ((T.kraus k *ᵥ w) b) := by59simp only [KrausChannel.map, Matrix.sum_apply, Matrix.mul_apply,60Matrix.vecMulVec_apply, Matrix.conjTranspose_apply, Matrix.mulVec, dotProduct,61Pi.star_apply, Finset.sum_mul, star_sum, star_mul, Finset.mul_sum]62apply Finset.sum_congr rfl63intro k _64apply Finset.sum_congr rfl65intro i _66apply Finset.sum_congr rfl67intro j _68ring6970/-- 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 := by74rw [map_rank_one_entry]75have 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‖ := by77simpa only [norm_mul, norm_star] using78norm_sum_le (Finset.univ) (fun k => (T.kraus k *ᵥ v) a * star ((T.kraus k *ᵥ w) b))79apply htri.trans80have 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‖)82have hv := pure_map_row_energy T v a83have hw := pure_map_row_energy T w b84have hmul := mul_le_mul hv hw85(Finset.sum_nonneg (fun k _ => sq_nonneg _)) (sq_nonneg _)86have hn : 0 ≤ ∑ k, ‖(T.kraus k *ᵥ v) a‖ * ‖(T.kraus k *ᵥ w) b‖ :=87Finset.sum_nonneg (fun k _ => mul_nonneg (norm_nonneg _) (norm_nonneg _))88have hvn : 0 ≤ vectorLength v := norm_nonneg _89have hwn : 0 ≤ vectorLength w := norm_nonneg _90apply (sq_le_sq₀ hn (mul_nonneg hvn hwn)).mp91simpa only [mul_pow] using hcs.trans hmul9293omit [Fintype ι] [DecidableEq ι] in94lemma rank_one_sub (v w : ι → ℂ) :95Matrix.vecMulVec v (star v) - Matrix.vecMulVec w (star w) =96Matrix.vecMulVec (v-w) (star v) + Matrix.vecMulVec w (star (v-w)) := by97ext i j98simp only [Matrix.sub_apply, Matrix.add_apply, Matrix.vecMulVec_apply,99Pi.sub_apply, Pi.star_apply, star_sub]100ring101102/-- 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 -106T.map (Matrix.vecMulVec w (star w)) a b‖ ≤107(vectorLength v + vectorLength w) * vectorLength (v-w) := by108have hsub : T.map (Matrix.vecMulVec v (star v)) - T.map (Matrix.vecMulVec w (star w)) =109T.map (Matrix.vecMulVec (v-w) (star v)) +110T.map (Matrix.vecMulVec w (star (v-w))) := by111change T.linearMap _ - T.linearMap _ = T.linearMap _ + T.linearMap _112rw [← T.linearMap.map_sub, rank_one_sub, T.linearMap.map_add]113have he := congrArg (fun M : Matrix ο ο ℂ => M a b) hsub114simp only [Matrix.sub_apply, Matrix.add_apply] at he115rw [he]116have hv := map_rank_one_entry_norm_le T (v-w) v a b117have hw := map_rank_one_entry_norm_le T w (v-w) a b118exact (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 := by122let R := CFC.sqrt A123have hR : R.conjTranspose = R :=124(Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg A)).isHermitian.eq125have hRR : R * R.conjTranspose = A := by126rw [hR]127exact CFC.sqrt_mul_sqrt_self A hA.nonneg128have ht : ∑ i, ∑ j, ‖R i j‖ ^ 2 = A.trace.re := by129rw [← hRR]130simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply,131Matrix.conjTranspose_apply, Complex.re_sum, Complex.star_def,132Complex.mul_conj, Complex.ofReal_re, Complex.normSq_eq_norm_sq]133have ha : ∑ j, ‖R a j‖ ^ 2 ≤ A.trace.re := by134rw [← ht]135exact 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)137have hb : ∑ j, ‖R b j‖ ^ 2 ≤ A.trace.re := by138rw [← ht]139exact 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)141have hsum : 2 * (∑ j, ‖R a j‖ * ‖R b j‖) ≤142(∑ j, ‖R a j‖ ^ 2) + ∑ j, ‖R b j‖ ^ 2 := by143rw [Finset.mul_sum, ← Finset.sum_add_distrib]144exact Finset.sum_le_sum (fun j _ => by nlinarith [sq_nonneg (‖R a j‖-‖R b j‖)])145calc146‖A a b‖ = ‖∑ j, R a j * star (R b j)‖ := by147rw [← hRR]; rfl148_ ≤ ∑ j, ‖R a j‖ * ‖R b j‖ := by149simpa only [norm_mul,norm_star] using150norm_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 ι ι ℂ) : ι × ι → ℂ :=157fun z => (Real.sqrt (1/(Fintype.card ι:ℝ)):ℂ) * A z.1 z.2158159lemma vectorize_sq (A : Matrix ι ι ℂ) :160vectorLength (vectorize A) ^ 2 =161(A.conjTranspose * A).trace.re / Fintype.card ι := by162rw [vectorLength_sq]163simp only [vectorize, norm_mul, Complex.norm_real, Real.norm_eq_abs,164abs_of_nonneg (Real.sqrt_nonneg _), mul_pow,165Real.sq_sqrt (by positivity : 0 ≤ 1/(Fintype.card ι:ℝ)),166Fintype.sum_prod_type, ← Finset.mul_sum,167Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.conjTranspose_apply,168Complex.re_sum, Complex.star_def]169simp_rw [← Complex.normSq_eq_conj_mul_self, Complex.ofReal_re,170Complex.normSq_eq_norm_sq]171rw [Finset.sum_comm]172ring173174lemma vectorize_sub (A B : Matrix ι ι ℂ) : vectorize (A-B) = vectorize A-vectorize B := by175ext z176simp [vectorize, mul_sub]177178lemma vectorize_one : vectorize (1 : Matrix ι ι ℂ) = normalizedBellVector := by179ext ⟨i,j⟩180by_cases h : i=j <;> simp [vectorize,normalizedBellVector,bellVector,Matrix.one_apply,h]181182lemma bell_length : vectorLength (normalizedBellVector (ι := ι)) = 1 := by183have h := normalizedBellVector_normSq_sum (ι := ι)184simp only [Complex.normSq_eq_norm_sq] at h185rw [← vectorLength_sq] at h186have hn : 0 ≤ vectorLength (normalizedBellVector (ι := ι)) := norm_nonneg _187nlinarith188189def filteredBell (F : Matrix ι ι ℂ) : ι × ι → ℂ :=190(F ⊗ₖ F.map star) *ᵥ normalizedBellVector191192lemma filteredBell_eq (F : Matrix ι ι ℂ) (hF : F.IsHermitian) :193filteredBell F = vectorize (F*F) := by194ext ⟨i,j⟩195rw [filteredBell, GeneralBell.tensor_mul_bell]196dsimp [vectorize]197congr 1198rw [Matrix.mul_apply]199apply Finset.sum_congr rfl200intro k _201have he := congrArg (fun M : Matrix ι ι ℂ => M k j) hF.eq202change star (F j k) = F k j at he203change F i k * star (F j k) = F i k * F k j204rw [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 := by209exact 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 := by214have hFF : (F*F).PosSemidef := by215simpa only [hF.eq] using Matrix.posSemidef_conjTranspose_mul_self F216have hp : 0 ≤ ((1-F*F)*(F*F)).trace.re :=217(RCLike.nonneg_iff.mp (AdjointPurity.trace_mul_nonneg hres hFF)).1218have he : (1-F*F)*(F*F) = (1-F*F) - (1-F*F)*(1-F*F) := by noncomm_ring219rw [he, Matrix.trace_sub, Complex.sub_re] at hp220linarith221222lemma filteredBell_sub_length_sq_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)223(hres : (1-F*F).PosSemidef) :224vectorLength (filteredBell F-normalizedBellVector)^2 ≤ loss F := by225rw [filteredBell_eq F hF, ← vectorize_one, ← vectorize_sub, vectorize_sq]226have hh : (F*F-1).conjTranspose = F*F-1 := by227simp only [Matrix.conjTranspose_sub,Matrix.conjTranspose_mul,hF.eq,Matrix.conjTranspose_one]228rw [hh]229have he : (F*F-1)*(F*F-1) = (1-F*F)*(1-F*F) := by noncomm_ring230rw [he]231exact 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 := by235have hFF : (F*F).PosSemidef := by236simpa only [hF.eq] using Matrix.posSemidef_conjTranspose_mul_self F237have hp : 0 ≤ ((1-F*F)*(F*F)).trace.re :=238(RCLike.nonneg_iff.mp (AdjointPurity.trace_mul_nonneg hres hFF)).1239have htr : 0 ≤ (1-F*F).trace.re := (RCLike.nonneg_iff.mp hres.trace_nonneg).1240rw [Matrix.sub_mul, Matrix.one_mul, Matrix.trace_sub, Complex.sub_re] at hp241simp only [Matrix.trace_sub,Matrix.trace_one,Complex.sub_re,Complex.natCast_re] at htr242rw [filteredBell_eq F hF,vectorize_sq,Matrix.conjTranspose_mul,hF.eq]243apply (div_le_one (by positivity : (0:ℝ)<Fintype.card ι)).mpr244linarith245246lemma filteredBell_mass_loss_le (F : Matrix ι ι ℂ) (hF : F.IsHermitian)247(_hres : (1-F*F).PosSemidef) :2481-vectorLength (filteredBell F)^2 ≤ 2*loss F := by249have 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).1252have hh : (1-F*F).conjTranspose = 1-F*F := by253simp only [Matrix.conjTranspose_sub,Matrix.conjTranspose_mul,hF.eq,Matrix.conjTranspose_one]254rw [hh] at hp255have he : (1-F*F)*(1-F*F) = 1-(F*F+F*F)+(F*F)*(F*F) := by noncomm_ring256simp only [he,Matrix.trace_add,Matrix.trace_sub,Matrix.trace_one,257Complex.add_re,Complex.sub_re,Complex.natCast_re] at hp258rw [filteredBell_eq F hF,vectorize_sq,Matrix.conjTranspose_mul,hF.eq]259dsimp [loss]260simp only [Matrix.trace_sub,Matrix.trace_one,Complex.sub_re,Complex.natCast_re]261have hd : (0:ℝ)<Fintype.card ι := by positivity262field_simp263nlinarith264265variable [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) :275retainedBellOutput T F ≤ (pairedBellOutput (DampedChannel.damped T F hF hres)).matrix := by276let D := DampedChannel.damped T F hF hres277let f := fun (k l : κ ⊕ (ο×ι)) =>278(D.tensor D.conjugate).kraus (k,l) * (bellState (ι := ι)).matrix *279((D.tensor D.conjugate).kraus (k,l)).conjTranspose280have hf (k l : κ ⊕ (ο×ι)) : 0 ≤ f k l :=281((bellState (ι := ι)).positive.mul_mul_conjTranspose_same _).nonneg282have hsum : (∑ k : κ, ∑ l : κ, f (Sum.inl k) (Sum.inl l)) ≤283∑ k : κ ⊕ (ο×ι), ∑ l : κ ⊕ (ο×ι), f k l := by284rw [Fintype.sum_sum_type]285have houter : 0 ≤ ∑ k : ο×ι, ∑ l : κ ⊕ (ο×ι), f (Sum.inr k) l :=286Finset.sum_nonneg (fun k _ => Finset.sum_nonneg (fun l _ => hf (Sum.inr k) l))287apply le_trans _ (le_add_of_nonneg_right houter)288exact Finset.sum_le_sum (fun k _ => by289rw [Fintype.sum_sum_type]290exact le_add_of_nonneg_right291(Finset.sum_nonneg (fun l _ => hf (Sum.inl k) (Sum.inr l))))292have hterm (k l : κ) : f (Sum.inl k) (Sum.inl l) =293(T.tensor T.conjugate).kraus (k,l) *294Matrix.vecMulVec (filteredBell F) (star (filteredBell F)) *295((T.tensor T.conjugate).kraus (k,l)).conjTranspose := by296have hmap : (T.kraus l * F).map star = (T.kraus l).map star * F.map star := by297ext i j298simp [Matrix.mul_apply,Matrix.map_apply]299have hk : (D.tensor D.conjugate).kraus (Sum.inl k,Sum.inl l) =300(T.tensor T.conjugate).kraus (k,l) * (F ⊗ₖ F.map star) := by301change (T.kraus k*F) ⊗ₖ (T.kraus l*F).map star =302(T.kraus k ⊗ₖ (T.kraus l).map star) * (F ⊗ₖ F.map star)303rw [hmap,Matrix.mul_kronecker_mul]304dsimp [f]305rw [hk,Matrix.conjTranspose_mul,bellState_matrix]306have hz : (F ⊗ₖ F.map star) * Matrix.vecMulVec normalizedBellVector (star normalizedBellVector) *307(F ⊗ₖ F.map star).conjTranspose =308Matrix.vecMulVec (filteredBell F) (star (filteredBell F)) :=309conjugation_vecMulVec (F ⊗ₖ F.map star) normalizedBellVector310rw [← hz]311simp only [Matrix.mul_assoc]312simp only [retainedBellOutput,KrausChannel.map,Fintype.sum_prod_type]313simp_rw [← hterm]314simpa only [pairedBellOutput,KrausChannel.output_matrix,KrausChannel.map,315Fintype.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 =3201-vectorLength (filteredBell F)^2 := by321rw [Matrix.trace_sub,Complex.sub_re,(pairedBellOutput _).normalized]322simp 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 := by330have hr := Matrix.le_iff.mp (damped_pair_retained_le T F hF hres)331have hre := posSemidef_entry_norm_le_trace _ hr a b332rw [damped_pair_remainder_trace T F hF hres] at hre333have hmass := filteredBell_mass_loss_le F hF hres334have hv : vectorLength (filteredBell F) ≤ 1 := by335have h := filteredBell_length_sq_le F hF hres336have hnon : 0 ≤ vectorLength (filteredBell F) := norm_nonneg _337nlinarith338have hd : vectorLength (filteredBell F-normalizedBellVector) ≤ Real.sqrt (loss F) := by339have h := filteredBell_sub_length_sq_le F hF hres340have hs := Real.sq_sqrt (loss_nonneg F hres)341have hn : 0 ≤ vectorLength (filteredBell F-normalizedBellVector) := norm_nonneg _342nlinarith [Real.sqrt_nonneg (loss F)]343have hp := pure_map_entry_sub_norm_le (T.tensor T.conjugate)344(filteredBell F) normalizedBellVector a b345rw [bell_length] at hp346have hret : ‖retainedBellOutput T F a b-(pairedBellOutput T).matrix a b‖ ≤3472*Real.sqrt (loss F) := by348have hn : 0 ≤ vectorLength (filteredBell F-normalizedBellVector) := norm_nonneg _349exact hp.trans (by nlinarith [Real.sqrt_nonneg (loss F)])350have 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) := by354simp only [Matrix.sub_apply]355ring356rw [he]357exact (norm_add_le _ _).trans (by linarith)358359end BellFilter360361end Nonadditivity.DampedBellStability