Two padded streams faithfully encode block lists at a cumulative budget
ProvedCumulativeBlockCode.capacity_and_fidelitycomplexity-theory
Let H and E be the sizes of the finite header and cell alphabets. The code for at most r blocks and at most s cells in total has (H+1)^r (E+2)^(r+s) possible values. Equal codes recover the exact block lists under those bounds, including empty blocks.
Preamble
import Definitions.Def_CumulativeCrossingBlocks open CumulativeBlockCode
Formal statement
theorem CumulativeBlockCode.capacity_and_fidelity {Header Cell : Type} [Fintype Header] [Fintype Cell] (blocks cells : ℕ) :
Fintype.card (Code Header Cell blocks cells) =
(Fintype.card Header+1)^blocks * (Fintype.card Cell+2)^(blocks+cells) ∧
(∀ (x y : List (Header × List Cell)),
x.length ≤ blocks → totalCells x ≤ cells → y.length ≤ blocks → totalCells y ≤ cells →
encode blocks cells x = encode blocks cells y → x = y) := by sorrySource
Finite encodings for sparse crossing-sequence arguments.