Exact Lean source
Nonadditivity.OperationalBlocking
Download original .lean · View on GitHub · Jump to source
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
14 project constants, including generated, internal and private declarations.
14 declarations
Nonadditivity.Operational.Code.padTo.congr_simpNonadditivity.Operational.CodeSequence.mk.congr_simpNonadditivity.Operational.CodeSequence.rate.eq_1internal/detail/privateNonadditivity.Operational.CodeSequence.unblockNonadditivity.Operational.CodeSequence.unblock._proof_1internal/detail/privateNonadditivity.Operational.CodeSequence.unblock.eq_1internal/detail/privateNonadditivity.Operational.CodeSequence.unblockPacketNonadditivity.Operational.CodeSequence.unblockPacket.eq_1internal/detail/privateNonadditivity.Operational.CodeSequence.unblock_errorNonadditivity.Operational.CodeSequence.unblock_hasRateNonadditivity.Operational.CodeSequence.unblock_vanishingErrorNonadditivity.Operational.achievableRate_of_blockNonadditivity.Operational.blockedIndex_le_lengthNonadditivity.Operational.operationalCapacity_block_le
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.OperationalBlockingFlatten7import Nonadditivity.OperationalBlockRates89/-! # Operational rate rescaling for genuine channel blocks1011Every code for a fixed channel block is flattened into its actual elementary12uses, and the fewer-than-one-block remaining uses are ignored. This constructs13codes for all positive lengths with exactly preserved error eventually.14-/15noncomputable section16namespace Nonadditivity.Operational17open Entropy Channels RegularizedHolevo Filter Topology18open scoped BigOperators Matrix ComplexOrder19set_option backward.isDefEq.respectTransparency false2021/-- Complete blocks occupy no more than the prescribed positive length. -/22theorem blockedIndex_le_length (k n : ℕ) (h : k≤n) :23blockedIndex k (BlockRates.blockIndex k n)≤n := by24have he := blockedIndex_add_one k (BlockRates.blockIndex k n)25rw [BlockRates.blockIndex_add_one h] at he26have hd := Nat.div_mul_le_self (n+1) (k+1)27dsimp [BlockRates.blockCount] at he28nlinarith2930variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]31[Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]3233namespace CodeSequence3435/-- A jointly bundled message count and code avoids any artificial36message-alphabet casts when selecting a complete block count. -/37def unblockPacket (T : KrausChannel ι ο κ) (k : ℕ)38(S : CodeSequence (positiveTensorPower T k)) (n : ℕ) :39Σ M : ℕ, Code (positiveTensorPower T n) M :=40if h : k≤n then41⟨S.messages (BlockRates.blockIndex k n),42Code.padTo T ((S.code (BlockRates.blockIndex k n)).flatten T k _)43(blockedIndex_le_length k n h)⟩44else ⟨1,oneMessage (positiveTensorPower T n)⟩4546/-- Actual full-length coding sequence obtained by flattening complete blocks47and padding their final unused positions. Early short lengths carry one message. -/48def unblock (T : KrausChannel ι ο κ) (k : ℕ)49(S : CodeSequence (positiveTensorPower T k)) : CodeSequence T where50messages := fun n => (unblockPacket T k S n).151messages_pos := by52intro n53unfold unblockPacket54split_ifs55· exact S.messages_pos _56· exact Nat.zero_lt_one57code := fun n => (unblockPacket T k S n).25859omit [Nonempty ο] in60@[simp] theorem unblock_error (T : KrausChannel ι ο κ) (k : ℕ)61(S : CodeSequence (positiveTensorPower T k)) (n : ℕ) (h : k≤n) :62((S.unblock T k).code n).error=(S.code (BlockRates.blockIndex k n)).error := by63change (fun B : Σ M : ℕ, Code (positiveTensorPower T n) M => B.2.error)64(unblockPacket T k S n) = _65rw [unblockPacket,dif_pos h]66exact (Code.padTo_error T _ _).trans (Code.flatten_error T k _ _)6768omit [Nonempty ο] in69theorem unblock_vanishingError (T : KrausChannel ι ο κ) (k : ℕ)70(S : CodeSequence (positiveTensorPower T k)) (hE : S.VanishingError) :71(S.unblock T k).VanishingError := by72apply (BlockRates.error_subsequence k hE).congr'73filter_upwards [eventually_ge_atTop k] with n hn74exact (unblock_error T k S n hn).symm7576omit [Nonempty ο] in77theorem unblock_hasRate (T : KrausChannel ι ο κ) (k : ℕ)78(S : CodeSequence (positiveTensorPower T k)) {R : ℝ} (hR : S.HasRate R) :79(S.unblock T k).HasRate (R / ((k+1 : ℕ) : ℝ)) := by80have hs := BlockRates.rescaled_rate k (fun n => Scalar.log2 (S.messages n)) hR81intro r hr82filter_upwards [hs r hr,eventually_ge_atTop k] with n hn hkn83simpa only [rate,unblock,unblockPacket,dif_pos hkn] using hn8485end CodeSequence8687omit [Nonempty ο] in88/-- Every operational rate on a block of `k+1` uses yields its rescaled rate89on the original channel, with codes at every positive block length. -/90theorem achievableRate_of_block {T : KrausChannel ι ο κ} (k : ℕ) {R : ℝ}91(hR : AchievableRate (positiveTensorPower T k) R) :92AchievableRate T (R / ((k+1 : ℕ) : ℝ)) := by93obtain ⟨S,hE,hR⟩ := hR94exact ⟨S.unblock T k, S.unblock_vanishingError T k hE, S.unblock_hasRate T k hR⟩9596/-- Operational block capacity cannot exceed its number of elementary uses97times the original channel's operational capacity. -/98theorem operationalCapacity_block_le (T : KrausChannel ι ο κ) (k : ℕ) :99operationalCapacity (positiveTensorPower T k) ≤100((k+1 : ℕ) : ℝ)*operationalCapacity T := by101apply csSup_le ⟨0,zero_achievable _⟩102intro R hR103have h := achievableRate_le_capacity (achievableRate_of_block k hR)104have hk : (0 : ℝ)<((k+1 : ℕ) : ℝ) := by positivity105exact (div_le_iff₀ hk).mp h |>.trans_eq (mul_comm _ _)106107end Nonadditivity.Operational