Exact Lean source
Nonadditivity.GeneralBell
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
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
29 project constants, including generated, internal and private declarations.
29 declarations
Nonadditivity.GeneralBell.bell_amplitudeNonadditivity.GeneralBell.bell_term_overlapNonadditivity.GeneralBell.converted_boundsNonadditivity.GeneralBell.diagonal_kraus_innerNonadditivity.GeneralBell.diagonal_kraus_inner._simp_1_1internal/detail/privateNonadditivity.GeneralBell.entropy_le_of_overlapNonadditivity.GeneralBell.exists_weight_eq_normNonadditivity.GeneralBell.krausMassNonadditivity.GeneralBell.krausMass.eq_1internal/detail/privateNonadditivity.GeneralBell.krausMass_sumNonadditivity.GeneralBell.krausMass_sum._simp_1_1internal/detail/privateNonadditivity.GeneralBell.mul_log_lowerNonadditivity.GeneralBell.mul_log_lower._simp_1_1internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_2internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_3internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_4internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_5internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_6internal/detail/privateNonadditivity.GeneralBell.mul_log_lower._simp_1_7internal/detail/privateNonadditivity.GeneralBell.paired_bell_entropy_leNonadditivity.GeneralBell.paired_bell_overlapNonadditivity.GeneralBell.paired_bell_overlap_lowerNonadditivity.GeneralBell.pure_overlapNonadditivity.GeneralBell.shannon_le_of_large_atomNonadditivity.GeneralBell.shannon_le_of_large_atom._proof_1_1internal/detail/privateNonadditivity.GeneralBell.shannon_le_of_large_atom._simp_1_2internal/detail/privateNonadditivity.GeneralBell.shannon_le_of_large_atom._simp_1_3internal/detail/privateNonadditivity.GeneralBell.shannon_le_of_large_atom._simp_1_4internal/detail/privateNonadditivity.GeneralBell.tensor_mul_bell
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.BellOutput7import Nonadditivity.Conversion89/-! # Bell witnesses for arbitrary Kraus channels1011This extends the Bell entropy argument beyond random-unitary complements.12All norms use the Euclidean operator norm, and all states are actual matrices.13-/1415noncomputable section16set_option maxHeartbeats 80000017set_option backward.isDefEq.respectTransparency false1819namespace Nonadditivity.GeneralBell2021open Entropy Channels BellOutput22open scoped BigOperators ComplexOrder Matrix Kronecker Matrix.Norms.L2Operator2324lemma mul_log_lower {p q : ℝ} (hp : 0 ≤ p) (hq : 0 < q) :25p * Real.log q + p - q ≤ p * Real.log p := by26by_cases hz : p = 027· simp only [hz, zero_mul, add_zero, zero_sub]28exact neg_nonpos.mpr hq.le29have hp' : 0 < p := lt_of_le_of_ne hp (Ne.symm hz)30have h := mul_le_mul_of_nonneg_left31(Real.log_le_sub_one_of_pos (div_pos hq hp')) hp32rw [Real.log_div hq.ne' hz] at h33have he : p * (q / p - 1) = q - p := by field_simp34rw [he] at h35nlinarith3637/-- A large atom in a distribution on `K²` points forces the required38Bell entropy deficit. The comparison weights need not be normalized. -/39theorem shannon_le_of_large_atom {ι : Type*} [Fintype ι] [DecidableEq ι]40(p : ι → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)41(K : ℕ) (hK : 1 ≤ K) (hd : Fintype.card ι = K ^ 2)42(j : ι) (hj : 1 / (K : ℝ) ≤ p j) :43shannon p ≤ 2 * Real.log (K : ℝ) - (Real.log (K : ℝ) - 1) / K := by44have hk : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)45have hl : 0 ≤ Real.log (K : ℝ) := Real.log_nonneg (by exact_mod_cast hK)46let q : ι → ℝ := fun i => if i = j then 1 / K else 1 / (K : ℝ)^247have hq (i : ι) : 0 < q i := by dsimp [q]; split <;> positivity48have hb := Finset.sum_le_sum (fun i (_ : i ∈ Finset.univ) => mul_log_lower (hp i) (hq i))49have hlog (i : ι) : p i * Real.log (q i) =50-2 * p i * Real.log (K : ℝ) + (if i = j then p i * Real.log (K : ℝ) else 0) := by51by_cases h : i = j52· simp [q, h, Real.log_inv]; ring53· simp [q, h, Real.log_inv, Real.log_pow]; ring54have hqsplit (i : ι) : q i = 1 / (K : ℝ)^2 +55(if i = j then 1 / (K : ℝ) - 1 / (K : ℝ)^2 else 0) := by56dsimp [q]; split <;> ring57have hql : ∑ i, p i * Real.log (q i) =58-2 * Real.log (K : ℝ) + p j * Real.log (K : ℝ) := by59simp_rw [hlog]60simp [Finset.sum_add_distrib, ← Finset.sum_mul, ← Finset.mul_sum, hs]61have hqs : ∑ i, q i = 1 + 1 / (K : ℝ) - 1 / (K : ℝ)^2 := by62simp_rw [hqsplit]63simp only [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ,64nsmul_eq_mul, hd, Nat.cast_pow, Finset.sum_ite_eq', Finset.mem_univ, if_true]65field_simp66ring67simp only [Finset.sum_sub_distrib, Finset.sum_add_distrib, hs, hql, hqs] at hb68have hlarge := mul_le_mul_of_nonneg_right hj hl69unfold shannon70have hnn : 0 ≤ 1 / (K : ℝ)^2 := by positivity71have he : (Real.log (K : ℝ) - 1) / K =721 / (K : ℝ) * Real.log (K : ℝ) - 1 / K := by ring73rw [he]74linarith7576/-- A positive density matrix has an eigenvalue equal to its operator norm. -/77theorem exists_weight_eq_norm {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]78(ρ : DensityMatrix ι) : ∃ i, ρ.weights i = ‖ρ.matrix‖ := by79letI : CStarAlgebra (Matrix ι ι ℂ) := { }80let f : ι → ℂ := fun i => (ρ.weights i : ℂ)81have hn : ‖ρ.matrix‖ = ‖f‖ := by82conv_lhs => rw [ρ.positive.isHermitian.spectral_theorem]83rw [StarAlgEquiv.norm_map, Matrix.l2_opNorm_diagonal]84rfl85obtain ⟨i, _, hi⟩ := Finset.exists_max_image Finset.univ (fun i => ‖f i‖)86Finset.univ_nonempty87have hm : ‖f‖ = ‖f i‖ := le_antisymm88((pi_norm_le_iff_of_nonneg (norm_nonneg _)).mpr (fun j => hi j (Finset.mem_univ _)))89(norm_le_pi_norm f i)90refine ⟨i, ?_⟩91rw [hn, hm]92simp [f, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (ρ.weights_nonneg i)]9394/-- A Bell-sized overlap already implies a logarithmic entropy deficit. -/95theorem entropy_le_of_overlap {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]96(ρ σ : DensityMatrix ι) (K : ℕ) (hK : 1 ≤ K)97(hd : Fintype.card ι = K ^ 2)98(hoverlap : 1 / (K : ℝ) ≤ (σ.matrix * ρ.matrix).trace.re) :99ρ.vonNeumann ≤ 2 * Real.log (K : ℝ) - (Real.log (K : ℝ) - 1) / K := by100obtain ⟨i, hi⟩ := exists_weight_eq_norm ρ101apply shannon_le_of_large_atom ρ.weights ρ.weights_nonneg ρ.weights_sum K hK hd i102rw [hi]103exact hoverlap.trans (AdjointPurity.state_expectation_re_le_opNorm σ ρ.matrix104ρ.positive.isHermitian)105106section BellOverlap107108variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]109[Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]110111omit [DecidableEq ι] [Nonempty ι] [Fintype ο] [DecidableEq ο] [Nonempty ο]112[Fintype κ] in113lemma pure_overlap (v w : ι → ℂ) :114(Matrix.vecMulVec v (star v) * Matrix.vecMulVec w (star w)).trace =115(Complex.normSq (star v ⬝ᵥ w) : ℂ) := by116rw [Matrix.vecMulVec_mul_vecMulVec, Matrix.trace_vecMulVec, dotProduct_smul]117have hc : v ⬝ᵥ star w = star (star v ⬝ᵥ w) := by118simp [dotProduct]119rw [hc]120exact Complex.mul_conj _121122omit [Fintype κ] [Nonempty ι] [Fintype ο] [DecidableEq ο] [Nonempty ο] in123lemma tensor_mul_bell (A B : Matrix ο ι ℂ) (a b : ο) :124((A ⊗ₖ B.map star) *ᵥ normalizedBellVector) (a,b) =125(Real.sqrt (1 / (Fintype.card ι : ℝ)) : ℂ) *126∑ i, A a i * star (B b i) := by127simp [Matrix.mulVec, dotProduct, Fintype.sum_prod_type,128Matrix.map_apply, normalizedBellVector, bellVector, Finset.mul_sum,129mul_comm, mul_left_comm]130131omit [Fintype κ] [Nonempty ι] [Nonempty ο] in132lemma bell_amplitude (A B : Matrix ο ι ℂ) :133star (normalizedBellVector (ι := ο)) ⬝ᵥ134((A ⊗ₖ B.map star) *ᵥ normalizedBellVector) =135((Real.sqrt (1 / (Fintype.card ο : ℝ)) : ℂ) *136(Real.sqrt (1 / (Fintype.card ι : ℝ)) : ℂ)) *137∑ a, ∑ i, A a i * star (B a i) := by138simp only [dotProduct, Fintype.sum_prod_type, Pi.star_apply, tensor_mul_bell]139simp [normalizedBellVector, bellVector, Finset.mul_sum, mul_assoc, apply_ite]140141omit [Fintype κ] in142lemma bell_term_overlap (A B : Matrix ο ι ℂ) :143((bellState (ι := ο)).matrix *144((A ⊗ₖ B.map star) * (bellState (ι := ι)).matrix *145(A ⊗ₖ B.map star).conjTranspose)).trace.re =1461 / ((Fintype.card ο : ℝ) * Fintype.card ι) *147Complex.normSq (∑ a, ∑ i, A a i * star (B a i)) := by148rw [bellState_matrix, bellState_matrix, conjugation_vecMulVec, pure_overlap,149Complex.ofReal_re, bell_amplitude, Complex.normSq_mul,150Complex.normSq_mul]151simp only [Complex.normSq_ofReal, Real.mul_self_sqrt (by positivity :1520 ≤ 1 / (Fintype.card ο : ℝ)), Real.mul_self_sqrt (by positivity :1530 ≤ 1 / (Fintype.card ι : ℝ))]154ring155156/-- Exact Bell overlap for any rectangular Kraus family. -/157theorem paired_bell_overlap (T : KrausChannel ι ο κ) :158((bellState (ι := ο)).matrix *159((T.tensor T.conjugate).output (bellState (ι := ι))).matrix).trace.re =1601 / ((Fintype.card ο : ℝ) * Fintype.card ι) *161∑ k, ∑ l, Complex.normSq (∑ a, ∑ i, T.kraus k a i * star (T.kraus l a i)) := by162simp only [KrausChannel.output_matrix, KrausChannel.map, KrausChannel.tensor,163KrausChannel.conjugate, Matrix.mul_sum, Matrix.trace_sum,164Complex.re_sum, Fintype.sum_prod_type]165simp_rw [bell_term_overlap]166simp only [Finset.mul_sum]167168def krausMass (T : KrausChannel ι ο κ) (k : κ) : ℝ :=169∑ a, ∑ i, Complex.normSq (T.kraus k a i)170171omit [Nonempty ι] [DecidableEq ο] [Nonempty ο] in172theorem krausMass_sum (T : KrausChannel ι ο κ) :173∑ k, krausMass T k = Fintype.card ι := by174have he (k : κ) : ((T.kraus k).conjTranspose * T.kraus k).trace.re = krausMass T k := by175simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.conjTranspose_apply,176Complex.re_sum, Complex.star_def]177simp_rw [← Complex.normSq_eq_conj_mul_self, Complex.ofReal_re]178rw [Finset.sum_comm]179rfl180have h := congrArg (fun M : Matrix ι ι ℂ => M.trace.re) T.complete181simpa only [Matrix.trace_sum, Complex.re_sum, he, Matrix.trace_one,182Complex.natCast_re] using h183184omit [Nonempty ι] [DecidableEq ο] [Nonempty ο] in185theorem diagonal_kraus_inner (T : KrausChannel ι ο κ) (k : κ) :186Complex.normSq (∑ a, ∑ i, T.kraus k a i * star (T.kraus k a i)) =187krausMass T k ^ 2 := by188simp only [Complex.star_def, Complex.mul_conj, ← Complex.ofReal_sum,189Complex.normSq_ofReal, krausMass, pow_two]190191/-- The output Bell overlap is at least input dimension divided by192output dimension times the number of Kraus operators. -/193theorem paired_bell_overlap_lower [DecidableEq κ] [Nonempty κ]194(T : KrausChannel ι ο κ) :195(Fintype.card ι : ℝ) / ((Fintype.card ο : ℝ) * Fintype.card κ) ≤196((bellState (ι := ο)).matrix *197((T.tensor T.conjugate).output (bellState (ι := ι))).matrix).trace.re := by198have hi : (0 : ℝ) < Fintype.card ι := by exact_mod_cast Fintype.card_pos199have ho : (0 : ℝ) < Fintype.card ο := by exact_mod_cast Fintype.card_pos200have hk : (0 : ℝ) < Fintype.card κ := by exact_mod_cast Fintype.card_pos201have hdiag : ∑ k, krausMass T k ^ 2 ≤202∑ k, ∑ l, Complex.normSq (∑ a, ∑ i, T.kraus k a i * star (T.kraus l a i)) := by203apply Finset.sum_le_sum204intro k _205rw [← diagonal_kraus_inner T k]206exact Finset.single_le_sum (f := fun l =>207Complex.normSq (∑ a, ∑ i, T.kraus k a i * star (T.kraus l a i)))208(fun l _ => Complex.normSq_nonneg _) (Finset.mem_univ k)209have hcs := Finset.sum_mul_sq_le_sq_mul_sq Finset.univ (krausMass T) (fun _ => (1:ℝ))210simp only [mul_one, one_pow, Finset.sum_const, Finset.card_univ, nsmul_eq_mul,211krausMass_sum] at hcs212have hmass : (Fintype.card ι : ℝ)^2 / Fintype.card κ ≤ ∑ k, krausMass T k ^ 2 :=213(div_le_iff₀ hk).mpr (by simpa only [mul_one] using hcs)214rw [paired_bell_overlap]215calc216_ = (1 / ((Fintype.card ο : ℝ) * Fintype.card ι)) *217((Fintype.card ι : ℝ)^2 / Fintype.card κ) := by field_simp218_ ≤ _ := mul_le_mul_of_nonneg_left (hmass.trans hdiag) (by positivity)219220/-- General conjugate-channel Bell entropy bound when the environment is221no larger than the input. This includes normalized Gaussian isometries. -/222theorem paired_bell_entropy_le [DecidableEq κ] [Nonempty κ]223(T : KrausChannel ι ο κ) (hd : Fintype.card κ ≤ Fintype.card ι) :224((T.tensor T.conjugate).output (bellState (ι := ι))).vonNeumann ≤2252 * Real.log (Fintype.card ο : ℝ) -226(Real.log (Fintype.card ο : ℝ) - 1) / Fintype.card ο := by227apply entropy_le_of_overlap _ (bellState (ι := ο)) (Fintype.card ο)228Fintype.card_pos (by simp [pow_two])229have hk : (0 : ℝ) < Fintype.card κ := by exact_mod_cast Fintype.card_pos230have ho : (0 : ℝ) < Fintype.card ο := by exact_mod_cast Fintype.card_pos231have hdim : (Fintype.card κ : ℝ) ≤ Fintype.card ι := by exact_mod_cast hd232apply le_trans _ (paired_bell_overlap_lower T)233apply (div_le_div_iff₀ ho (mul_pos ho hk)).mpr234nlinarith235236end BellOverlap237238theorem converted_bounds {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]239[Fintype κ] [DecidableEq κ] [Nonempty κ] {K : ℕ} [NeZero K]240(T : KrausChannel ι (ZMod K) κ) (hd : Fintype.card κ ≤ Fintype.card ι)241{t : ℝ} (ht : 0 ≤ t)242(hcert : ∀ A : Matrix (ZMod K) (ZMod K) ℂ, A.IsHermitian → A.trace = 0 →243‖T.adjointMap A‖ ≤ t * AdjointPurity.hsLength A) :244(Conversion.converted T).holevo ≤ Real.log (1 + (K : ℝ) * t^2) ∧245(Real.log (K : ℝ) - 1) / K ≤246((Conversion.converted T).tensor (Conversion.converted T)).holevo ∧247(Real.log (K : ℝ) - 1) / K - 2 * Real.log (1 + (K : ℝ) * t^2) ≤248((Conversion.converted T).tensor (Conversion.converted T)).holevo -2492 * (Conversion.converted T).holevo := by250have h := Conversion.converted_bounds_of_certificate T ht hcert251(bellState (ι := ι)) (paired_bell_entropy_le T hd)252simp only [ZMod.card] at h253rcases h with ⟨h₁,h₂,h₃⟩254exact ⟨h₁, by linarith, by linarith⟩255256end Nonadditivity.GeneralBell