Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Cuts.Units

Units of a bit string #

The cutting argument of [Ant26] (Section H.2, where a string w is written on packets as w10⋯0, and Appendix J, which applies it; module Nc.Cut.Units) writes the strings that parties exchange on units of ub bits: a 1 and then zeros are appended to the string, and the result is cut into blocks of ub bits. This is the padding Cslib.BitString.pad10star followed by Cslib.BitString.toBlocks (Cut.unitsOf_eq_getElem?_toBlocks), so the string can be recovered from its units (Cut.unitsOf_injective).

The paper has units of positive width, and so have the bridge to the padding and the recovery of the string, which assume 0 < ub. The definitions are total: for ub = 0 every string has one unit, which is empty, so nothing can be recovered from the units; later modules use this convention and exclude ub = 0 where they need recovery.

A word over an alphabet whose letters are coded by c bits each is first turned into a bit string (Cut.bitsOf), from which it can be recovered as well.

Main definitions #

Main results #

References #

@[reducible, inline]

The content of a unit: absent, or ub bits.

The number of units of a bit string: its blocks of ub bits after a 1 and zeros have been appended.

The units of a bit string: unit k is the k-th block of ub bits of the string followed by a 1 and zeros, and it is absent from unitCount ub L on. For ub = 0 there is one unit, the empty one, whatever the string is; the units determine the string only for 0 < ub (unitsOf_injective).

theorem Cslib.Circuits.Arithmetic.Separation.Cut.unitsOf_of_lt {ub : ℕ} {L : List Bool} {k : ℕ} (h : k < unitCount ub L) :
unitsOf ub L k = some fun (b : Fin ub) => (L ++ [true]).getD (k * ub + ↑b) false

The units of a bit string are the blocks of its padding.

A bit string is determined by its units.

def Cslib.Circuits.Arithmetic.Separation.Cut.bitsOf {Γ : Type u_1} {c : ℕ} (cb : Γ → BitString c) (X : List Γ) :

The bits of a word whose letters are coded by c bits each.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.length_bitsOf {Γ : Type u_1} {c : ℕ} (cb : Γ → BitString c) (X : List Γ) :
(bitsOf cb X).length = X.length * c

A word is determined by its bits, for an injective code of positive width.