Packing numbers into fields #
A low field x < m and a high field y are packed into the number x + m * y. Reducing modulo
m recovers x (Nat.add_mul_mod_of_lt), and dividing by m recovers y
(Nat.add_mul_div_left_of_lt). For fields of a and b bits, the packed number has a + b bits
(Nat.add_two_pow_mul_lt). Packing a packed number again as the high field gives any fixed number
of fields, which these facts decode one at a time.
Main results #
Nat.add_mul_mod_of_lt,Nat.add_mul_div_left_of_lt: decoding the two fields.Nat.add_two_pow_mul_lt: fields ofaandbbits fit ina + bbits.