Fixed-width encodings of finite types #
fintypeEncoding F enumerates F by Fintype.equivFin, then uses indexBits to represent
the resulting index in Nat.clog 2 (Fintype.card F) bits, least significant bit first. The
chosen enumeration is noncomputable; no efficient encoding or decoding algorithm is claimed.
The embedding is independent of any circuit or function to be computed.
Main definitions #
Cslib.BitString.fintypeEncoding: an embedding of a finite type into logarithmic-width words.
A finite type embedded in logarithmic-width binary words through a chosen enumeration.
The enumeration is Fintype.equivFin; the index uses the least-significant-bit-first layout
of indexBits. This definition supplies no computational complexity certificate.