Distributional Prefix-Free Set-Separator Codes #
Given a finite universe Fin S and any distribution μ over disjoint subset pairs
(A, B) : Finset (Fin S) × Finset (Fin S), this module constructs a μ-dependent deterministic
prefix-free binary code enc together with a decoding predicate sep : List Bool → Fin S → Bool
such that:
Set.range encsatisfiesInformationTheory.IsPrefixFree, soenc (A, B)can be concatenated with subsequent protocol fields without length headers viaInformationTheory.IsPrefixFree.bind_append(CslibFrontier/Foundations/Data/BitString/List/PrefixFree.lean).- For every disjoint pair
(A, B),sep (enc (A, B))evaluates totrueonAandfalseonB(sosepSet sep (enc (A, B))containsAand is disjoint fromB). - Under
μ, the expected bit length ofencis at most2 * E_μ[|A| + |B|] + 7.
Source attribution and formalization adaptation #
- Pinned source: [LLYZ23b] (
arXiv:2306.02253v3, Section 5.1, Theorem 5.2, PDF p. 23 / printed p. 22, and its application to cell setsS_BandS_A \ S_Bin Section 5.1 Step 3, PDF p. 23 / printed p. 22, and Section 5.2 Eq. (11), PDF p. 25 / printed p. 24). - Source statement (paraphrase): Theorem 5.2 of [LLYZ23b] cites
[CKRT04], stating that for any two disjoint subsets
A, Bof a finite universe there exists a separating setS*(A ⊆ S*andB ∩ S* = ∅) encodable within at mostβ (|A| + |B|)bits in expectation for all|A| + |B| > 0, for a global constantβ > 0. - Intentional proof and statement adaptation (original): Rather than formalizing hypergraph
peeling from [CKRT04],
exists_prefixFree_separator_codeproves a distributional prefix-free variant tailored to [LLYZ23b] Section 5.1 Step 3 and Section 5.2 Eq. (11), where receiver Bob has unbounded free computation and knows the input distributionμ. Specifically,exists_prefixFree_separator_codediffers from Theorem 5.2 in three ways:encandsepdepend onμ(fixing a deterministic codebookθ₀adapted toμ);- only the
μ-average codeword lengthE_μ[|enc(A, B)|]is bounded (not per-pair expectation); - there is an additive
+ 7bits covering the empty case|A| + |B| = 0alongsideβ = 2. SamplingT = 2 ^ (2 * S + 2)independent uniform bitmasks onFin S, encoding the 1-based index of the first separating mask (Fin.find?) viatrue :: eliasGamma (j₀ + 1)(orfalse :: List.ofFn (fun i => decide (i ∈ A))of lengthS + 1if none separates), and averaging over the random codebook yields(enc, sep).
Main definitions #
Cslib.Probability.Coding.sepSet: separatingFinset (Fin S)decoded from a separator predicate and codeword.
Main results #
Cslib.Probability.Coding.mem_sepSet,Cslib.Probability.Coding.subset_sepSet_and_disjoint: membership characterization and conversion from pointwise Boolean separation toA ⊆ sepSet sep w ∧ Disjoint B (sepSet sep w).Cslib.Probability.Coding.exists_prefixFree_separator_code: existence of aμ-dependent deterministic prefix-free separator code withμ-expected bit length≤ 2 * E_μ[|A| + |B|] + 7.
References #
Codebook construction for a fixed mask table θ #
Expected codeword length under a random uniform codebook #
Distributional prefix-free set-separator code (adapting [LLYZ23b], Section 5.1,
Theorem 5.2, without hypergraph peeling from [CKRT04]): for any
distribution μ over disjoint pairs (A, B) of subsets of Fin S, there exist a deterministic
prefix-free encoding enc (IsPrefixFree (Set.range enc)) and decoding predicate sep separating
all disjoint pairs with μ-expected codeword length ≤ 2 * E_μ[|A| + |B|] + 7.
Unlike Theorem 5.2 of [LLYZ23b] (which gives a single randomized scheme with per-instance
expected length β (|A| + |B|) for |A| + |B| > 0), here enc and sep depend on μ, only the
μ-average codeword length is bounded, and the + 7 term covers |A| + |B| = 0.