Blocks of bit strings #
A string of m * k bits is read as m consecutive blocks of k bits through finProdFinEquiv:
bit j of block i is bit finProdFinEquiv (i, j) of the string (BitString.block). Cutting a
string into its blocks is an equivalence BitString (m * k) ≃ (Fin m → BitString k)
(BitString.blocksEquiv). The positions of the blocks (BitString.blockBits) are pairwise
disjoint, and gluing two strings along the positions of one block takes that block from the first
string and every other block from the second (BitString.block_piecewise).
Main definitions #
Cslib.BitString.block: thei-th block ofkbits of a string ofm * kbits.Cslib.BitString.blocksEquiv: cutting a string into its blocks; its inverse reads bitpof the string in its block (BitString.blocksEquiv_symm_apply).Cslib.BitString.blockBits: the positions of the bits of a block.Cslib.BitString.listBlock: a block of a bit list (BitString.listBlock_ofFn).
Main results #
Cslib.BitString.pairwiseDisjoint_blockBits: blocks occupy disjoint positions.Cslib.BitString.block_piecewise: gluing two strings along one block.
Bit j of block i is bit finProdFinEquiv (i, j) of the string.
blocksEquiv cuts a string into its blocks with block.
Cutting the concatenation of blocks into its blocks recovers them.
A position lies in block i exactly when its block index under finProdFinEquiv is i.
Distinct blocks occupy disjoint positions.