Exact Lean source
Nonadditivity.WeightedBell
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
3 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
18 project constants, including generated, internal and private declarations.
18 declarations
Nonadditivity.WeightedBell.complementary_bell_entropy_leNonadditivity.WeightedBell.complementary_bell_entropy_le_with_marginNonadditivity.WeightedBell.complementary_output_diagonalNonadditivity.WeightedBell.complementary_output_diagonal._simp_1_1internal/detail/privateNonadditivity.WeightedBell.pairedChannelNonadditivity.WeightedBell.pairedChannel.congr_simpNonadditivity.WeightedBell.pairedChannel_bell_entropy_leNonadditivity.WeightedBell.pairedChannel_bell_eq_mergedNonadditivity.WeightedBell.pairedChannel_bell_eq_merged._simp_1_1internal/detail/privateNonadditivity.WeightedBell.pairedChannel_bell_matrixNonadditivity.WeightedBell.pairedChannel_bell_matrix._simp_1_2internal/detail/privateNonadditivity.WeightedBell.pairedChannel_kraus_private.Nonadditivity.WeightedBell.0.Nonadditivity.BellOutput.mergedWeights.match_1.eq_1internal/detail/private_private.Nonadditivity.WeightedBell.0.Nonadditivity.BellOutput.mergedWeights.match_1.eq_2internal/detail/private_private.Nonadditivity.WeightedBell.0.Nonadditivity.BellOutput.mergedWeights.match_1.splitterinternal/detail/private_private.Nonadditivity.WeightedBell.0.Nonadditivity.WeightedBellScalar.weights.match_1.eq_1internal/detail/private_private.Nonadditivity.WeightedBell.0.Nonadditivity.WeightedBellScalar.weights.match_1.eq_2internal/detail/private_private.Nonadditivity.WeightedBell.0.Nonadditivity.WeightedBellScalar.weights.match_1.splitterinternal/detail/private
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.WeightedBellScalar78/-! # Bell entropy for genuinely weighted random-unitary complementary channels910Nonuniform branch weights supply a strict Bell entropy margin while leaving11the output dimension unchanged.12-/1314noncomputable section15set_option backward.isDefEq.respectTransparency false16set_option maxHeartbeats 80000017set_option linter.unusedSectionVars false1819namespace Nonadditivity.WeightedBell2021open Entropy Channels BellOutput22open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2324variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]25[Fintype κ] [DecidableEq κ] [Nonempty κ]2627def pairedChannel (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)28(U : κ → unitary (Matrix ι ι ℂ)) :29KrausChannel (ι×ι) (ι×ι) (κ×κ) :=30(KrausChannel.randomUnitary p hp hs U).tensor31(KrausChannel.randomUnitary p hp hs U).conjugate3233theorem pairedChannel_kraus (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)34(U : κ → unitary (Matrix ι ι ℂ)) (z : κ×κ) :35(pairedChannel p hp hs U).kraus z =36((Real.sqrt (p z.1)*Real.sqrt (p z.2):ℝ):ℂ) •37(tensorUnitary (U z.1) (conjugateUnitary (U z.2)) : Matrix (ι×ι) (ι×ι) ℂ) := by38ext ⟨a,b⟩ ⟨c,d⟩39change ((Real.sqrt (p z.1):ℂ)*(U z.1 : Matrix ι ι ℂ) a c)*40star ((Real.sqrt (p z.2):ℂ)*(U z.2 : Matrix ι ι ℂ) b d) =41((Real.sqrt (p z.1)*Real.sqrt (p z.2):ℝ):ℂ)*42((U z.1 : Matrix ι ι ℂ) a c*star ((U z.2 : Matrix ι ι ℂ) b d))43rw [star_mul]44simp only [Complex.star_def,Complex.conj_ofReal,Complex.ofReal_mul]45ring4647/-- The literal pure-state ensemble of the weighted paired channel. -/48theorem pairedChannel_bell_matrix (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)49(U : κ → unitary (Matrix ι ι ℂ)) :50((pairedChannel p hp hs U).output bellState).matrix =51∑ z : κ×κ, ((p z.1*p z.2:ℝ):ℂ) • (pairState U z).matrix := by52simp only [KrausChannel.output_matrix,KrausChannel.map]53apply Finset.sum_congr rfl54intro z _55rw [pairedChannel_kraus]56simp only [Matrix.conjTranspose_smul,Matrix.smul_mul,Matrix.mul_smul,smul_smul,57pairState,DensityMatrix.unitaryConjugate,Matrix.star_eq_conjTranspose]58congr 159simp only [Complex.star_def,Complex.conj_ofReal,← Complex.ofReal_mul]60congr 161nlinarith [Real.mul_self_sqrt (hp z.1),Real.mul_self_sqrt (hp z.2)]6263/-- The diagonal weighted branches coincide and merge into their squared-mass sum. -/64theorem pairedChannel_bell_eq_merged (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)65(U : κ → unitary (Matrix ι ι ℂ)) :66(pairedChannel p hp hs U).output bellState =67DensityMatrix.mixture (WeightedBellScalar.weights p)68(WeightedBellScalar.weights_nonneg p hp) (WeightedBellScalar.weights_sum p hs)69(mergedStates U) := by70apply DensityMatrix.ext71rw [pairedChannel_bell_matrix,split_pair_sum]72have hdiag : (∑ i : κ, ((p i*p i:ℝ):ℂ) • (bellState (ι := ι)).matrix) =73((∑ i, p i^2 : ℝ):ℂ) • bellState.matrix := by74rw [← Finset.sum_smul]75congr 176simp only [← Complex.ofReal_sum,pow_two]77simp only [pairState_diagonal,hdiag,DensityMatrix.mixture_matrix,Fintype.sum_option,78WeightedBellScalar.weights,mergedStates]7980/-- Actual weighted mixed-unitary Bell entropy, including its strict nonuniform margin. -/81theorem pairedChannel_bell_entropy_le (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)82(U : κ → unitary (Matrix ι ι ℂ)) :83((pairedChannel p hp hs U).output bellState).vonNeumann ≤842*Real.log (Fintype.card κ)-(∑ i, p i^2)*Real.log (Fintype.card κ) := by85rw [pairedChannel_bell_eq_merged]86have h := EntropyMixtures.densityMatrix_mixture_entropy_upper87(WeightedBellScalar.weights p) (WeightedBellScalar.weights_nonneg p hp)88(WeightedBellScalar.weights_sum p hs) (mergedStates U)89simp_rw [mergedStates_entropy_zero] at h90have h' : (DensityMatrix.mixture (WeightedBellScalar.weights p)91(WeightedBellScalar.weights_nonneg p hp) (WeightedBellScalar.weights_sum p hs)92(mergedStates U)).vonNeumann ≤ shannon (WeightedBellScalar.weights p) := by93simpa only [mul_zero,Finset.sum_const_zero,add_zero] using h94exact h'.trans (WeightedBellScalar.weights_shannon_le p hp hs)9596/-- The weighted complementary channel obeys the same Bell bound by actual97pure-input complementary entropy equality. -/98theorem complementary_bell_entropy_le (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)99(U : κ → unitary (Matrix ι ι ℂ)) :100(((KrausChannel.randomUnitary p hp hs U).complementary.tensor101(KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState).vonNeumann ≤1022*Real.log (Fintype.card κ)-(∑ i, p i^2)*Real.log (Fintype.card κ) := by103have hstate : (pairedChannel p hp hs U).complementary.output bellState =104((KrausChannel.randomUnitary p hp hs U).complementary.tensor105(KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState := by106apply DensityMatrix.ext107rfl108have he := (pairedChannel p hp hs U).pure_output_complementary_entropy_eq109normalizedBellVector normalizedBellVector_normSq_sum110rw [← bellState_eq_pureState,hstate] at he111rw [← he]112exact pairedChannel_bell_entropy_le p hp hs U113114/-- Explicit margin over the uniform-weight Bell entropy budget. -/115theorem complementary_bell_entropy_le_with_margin116(p : κ → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i=1)117(U : κ → unitary (Matrix ι ι ℂ)) :118(((KrausChannel.randomUnitary p hp hs U).complementary.tensor119(KrausChannel.randomUnitary p hp hs U).complementary.conjugate).output bellState).vonNeumann ≤1202*Real.log (Fintype.card κ)-Real.log (Fintype.card κ)/(Fintype.card κ:ℝ) -121((∑ i, p i^2)-1/(Fintype.card κ:ℝ))*Real.log (Fintype.card κ) := by122convert complementary_bell_entropy_le p hp hs U using 1; ring123124/-- Every output of the weighted complementary channel has the prescribed125branch probabilities on its diagonal. -/126theorem complementary_output_diagonal (p : κ → ℝ) (hp : ∀ i, 0 ≤ p i)127(hs : ∑ i, p i=1) (U : κ → unitary (Matrix ι ι ℂ))128(ρ : DensityMatrix ι) (i : κ) :129((KrausChannel.randomUnitary p hp hs U).complementary.output ρ).matrix i i = (p i:ℂ) := by130rw [KrausChannel.output_matrix,KrausChannel.complementary_map_entry]131change (((Real.sqrt (p i):ℂ) • (U i : Matrix ι ι ℂ)) * ρ.matrix *132((Real.sqrt (p i):ℂ) • (U i : Matrix ι ι ℂ)).conjTranspose).trace = _133have ht : ((U i : Matrix ι ι ℂ) * ρ.matrix *134(U i : Matrix ι ι ℂ).conjTranspose).trace = 1 := by135rw [Matrix.trace_mul_cycle,← Matrix.star_eq_conjTranspose,136Unitary.coe_star_mul_self,Matrix.one_mul]137exact ρ.normalized138simp only [Matrix.conjTranspose_smul,Matrix.smul_mul,Matrix.mul_smul,smul_smul,139Matrix.trace_smul,ht,smul_eq_mul,mul_one]140simp [← Complex.ofReal_mul,Real.mul_self_sqrt (hp i)]141142end Nonadditivity.WeightedBell