Exact Lean source
Nonadditivity.PositiveHolevo
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.HolevoBitsMathlib.LinearAlgebra.Eigenspace.TriangularizabledependencyMathlib.Analysis.Complex.Polynomial.Basicdependency
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
28 project constants, including generated, internal and private declarations.
28 declarations
Nonadditivity.PositiveHolevo.block_converted_holevoBits_lowerNonadditivity.PositiveHolevo.block_converted_holevoBits_posNonadditivity.PositiveHolevo.block_converted_holevoBits_pos._proof_1_1internal/detail/privateNonadditivity.PositiveHolevo.block_converted_holevoBits_pos._proof_1_2internal/detail/privateNonadditivity.PositiveHolevo.block_converted_holevo_lowerNonadditivity.PositiveHolevo.exists_block_entropy_leNonadditivity.PositiveHolevo.exists_block_entropy_le._proof_1_1internal/detail/privateNonadditivity.PositiveHolevo.exists_block_entropy_le._proof_1_2internal/detail/privateNonadditivity.PositiveHolevo.exists_block_entropy_le._proof_1_3internal/detail/privateNonadditivity.PositiveHolevo.exists_complementary_entropy_leNonadditivity.PositiveHolevo.exists_normalized_eigenvectorNonadditivity.PositiveHolevo.exists_normalized_eigenvector._simp_1_1internal/detail/privateNonadditivity.PositiveHolevo.exists_pure_input_equal_unitary_outputsNonadditivity.PositiveHolevo.exists_pure_input_equal_unitary_outputs._simp_1_1internal/detail/privateNonadditivity.PositiveHolevo.exists_pure_input_equal_unitary_outputs._simp_1_2internal/detail/privateNonadditivity.PositiveHolevo.twoMergedWeightsNonadditivity.PositiveHolevo.twoMergedWeights._proof_1internal/detail/privateNonadditivity.PositiveHolevo.twoMergedWeights.congr_simpNonadditivity.PositiveHolevo.twoMergedWeights.eq_1internal/detail/privateNonadditivity.PositiveHolevo.twoMergedWeights_eqNonadditivity.PositiveHolevo.twoMergedWeights_nonnegNonadditivity.PositiveHolevo.twoMergedWeights_shannonNonadditivity.PositiveHolevo.twoMergedWeights_shannon._simp_1_3internal/detail/privateNonadditivity.PositiveHolevo.twoMergedWeights_sumNonadditivity.PositiveHolevo.twoMergedWeights_sum._simp_1_2internal/detail/privateNonadditivity.PositiveHolevo.uniformUnitary_output_eq_twoMergedNonadditivity.PositiveHolevo.uniformUnitary_output_eq_twoMerged._simp_1_1internal/detail/privateNonadditivity.PositiveHolevo.uniformUnitary_output_eq_twoMerged._simp_1_3internal/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.HolevoBits7import Mathlib.LinearAlgebra.Eigenspace.Triangularizable8import Mathlib.Analysis.Complex.Polynomial.Basic910/-! # A universal lower bound for the constructed channel's Holevo quantity1112The witnesses are actual pure inputs, obtained from complex eigenvectors of13the relative unitary of two branches. No adjoint norm bound is used.14-/1516noncomputable section1718namespace Nonadditivity.PositiveHolevo1920open Entropy Channels Channels.KrausChannel BlockConstruction Conversion21open scoped BigOperators ComplexOrder ComplexConjugate Matrix2223variable {ι : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]2425/-- Every complex square matrix on a nonempty finite space has a normalized26eigenvector. Normalization uses the actual sum of coordinate norm squares. -/27theorem exists_normalized_eigenvector (M : Matrix ι ι ℂ) :28∃ z : ℂ, ∃ v : ι → ℂ,29(∑ i, Complex.normSq (v i)) = 1 ∧ M *ᵥ v = z • v := by30obtain ⟨z,hz⟩ := Module.End.exists_eigenvalue (Matrix.toLin' M)31obtain ⟨x,hx⟩ := hz.exists_hasEigenvector32obtain ⟨j,hj⟩ := Function.ne_iff.mp hx.233have hS : 0 < ∑ i, Complex.normSq (x i) := by34apply Finset.sum_pos'35· intro i _36exact Complex.normSq_nonneg _37· exact ⟨j, Finset.mem_univ _, Complex.normSq_pos.mpr hj⟩38let r : ℝ := Real.sqrt (∑ i, Complex.normSq (x i))39have hr : 0 < r := Real.sqrt_pos.mpr hS40let v : ι → ℂ := Complex.ofReal (r⁻¹) • x41refine ⟨z,v,?_,?_⟩42· simp only [v, Pi.smul_apply, smul_eq_mul, Complex.normSq_mul,43Complex.normSq_ofReal, ← Finset.mul_sum]44have hs : r * r = ∑ i, Complex.normSq (x i) := Real.mul_self_sqrt hS.le45rw [← hs]46field_simp [ne_of_gt hr]47· have he : M *ᵥ x = z • x := by48simpa only [Matrix.toLin'_apply] using hx.apply_eq_smul49dsimp only [v]50rw [Matrix.mulVec_smul, he, smul_smul, smul_smul, mul_comm]5152/-- Two unitary branches have a pure input whose output projections agree.53The phase modulus is derived from trace normalization of the actual states. -/54theorem exists_pure_input_equal_unitary_outputs55(U V : unitary (Matrix ι ι ℂ)) :56∃ v : ι → ℂ, ∃ hv : (∑ i, Complex.normSq (v i)) = 1,57(pureState v hv).unitaryConjugate U = (pureState v hv).unitaryConjugate V := by58obtain ⟨z,v,hv,he⟩ := exists_normalized_eigenvector59((U : Matrix ι ι ℂ).conjTranspose * (V : Matrix ι ι ℂ))60have hUV : (U : Matrix ι ι ℂ) * (U : Matrix ι ι ℂ).conjTranspose = 1 := by61simpa only [← Matrix.star_eq_conjTranspose] using Unitary.coe_mul_star_self U62have hphase : (V : Matrix ι ι ℂ) *ᵥ v = z • ((U : Matrix ι ι ℂ) *ᵥ v) := by63have h := congrArg (fun x => (U : Matrix ι ι ℂ) *ᵥ x) he64simpa only [Matrix.mulVec_mulVec, ← Matrix.mul_assoc, hUV,65Matrix.one_mul, Matrix.mulVec_smul] using h66let σ := (pureState v hv).unitaryConjugate U67let τ := (pureState v hv).unitaryConjugate V68have hm : τ.matrix = (Complex.normSq z : ℂ) • σ.matrix := by69change (V : Matrix ι ι ℂ) * Matrix.vecMulVec v (star v) * _ =70(Complex.normSq z : ℂ) •71((U : Matrix ι ι ℂ) * Matrix.vecMulVec v (star v) * _)72rw [Matrix.star_eq_conjTranspose, Matrix.star_eq_conjTranspose,73BellOutput.conjugation_vecMulVec, BellOutput.conjugation_vecMulVec, hphase]74ext a b75simp only [Matrix.vecMulVec_apply, Pi.smul_apply, Pi.star_apply, star_mul,76smul_eq_mul, Matrix.smul_apply]77rw [← Complex.mul_conj z]78simp only [Complex.star_def]79ring80have hz : (Complex.normSq z : ℂ) = 1 := by81have ht := congrArg Matrix.trace hm82simpa only [τ.normalized, Matrix.trace_smul, σ.normalized, smul_eq_mul, mul_one] using ht.symm83refine ⟨v,hv,?_⟩84apply DensityMatrix.ext85exact (hm.trans (by rw [hz, one_smul])).symm8687section MergedWeights8889variable {κ : Type*} [Fintype κ] [DecidableEq κ] [Nonempty κ]9091/-- The two first branch weights are merged, retaining a zero-weight label. -/92def twoMergedWeights (a b : κ) (i : κ) : ℝ :=93if i = a then 2 / (Fintype.card κ : ℝ)94else if i = b then 0 else 1 / (Fintype.card κ : ℝ)9596theorem twoMergedWeights_nonneg (a b i : κ) : 0 ≤ twoMergedWeights a b i := by97unfold twoMergedWeights98split_ifs <;> positivity99100omit [Nonempty κ] in101theorem twoMergedWeights_eq (a b : κ) (hab : a ≠ b) (i : κ) :102twoMergedWeights a b i = 1 / (Fintype.card κ : ℝ) +103(if i = a then 1 / (Fintype.card κ : ℝ) else 0) -104(if i = b then 1 / (Fintype.card κ : ℝ) else 0) := by105by_cases ha : i = a106· subst i107simp [twoMergedWeights, hab]108ring109· by_cases hb : i = b110· subst i111simp [twoMergedWeights, Ne.symm hab]112· simp [twoMergedWeights, ha, hb]113114theorem twoMergedWeights_sum (a b : κ) (hab : a ≠ b) :115∑ i, twoMergedWeights a b i = 1 := by116simp_rw [twoMergedWeights_eq a b hab]117rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]118simp [Fintype.card_ne_zero]119120theorem twoMergedWeights_shannon (a b : κ) (hab : a ≠ b) :121shannon (twoMergedWeights a b) = Real.log (Fintype.card κ) -1222 * Real.log 2 / (Fintype.card κ : ℝ) := by123have hK : (Fintype.card κ : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_ne_zero124have hterm (i : κ) :125twoMergedWeights a b i * Real.log (twoMergedWeights a b i) =126(1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ)) +127(if i = a then128(2 / (Fintype.card κ : ℝ)) * Real.log (2 / (Fintype.card κ : ℝ)) -129(1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ))130else 0) -131(if i = b then132(1 / (Fintype.card κ : ℝ)) * Real.log (1 / (Fintype.card κ : ℝ))133else 0) := by134by_cases ha : i = a135· subst i136simp [twoMergedWeights, hab]137· by_cases hb : i = b138· subst i139simp [twoMergedWeights, Ne.symm hab]140· simp [twoMergedWeights, ha, hb]141unfold shannon142simp_rw [hterm]143rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]144simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul,145Finset.sum_ite_eq', Finset.mem_univ, if_true]146rw [Real.log_div (by norm_num : (2 : ℝ) ≠ 0) hK]147simp only [one_div, Real.log_inv]148field_simp149ring150151omit [Nonempty ι] in152set_option maxHeartbeats 150000 in153/-- The equality of two actual output states merges their weights in the154actual random-unitary output matrix. No orthogonality is needed. -/155theorem uniformUnitary_output_eq_twoMerged156(U : κ → unitary (Matrix ι ι ℂ)) (ρ : DensityMatrix ι)157(a b : κ) (hab : a ≠ b)158(heq : ρ.unitaryConjugate (U a) = ρ.unitaryConjugate (U b)) :159(uniformUnitary U).output ρ =160DensityMatrix.mixture (twoMergedWeights a b) (twoMergedWeights_nonneg a b)161(twoMergedWeights_sum a b hab) (fun i => ρ.unitaryConjugate (U i)) := by162let pu : κ → ℝ := fun _ => 1 / (Fintype.card κ : ℝ)163have hpu : ∀ i, 0 ≤ pu i := fun _ => by dsimp [pu]; positivity164have hsu : ∑ i, pu i = 1 := by simp [pu, Fintype.card_ne_zero]165have houtput : (uniformUnitary U).output ρ =166DensityMatrix.mixture pu hpu hsu (fun i => ρ.unitaryConjugate (U i)) := by167apply DensityMatrix.ext168change (randomUnitary _ _ _ U).map ρ.matrix = _169rw [randomUnitary_map]170simp only [DensityMatrix.mixture_matrix, DensityMatrix.unitaryConjugate,171Matrix.star_eq_conjTranspose, pu]172rw [houtput]173apply DensityMatrix.ext174simp only [DensityMatrix.mixture_matrix]175ext x y176simp only [Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul]177have hp (i : κ) : (twoMergedWeights a b i : ℂ) =178Complex.ofReal (1 / (Fintype.card κ : ℝ)) +179(if i = a then Complex.ofReal (1 / (Fintype.card κ : ℝ)) else 0) -180(if i = b then Complex.ofReal (1 / (Fintype.card κ : ℝ)) else 0) := by181have hh := congrArg Complex.ofReal (twoMergedWeights_eq a b hab i)182simpa only [Complex.ofReal_add, Complex.ofReal_sub, apply_ite,183Complex.ofReal_zero] using hh184have hterm (i : κ) : (twoMergedWeights a b i : ℂ) *185(ρ.unitaryConjugate (U i)).matrix x y =186Complex.ofReal (1 / (Fintype.card κ : ℝ)) * (ρ.unitaryConjugate (U i)).matrix x y +187(if i = a then Complex.ofReal (1 / (Fintype.card κ : ℝ)) *188(ρ.unitaryConjugate (U i)).matrix x y else 0) -189(if i = b then Complex.ofReal (1 / (Fintype.card κ : ℝ)) *190(ρ.unitaryConjugate (U i)).matrix x y else 0) := by191rw [hp]192split_ifs <;> ring193simp_rw [hterm]194rw [Finset.sum_sub_distrib, Finset.sum_add_distrib]195simp only [Finset.sum_ite_eq', Finset.mem_univ, if_true]196rw [heq]197simp only [pu, add_sub_cancel_right]198199/-- The phase-aligned eigenvector is an actual local complementary-channel200input with the stated output entropy deficit. -/201theorem exists_complementary_entropy_le202(U : κ → unitary (Matrix ι ι ℂ)) (a b : κ) (hab : a ≠ b) :203∃ ρ : DensityMatrix ι,204((uniformUnitary U).complementary.output ρ).vonNeumann ≤205Real.log (Fintype.card κ) - 2 * Real.log 2 / (Fintype.card κ : ℝ) := by206obtain ⟨v,hv,heq⟩ := exists_pure_input_equal_unitary_outputs (U a) (U b)207let ρ := pureState v hv208have hm := uniformUnitary_output_eq_twoMerged U ρ a b hab heq209have h := EntropyMixtures.densityMatrix_mixture_entropy_upper210(twoMergedWeights a b) (twoMergedWeights_nonneg a b)211(twoMergedWeights_sum a b hab) (fun i => ρ.unitaryConjugate (U i))212have hz (i : κ) : (ρ.unitaryConjugate (U i)).vonNeumann = 0 := by213rw [DensityMatrix.unitaryConjugate_entropy]214exact pureState_entropy_zero v hv215simp only [hz, mul_zero, Finset.sum_const_zero, add_zero,216twoMergedWeights_shannon a b hab] at h217refine ⟨ρ,?_⟩218rw [← (uniformUnitary U).pure_output_complementary_entropy_eq v hv, hm]219exact h220221end MergedWeights222223/-- Product inputs tensor the actual local eigenvector witnesses. -/224theorem exists_block_entropy_le {K : ℕ} [NeZero K] (hK : 2 ≤ K)225(U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :226∃ ρ : DensityMatrix (TensorChainIndex ι n),227((blockChannel U n).output ρ).vonNeumann ≤228(n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) := by229let a : Fin K := ⟨0, by omega⟩230let b : Fin K := ⟨1, by omega⟩231have hab : a ≠ b := by232intro h233have h' := congrArg Fin.val h234change (0 : ℕ) = 1 at h'235omega236have hex (j : ℕ) := exists_complementary_entropy_le (U j) a b hab237choose ρ hρ using hex238let σ := DensityMatrix.tensorChain ρ n239have hsum : ((BlockBell.blockComplementary U n).output σ).vonNeumann ≤240(n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) := by241change ((tensorChain (fun j => (uniformUnitary (U j)).complementary) n).output242(DensityMatrix.tensorChain ρ n)).vonNeumann ≤ _243rw [tensorChain_output_entropy]244calc245_ ≤ ∑ j ∈ Finset.range n,246(Real.log K - 2 * Real.log 2 / (K : ℝ)) := by247apply Finset.sum_le_sum248intro j _249simpa only [Fintype.card_fin] using hρ j250_ = _ := by simp; ring251have hout := reindex_output_eq (BlockBell.blockComplementary U n)252(Equiv.refl _) (blockOutputEquiv K n) σ253rw [DensityMatrix.reindex_refl] at hout254refine ⟨σ,?_⟩255change (((BlockBell.blockComplementary U n).reindex (Equiv.refl _)256(blockOutputEquiv K n)).output σ).vonNeumann ≤ _257rw [hout, DensityMatrix.reindex_entropy]258exact hsum259260/-- Every constructed switch/Weyl block channel has a universal single-use261Holevo lower bound, independently of any analytic certificate. -/262theorem block_converted_holevo_lower {K : ℕ} [NeZero K] (hK : 2 ≤ K)263(U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :2642 * (n : ℝ) * Real.log 2 / (K : ℝ) ≤ (converted (blockChannel U n)).holevo := by265obtain ⟨ρ,hρ⟩ := exists_block_entropy_le hK U n266have hmin : (blockChannel U n).minimumEntropy ≤267((blockChannel U n).output ρ).vonNeumann :=268StateEnsembles.minimumEntropy_le ⟨ρ,rfl⟩269rw [converted_holevo]270have hlog : Real.log ((K ^ n : ℕ) : ℝ) = (n : ℝ) * Real.log K := by271rw [Nat.cast_pow, Real.log_pow]272rw [hlog]273have halg : (n : ℝ) * (Real.log K - 2 * Real.log 2 / (K : ℝ)) =274(n : ℝ) * Real.log K - 2 * (n : ℝ) * Real.log 2 / (K : ℝ) := by ring275rw [halg] at hρ276linarith277278/-- The supplemental manuscript estimate in bits, on the actual channels. -/279theorem block_converted_holevoBits_lower {K : ℕ} [NeZero K] (hK : 2 ≤ K)280(U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ) :2812 * (n : ℝ) / (K : ℝ) ≤ (converted (blockChannel U n)).holevoBits := by282apply (le_div_iff₀ Scalar.log_two_pos).mpr283have h := block_converted_holevo_lower hK U n284convert h using 1285ring286287/-- Strict positivity, including the denominator needed for channel ratios. -/288theorem block_converted_holevoBits_pos {K : ℕ} [NeZero K] (hK : 2 ≤ K)289(U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) {n : ℕ} (hn : 1 ≤ n) :2900 < (converted (blockChannel U n)).holevoBits := by291have h := block_converted_holevoBits_lower hK U n292have hpos : 0 < 2 * (n : ℝ) / (K : ℝ) := by293have hnpos : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n)294have hKpos : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)295positivity296exact hpos.trans_le h297298end Nonadditivity.PositiveHolevo