11.4.4.3.Β Comparisonsπ
The operators in this section are rarely invoked by name.
Typically, comparisons operations on fixed-width integers should use the decidability of the corresponding relations, which consist of the equality type Eq
and those implemented in instances of LE
, LT
.
{docstring UInt32.le}
{docstring UInt32.lt}
πdefUSize.decEq (a b : USize) : Decidable (a = b)
Decides equality on USize
.
This function is overridden with a native implementation.
πdefUInt8.decEq (a b : UInt8) : Decidable (a = b)
Decides equality on UInt8
.
This function is overridden with a native implementation.
πdefUInt16.decEq (a b : UInt16) : Decidable (a = b)
Decides equality on UInt16
.
This function is overridden with a native implementation.
πdefUInt32.decEq (a b : UInt32) : Decidable (a = b)
Decides equality on UInt32
.
This function is overridden with a native implementation.
πdefUInt64.decEq (a b : UInt64) : Decidable (a = b)
Decides equality on UInt64
.
This function is overridden with a native implementation.
πdefUInt32.decLe (a b : UInt32) : Decidable (a β€ b)
Decides less-than on UInt32
.
This function is overridden with a native implementation.
πdefUInt32.decLt (a b : UInt32) : Decidable (a < b)
Decides less-equal on UInt32
.
This function is overridden with a native implementation.
11.4.4.4.Β Arithmeticπ
Typically, arithmetic operations on fixed-width integers should be accessed using Lean's overloaded arithmetic notation, particularly their instances of Add
, Sub
, Mul
, Div
, and Mod
, as well as Neg
for signed types.
11.4.4.5.Β Bitwise Operations
Typically, bitwise operations on fixed-width integers should be accessed using Lean's overloaded operators, particularly their instances of ShiftLeft
, ShiftRight
, AndOp
, OrOp
, and Xor
.
11.4.4.6.Β Proof Automation
The functions in this section are primarily parts of the implementation of simplification rules employed by simp
.
They are probably only of interest to users who are implementing custom proof automation that involves fixed-precision integers.
πdefUInt8.reduceAdd : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceAdd : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceAdd : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceAdd : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceDiv : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceDiv : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceDiv : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceDiv : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceGE : Lean.Meta.Simp.Simproc
πdefUInt16.reduceGE : Lean.Meta.Simp.Simproc
πdefUInt32.reduceGE : Lean.Meta.Simp.Simproc
πdefUInt64.reduceGE : Lean.Meta.Simp.Simproc
πdefUInt8.reduceGT : Lean.Meta.Simp.Simproc
πdefUInt16.reduceGT : Lean.Meta.Simp.Simproc
πdefUInt32.reduceGT : Lean.Meta.Simp.Simproc
πdefUInt64.reduceGT : Lean.Meta.Simp.Simproc
πdefUInt8.reduceLE : Lean.Meta.Simp.Simproc
πdefUInt16.reduceLE : Lean.Meta.Simp.Simproc
πdefUInt32.reduceLE : Lean.Meta.Simp.Simproc
πdefUInt64.reduceLE : Lean.Meta.Simp.Simproc
πdefUInt8.reduceLT : Lean.Meta.Simp.Simproc
πdefUInt16.reduceLT : Lean.Meta.Simp.Simproc
πdefUInt32.reduceLT : Lean.Meta.Simp.Simproc
πdefUInt64.reduceLT : Lean.Meta.Simp.Simproc
πdefUInt8.reduceMod : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceMod : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceMod : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceMod : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceMul : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceMul : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceMul : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceMul : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceOfNat : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceOfNat : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceOfNat : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceOfNat : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceOfNatCore : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceOfNatCore : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceOfNatCore : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceOfNatCore : Lean.Meta.Simp.DSimproc
πdefUInt8.reduceSub : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceSub : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceSub : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceSub : Lean.Meta.Simp.DSimproc
πdefUSize.reduceToNat : Lean.Meta.Simp.Simproc
πdefUInt8.reduceToNat : Lean.Meta.Simp.DSimproc
πdefUInt16.reduceToNat : Lean.Meta.Simp.DSimproc
πdefUInt32.reduceToNat : Lean.Meta.Simp.DSimproc
πdefUInt64.reduceToNat : Lean.Meta.Simp.DSimproc