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.
Equations
- One or more equations did not get rendered due to their size.
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.
Equations
- BitVec.reduceAbs = BitVec.reduceUnary `BitVec.abs 2 fun {n : Nat} => BitVec.abs
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.
Equations
- BitVec.reduceOr = BitVec.reduceBin `HOr.hOr 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 ||| x2
Instances For
Simplification procedure for bitwise xor of BitVec
s.
Equations
- BitVec.reduceXOr = BitVec.reduceBin `HXor.hXor 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 ^^^ x2
Instances For
Simplification procedure for addition of BitVec
s.
Equations
- BitVec.reduceAdd = BitVec.reduceBin `HAdd.hAdd 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 + x2
Instances For
Simplification procedure for multiplication of BitVec
s.
Equations
- BitVec.reduceMul = BitVec.reduceBin `HMul.hMul 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 * x2
Instances For
Simplification procedure for subtraction of BitVec
s.
Equations
- BitVec.reduceSub = BitVec.reduceBin `HSub.hSub 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 - x2
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.
Equations
- BitVec.reduceMod = BitVec.reduceBin `HMod.hMod 6 fun {n : Nat} (x1 x2 : BitVec n) => x1 % x2
Instances For
Simplification procedure for 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.
Equations
- BitVec.reduceSMTUDiv = BitVec.reduceBin `BitVec.smtUDiv 3 fun {n : Nat} => BitVec.smtUDiv
Instances For
Simplification procedure for the signed modulo operation on BitVec
s.
Equations
- BitVec.reduceSMod = BitVec.reduceBin `BitVec.smod 3 fun {n : Nat} => BitVec.smod
Instances For
Simplification procedure for signed remainder of BitVec
s.
Equations
- BitVec.reduceSRem = BitVec.reduceBin `BitVec.srem 3 fun {n : Nat} => BitVec.srem
Instances For
Simplification procedure for signed t-division of BitVec
s.
Equations
- BitVec.reduceSDiv = BitVec.reduceBin `BitVec.sdiv 3 fun {n : Nat} => BitVec.sdiv
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
.
Equations
- BitVec.reduceGetMsb = BitVec.reduceGetBit `BitVec.getMsbD fun {n : Nat} => BitVec.getMsbD
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
.
Equations
- BitVec.reduceUShiftRight = BitVec.reduceShift `BitVec.ushiftRight 3 fun {n : Nat} => BitVec.ushiftRight
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
.
Equations
- One or more equations did not get rendered due to their size.
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
.
Equations
- One or more equations did not get rendered due to their size.
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
.
Equations
- One or more equations did not get rendered due to their size.
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
Equations
- BitVec.reduceEq = BitVec.reduceBinPred `Eq 3 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 = x2)
Instances For
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.
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.
Equations
- BitVec.reduceLE = BitVec.reduceBinPred `LE.le 4 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 ≤ x2)
Instances For
Simplification procedure for >
on BitVec
s.
Equations
- BitVec.reduceGT = BitVec.reduceBinPred `GT.gt 4 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 > x2)
Instances For
Simplification procedure for ≥
on BitVec
s.
Equations
- BitVec.reduceGE = BitVec.reduceBinPred `GE.ge 4 fun {n : Nat} (x1 x2 : BitVec n) => decide (x1 ≥ x2)
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.
Equations
- BitVec.reduceULE = BitVec.reduceBoolPred `BitVec.ule 3 fun {n : Nat} => BitVec.ule
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 zeroExtend'
on BitVec
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for shiftLeftZeroExtend
on BitVec
s.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Simplification procedure for extractLsb'
on BitVec
s.
Equations
- One or more equations did not get rendered due to their size.
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 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.
Equations
- BitVec.reduceSignExtend = BitVec.reduceExtend `BitVec.signExtend fun {n : Nat} => BitVec.signExtend
Instances For
Simplification procedure for allOnes
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- BitVec.reduceShiftLeftShiftLeft = BitVec.reduceShiftShift `HShiftLeft.hShiftLeft `BitVec.shiftLeft_add
Instances For
Equations
- BitVec.reduceShiftRightShiftRight = BitVec.reduceShiftShift `HShiftRight.hShiftRight `BitVec.shiftRight_add