12.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.
12.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.
12.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
.
12.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