This module exists to provide the very basic BitVec definitions required for
Init.Data.UInt.BasicAux.
@[match_pattern]
The bitvector with value i mod 2^n.
Conventions for notations in identifiers:
The recommended spelling of
0#nin identifiers iszero(notofNat_zero).The recommended spelling of
1#nin identifiers isone(notofNat_one).
Equations
- BitVec.ofNat n i = { toFin := Fin.ofNat' (2 ^ n) i }
Instances For
Equations
- BitVec.instOfNat = { ofNat := BitVec.ofNat n i }
Equations
- BitVec.instAdd = { add := BitVec.add }
Equations
- BitVec.instSub = { sub := BitVec.sub }