Documentation

CslibFrontier.Probability.Coding.SetSeparator

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:

  1. Set.range enc satisfies InformationTheory.IsPrefixFree, so enc (A, B) can be concatenated with subsequent protocol fields without length headers via InformationTheory.IsPrefixFree.bind_append (CslibFrontier/Foundations/Data/BitString/List/PrefixFree.lean).
  2. For every disjoint pair (A, B), sep (enc (A, B)) evaluates to true on A and false on B (so sepSet sep (enc (A, B)) contains A and is disjoint from B).
  3. Under μ, the expected bit length of enc is at most 2 * E_μ[|A| + |B|] + 7.

Source attribution and formalization adaptation #

Main definitions #

Main results #

References #

def Cslib.Probability.Coding.sepSet {S : ℕ} (sep : List Bool → Fin S → Bool) (w : List Bool) :

Finite separating set {x : Fin S | sep w x = true} decoded from a separator codeword w.

@[simp]
theorem Cslib.Probability.Coding.mem_sepSet {S : ℕ} {sep : List Bool → Fin S → Bool} {w : List Bool} {x : Fin S} :
x ∈ sepSet sep w ↔ sep w x = true
theorem Cslib.Probability.Coding.subset_sepSet_and_disjoint {S : ℕ} {sep : List Bool → Fin S → Bool} {w : List Bool} {A B : Finset (Fin S)} (hA : ∀ x ∈ A, sep w x = true) (hB : ∀ y ∈ B, sep w y = false) :
A ⊆ sepSet sep w ∧ Disjoint B (sepSet sep w)

Pointwise Boolean separation on (A, B) implies A ⊆ sepSet sep w and Disjoint B (sepSet sep w).

Codebook construction for a fixed mask table θ #

Expected codeword length under a random uniform codebook #

theorem Cslib.Probability.Coding.exists_prefixFree_separator_code (S : ℕ) (μ : PMF (Finset (Fin S) × Finset (Fin S))) (hdisj : ∀ ab ∈ μ.support, Disjoint ab.1 ab.2) :
∃ (enc : Finset (Fin S) × Finset (Fin S) → List Bool) (sep : List Bool → Fin S → Bool), InformationTheory.IsPrefixFree (Set.range enc) ∧ (∀ (A B : Finset (Fin S)), Disjoint A B → (∀ x ∈ A, sep (enc (A, B)) x = true) ∧ ∀ y ∈ B, sep (enc (A, B)) y = false) ∧ ∑ ab : Finset (Fin S) × Finset (Fin S), (μ ab).toReal * ↑(enc ab).length ≤ 2 * ∑ ab : Finset (Fin S) × Finset (Fin S), (μ ab).toReal * ↑(ab.1.card + ab.2.card) + 7

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.