Exact Lean source
Nonadditivity.QuantumCodingHSW
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
10 project constants, including generated, internal and private declarations.
10 declarations
Nonadditivity.Operational.operationalCapacity.congr_simpNonadditivity.QuantumCoding.ensembleCodingVarianceNonadditivity.QuantumCoding.ensembleCodingVariance._proof_1internal/detail/privateNonadditivity.QuantumCoding.ensembleCodingVariance._proof_2internal/detail/privateNonadditivity.QuantumCoding.ensemble_information_le_capacityNonadditivity.QuantumCoding.ensemble_rate_achievableNonadditivity.QuantumCoding.finite_ensemble_codesNonadditivity.QuantumCoding.holevoBits_le_operationalCapacityNonadditivity.QuantumCoding.outputEnsembleInformationNonadditivity.QuantumCoding.outputEnsembleInformation.congr_simp
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.QuantumCodingTypicalTests7import Nonadditivity.QuantumCodingPacking8import Nonadditivity.QuantumCodingChannelWords9import Nonadditivity.QuantumCodingRates1011/-! # Achievability of finite-ensemble Holevo information1213The codes below have actual density-matrix codewords on channel tensor14powers and normalized POVM decoders. Their error is the Born error, bounded15by the independently proved spectral typicality and sequential packing16estimates. No coding theorem or capacity identification is assumed.17-/1819noncomputable section20namespace Nonadditivity.QuantumCoding2122open Entropy Channels Operational RegularizedHolevo23open scoped BigOperators ComplexOrder Matrix2425variable {ι ο κ α : Type*}26[Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο] [Fintype κ] [Fintype α]2728def outputEnsembleInformation (T : KrausChannel ι ο κ) (p : α → ℝ)29(hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι) : ℝ :=30(DensityMatrix.mixture p hp hs (fun a => T.output (ρ a))).vonNeumann -31ensembleConditionalEntropy p (fun a => T.output (ρ a))3233def ensembleCodingVariance (T : KrausChannel ι ο κ) (p : α → ℝ)34(hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι) : ℝ :=359 * QuantumCodingTypicality.variance36(DensityMatrix.mixture p hp hs (fun a => T.output (ρ a))).weights +378 * ensembleConditionalVariance p (fun a => T.output (ρ a))3839/-- Actual finite-block codes with the explicit HSW packing estimate. -/40theorem finite_ensemble_codes (T : KrausChannel ι ο κ) (p : α → ℝ)41(hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι)42(n M : ℕ) (hM : 0 < M) {δ : ℝ} (hδ : 0 < δ) :43∃ C : Code (positiveTensorPower T n) M,44C.error ≤ ensembleCodingVariance T p hp hs ρ /45(((n + 1 : ℕ) : ℝ) * δ ^ 2) +464 * (M - 1 : ℕ) * Real.exp (-((n + 1 : ℕ) : ℝ) *47(outputEnsembleInformation T p hp hs ρ - 2 * δ)) := by48let out := fun a => T.output (ρ a)49let σ := DensityMatrix.mixture p hp hs out50let G := globalTypicalTest σ (n + 1) δ51let Q := conditionalTypicalTest p out (n + 1) δ52let w := tensorWeights p (n + 1)53let states := fun x : Fin (n + 1) → α => tensorFamilyState (fun j => out (x j))54have hcross : (∑ x, ∑ y, w x * w y * crossAcceptance G (Q y) (states x)) ≤55Real.exp (-((n + 1 : ℕ) : ℝ) * (σ.vonNeumann - ensembleConditionalEntropy p out - 2 * δ)) := by56have h := typicalProjectors_average_cross_le p hp hs out (n + 1) δ57rw [Finset.sum_comm]58simpa only [crossAcceptance, G, Q, globalTypicalTest, conditionalTypicalTest,59states, w, Matrix.mul_assoc, mul_comm] using h60obtain ⟨c, D, hD⟩ := exists_projective_packing hM G Q w61(tensorWeights_nonneg p hp (n + 1)) (tensorWeights_sum p hs (n + 1)) states62(globalTypicalTest_mean_rejection_le p hp hs out (Nat.succ_pos n) hδ)63(conditionalTypicalTest_mean_rejection_le p hp hs out (Nat.succ_pos n) hδ) hcross64refine ⟨wordCode T n M (fun m j => ρ (c m j)) D, ?_⟩65rw [wordCode_error]66have herr : 1 - (∑ m, D.probability67(tensorFamilyState (fun j => T.output (ρ (c m j)))) m) / (M : ℝ) =681 - (M : ℝ)⁻¹ * ∑ m, D.probability (states (c m)) m := by69simp only [states, out, div_eq_mul_inv, mul_comm]70rw [herr]71convert hD using 172unfold ensembleCodingVariance outputEnsembleInformation73dsimp [out, σ]74ring7576/-- Every nonnegative rate strictly below a finite input ensemble's Holevo77information is attained by actual channel codes with error tending to zero. -/78theorem ensemble_rate_achievable [Nonempty ι] [Nonempty ο]79(T : KrausChannel ι ο κ) (p : α → ℝ)80(hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι)81{r : ℝ} (hr : 0 ≤ r) (hinfo : r < outputEnsembleInformation T p hp hs ρ) :82AchievableRate T (r / Real.log 2) := by83let χ := outputEnsembleInformation T p hp hs ρ84let δ := (χ - r) / 485have hδ : 0 < δ := by dsimp [δ, χ]; linarith86have hgap : r < χ - 2 * δ := by dsimp [δ, χ]; linarith87apply achievableRate_of_finite_codes T hr hgap88(ensembleCodingVariance T p hp hs ρ / δ ^ 2)89intro n90obtain ⟨C, hC⟩ := finite_ensemble_codes T p hp hs ρ n (expMessages r n)91(expMessages_pos r n) hδ92refine ⟨C, hC.trans ?_⟩93have hc : ((expMessages r n - 1 : ℕ) : ℝ) ≤ (expMessages r n : ℝ) := by94exact_mod_cast Nat.sub_le (expMessages r n) 195have hm := mul_le_mul_of_nonneg_right96(mul_le_mul_of_nonneg_left hc (by norm_num : (0 : ℝ) ≤ 4))97(Real.exp_nonneg (-((n + 1 : ℕ) : ℝ) * (χ - 2 * δ)))98have hdiv : ensembleCodingVariance T p hp hs ρ / (((n + 1 : ℕ) : ℝ) * δ ^ 2) =99(ensembleCodingVariance T p hp hs ρ / δ ^ 2) / ((n + 1 : ℕ) : ℝ) := by100rw [div_div, mul_comm]101rw [hdiv]102exact add_le_add (le_refl _) hm103104theorem ensemble_information_le_capacity [Nonempty ι] [Nonempty ο]105(T : KrausChannel ι ο κ) (p : α → ℝ)106(hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι) :107outputEnsembleInformation T p hp hs ρ / Real.log 2 ≤ operationalCapacity T := by108apply le_of_forall_lt_imp_le_of_dense109intro q hq110by_cases hq0 : 0 ≤ q111· have h := ensemble_rate_achievable T p hp hs ρ112(mul_nonneg hq0 Scalar.log_two_pos.le) ((lt_div_iff₀ Scalar.log_two_pos).mp hq)113have hcap := achievableRate_le_capacity h114simpa only [mul_div_cancel_right₀ _ Scalar.log_two_pos.ne'] using hcap115· exact (le_of_not_ge hq0).trans (operationalCapacity_nonneg T)116117/-- HSW lower bound for the actual single-use Holevo supremum. Every finite118output ensemble is lifted to real channel inputs, then encoded by the119constructed vanishing-error codes. -/120theorem holevoBits_le_operationalCapacity [Nonempty ι] [Nonempty ο]121(T : KrausChannel ι ο κ) : T.holevoBits ≤ operationalCapacity T := by122apply (div_le_iff₀ Scalar.log_two_pos).mpr123change StateEnsembles.quantity T.outputs ≤ operationalCapacity T * Real.log 2124unfold StateEnsembles.quantity125have hne : (Set.range (fun e : StateEnsembles.Ensemble T.outputs => e.information)).Nonempty := by126obtain ⟨σ, hσ⟩ := T.outputs_nonempty127exact ⟨_, ⟨StateEnsembles.singleton σ hσ, rfl⟩⟩128apply csSup_le hne129rintro _ ⟨e, rfl⟩130have hex : ∀ a, ∃ ρ : DensityMatrix ι, T.output ρ = e.state a := e.state_mem131choose input hinput using hex132have hinfo : outputEnsembleInformation T e.weight e.weight_nonneg e.weight_sum input =133e.information := by134unfold outputEnsembleInformation ensembleConditionalEntropy135simp_rw [hinput]136rfl137have h := ensemble_information_le_capacity T e.weight e.weight_nonneg e.weight_sum input138rw [hinfo] at h139exact (div_le_iff₀ Scalar.log_two_pos).mp h140141end Nonadditivity.QuantumCoding