Blocks of bit strings and finite tuples #
A tuple of m * k entries (in particular, a BitString (m * k)) is read as m consecutive
blocks of k entries through finProdFinEquiv: entry j of block i is entry
finProdFinEquiv (i, j) of the tuple (BitString.block). Cutting a tuple into its blocks is an
equivalence (Fin (m * k) → α) ≃ (Fin m → Fin k → α) (BitString.blocksEquiv). The positions of
the blocks (BitString.blockBits) are pairwise disjoint, and gluing two tuples along the
positions of one block takes that block from the first tuple and every other block from the second
(BitString.block_piecewise).
Main definitions #
Cslib.BitString.block: thei-th block ofkentries of a tuple ofm * kentries.Cslib.BitString.blocksEquiv: cutting a tuple into its blocks; its inverse reads entrypof the tuple in its block (BitString.blocksEquiv_symm_apply).Cslib.BitString.blockBits: the positions of the entries of a block.Cslib.BitString.listBlock: a block of a list (BitString.listBlock_ofFn).
Main results #
Cslib.BitString.pairwiseDisjoint_blockBits: blocks occupy disjoint positions.Cslib.BitString.block_piecewise: gluing two tuples along one block.
Entry j of block i is entry finProdFinEquiv (i, j) of the tuple.
blocksEquiv cuts a tuple 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.