A bit-vector literal
Instances For
Equations
- BitVec.instReprLiteral = { reprPrec := BitVec.reprLiteral✝ }
Try to convert OfNat.ofNat
/BitVec.OfNat
application into a
bitvector literal.
Equations
- BitVec.fromExpr? e = do let __discr ← liftM (Lean.Meta.getBitVecValue? e) match __discr with | some ⟨n, value⟩ => pure (some { n := n, value := value }) | x => pure none
Instances For
Helper function for reducing x <<< i
and x >>> i
where i
is a bitvector literal,
into one that is a natural number literal.
Instances For
Simplification procedure for negation of BitVec
s.
Equations
- BitVec.reduceNeg = BitVec.reduceUnary `Neg.neg 3 fun {n : Nat} (x : BitVec n) => -x
Instances For
Simplification procedure for bitwise not of BitVec
s.
Equations
- BitVec.reduceNot = BitVec.reduceUnary `Complement.complement 3 fun {n : Nat} (x : BitVec n) => ~~~x
Instances For
Simplification procedure for absolute value of BitVec
s.
Instances For
Simplification procedure for bitwise and of BitVec
s.
Equations
- BitVec.reduceAnd = BitVec.reduceBin `HAnd.hAnd 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 &&& x2
Instances For
Simplification procedure for bitwise or of BitVec
s.
Instances For
Simplification procedure for bitwise xor of BitVec
s.
Instances For
Simplification procedure for addition of BitVec
s.
Instances For
Simplification procedure for multiplication of BitVec
s.
Instances For
Simplification procedure for subtraction of BitVec
s.
Instances For
Simplification procedure for division of BitVec
s.
Equations
- BitVec.reduceDiv = BitVec.reduceBin `HDiv.hDiv 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 / x2
Instances For
Simplification procedure for the modulo operation on BitVec
s.
Instances For
Simplification procedure for the unsigned modulo operation on BitVec
s.
Equations
- BitVec.reduceUMod = BitVec.reduceBin `BitVec.umod 3 fun {n : Nat} => BitVec.umod
Instances For
Simplification procedure for unsigned division of BitVec
s.
Equations
- BitVec.reduceUDiv = BitVec.reduceBin `BitVec.udiv 3 fun {n : Nat} => BitVec.udiv
Instances For
Simplification procedure for division of BitVec
s using the SMT-Lib conventions.
Instances For
Simplification procedure for the signed modulo operation on BitVec
s.
Instances For
Simplification procedure for signed remainder of BitVec
s.
Instances For
Simplification procedure for signed t-division of BitVec
s.
Instances For
Simplification procedure for signed division of BitVec
s using the SMT-Lib conventions.
Equations
- BitVec.reduceSMTSDiv = BitVec.reduceBin `BitVec.smtSDiv 3 fun {n : Nat} => BitVec.smtSDiv
Instances For
Simplification procedure for getLsb
(lowest significant bit) on BitVec
.
Equations
- BitVec.reduceGetLsb = BitVec.reduceGetBit `BitVec.getLsbD fun {n : Nat} => BitVec.getLsbD
Instances For
Simplification procedure for getMsb
(most significant bit) on BitVec
.
Instances For
Simplification procedure for shift left on BitVec
.
Equations
- BitVec.reduceShiftLeft = BitVec.reduceShift `BitVec.shiftLeft 3 fun {n : Nat} => BitVec.shiftLeft
Instances For
Simplification procedure for unsigned shift right on BitVec
.
Instances For
Simplification procedure for signed shift right on BitVec
.
Equations
- BitVec.reduceSShiftRight = BitVec.reduceShift `BitVec.sshiftRight 3 fun {n : Nat} => BitVec.sshiftRight
Instances For
Simplification procedure for shift left on BitVec
.
Equations
- BitVec.reduceHShiftLeft = BitVec.reduceShift `HShiftLeft.hShiftLeft 6 fun {n : Nat} (x1 : BitVec n) (x2 : Nat) => x1 <<< x2
Instances For
Simplification procedure for converting a shift with a bit-vector literal into a natural number literal.
Equations
- BitVec.reduceHShiftLeft' = BitVec.reduceShiftWithBitVecLit `HShiftLeft.hShiftLeft
Instances For
Simplification procedure for shift right on BitVec
.
Equations
- BitVec.reduceHShiftRight = BitVec.reduceShift `HShiftRight.hShiftRight 6 fun {n : Nat} (x1 : BitVec n) (x2 : Nat) => x1 >>> x2
Instances For
Simplification procedure for converting a shift with a bit-vector literal into a natural number literal.
Equations
- BitVec.reduceHShiftRight' = BitVec.reduceShiftWithBitVecLit `HShiftRight.hShiftRight
Instances For
Simplification procedure for rotate left on BitVec
.
Equations
- BitVec.reduceRotateLeft = BitVec.reduceShift `BitVec.rotateLeft 3 fun {n : Nat} => BitVec.rotateLeft
Instances For
Simplification procedure for rotate right on BitVec
.
Equations
- BitVec.reduceRotateRight = BitVec.reduceShift `BitVec.rotateRight 3 fun {n : Nat} => BitVec.rotateRight
Instances For
Simplification procedure for append on BitVec
.
Instances For
Simplification procedure for casting BitVec
s along an equality of the size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for BitVec.toNat
.
Instances For
Simplification procedure for BitVec.toInt
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for BitVec.ofInt
.
Instances For
Simplification procedure for ensuring BitVec.ofNat
literals are normalized.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for =
on BitVec
s.
Instances For
Simplification procedure for ≠
on BitVec
s.
Equations
- BitVec.reduceNe = BitVec.reduceBinPred `Ne 3 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 ≠ x2)
Instances For
Simplification procedure for ==
on BitVec
s.
Instances For
Simplification procedure for !=
on BitVec
s.
Instances For
Simplification procedure for <
on BitVec
s.
Equations
- BitVec.reduceLT = BitVec.reduceBinPred `LT.lt 4 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 < x2)
Instances For
Simplification procedure for ≤
on BitVec
s.
Instances For
Simplification procedure for >
on BitVec
s.
Instances For
Simplification procedure for ≥
on BitVec
s.
Instances For
Simplification procedure for unsigned less than ult
on BitVec
s.
Equations
- BitVec.reduceULT = BitVec.reduceBoolPred `BitVec.ult 3 fun {n : Nat} => BitVec.ult
Instances For
Simplification procedure for unsigned less than or equal ule
on BitVec
s.
Instances For
Simplification procedure for signed less than slt
on BitVec
s.
Equations
- BitVec.reduceSLT = BitVec.reduceBoolPred `BitVec.slt 3 fun {n : Nat} => BitVec.slt
Instances For
Simplification procedure for signed less than or equal sle
on BitVec
s.
Equations
- BitVec.reduceSLE = BitVec.reduceBoolPred `BitVec.sle 3 fun {n : Nat} => BitVec.sle
Instances For
Simplification procedure for setWidth'
on BitVec
s.
Instances For
Simplification procedure for shiftLeftZeroExtend
on BitVec
s.
Instances For
Simplification procedure for extractLsb'
on BitVec
s.
Instances For
Simplification procedure for replicate
on BitVec
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for setWidth
on BitVec
s.
Instances For
Simplification procedure for zeroExtend
on BitVec
s.
Equations
- BitVec.reduceZeroExtend = BitVec.reduceExtend `BitVec.zeroExtend fun {n : Nat} => BitVec.zeroExtend
Instances For
Simplification procedure for signExtend
on BitVec
s.
Instances For
Simplification procedure for allOnes
Equations
- One or more equations did not get rendered due to their size.
Instances For
Helper function for reducing (x <<< i) <<< j
(and (x >>> i) >>> j
) where i
and j
are
natural number literals.
Instances For
Equations
- BitVec.reduceShiftLeftShiftLeft = BitVec.reduceShiftShift `HShiftLeft.hShiftLeft `BitVec.shiftLeft_add