12.4.4.3. 比較(Comparisons)🔗
本節の演算子が名前で呼び出されることはほとんどありません。通常、固定長整数に対する比較演算は、対応する関係についての決定性を使用する必要があり、等号型 Eq と LE ・ LT のインスタンスで実装されているものから構成されます。
🔗defUSize.le (a b : USize) : Prop
🔗defISize.le (a b : ISize) : Prop
🔗defUInt8.le (a b : UInt8) : Prop
🔗defInt8.le (a b : Int8) : Prop
🔗defUInt16.le (a b : UInt16) : Prop
🔗defInt16.le (a b : Int16) : Prop
{docstring UInt32.le}
🔗defInt32.le (a b : Int32) : Prop
🔗defUInt64.le (a b : UInt64) : Prop
🔗defInt64.le (a b : Int64) : Prop
🔗defUSize.lt (a b : USize) : Prop
🔗defISize.lt (a b : ISize) : Prop
🔗defUInt8.lt (a b : UInt8) : Prop
🔗defInt8.lt (a b : Int8) : Prop
🔗defUInt16.lt (a b : UInt16) : Prop
🔗defInt16.lt (a b : Int16) : Prop
{docstring UInt32.lt}
🔗defInt32.lt (a b : Int32) : Prop
🔗defUInt64.lt (a b : UInt64) : Prop
🔗defInt64.lt (a b : Int64) : Prop
🔗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)🔗
通常、固定長整数に対する算術操作は Lean のオーバーロードされた算術記法を用いてアクセスするべきであり、特に Add ・ Sub ・ Mul ・ Div ・ and Mod ・符号付き型の Neg のインスタンスを使用します。
12.4.4.5. Bitwise Operations
通常、固定長整数に対するビット演算は、Lean のオーバーロードされた演算子によってアクセスされるべきであり、特に ShiftLeft ・ ShiftRight ・ AndOp ・ OrOp ・ Xor のインスタンスを使用します。
12.4.4.6. 証明の自動化(Proof Automation)
本節の関数は主に simp で採用される単純化規則の実装の一部です。これらはおそらく、固定長整数を含むカスタムの証明自動化を実装しているユーザにとっては興味深いものになるでしょう。
🔗defUSize.fromExpr (e : Lean.Expr)
: Lean.Meta.SimpM (Option USize)
🔗defUInt8.fromExpr
: Lean.Expr → Lean.Meta.SimpM (Option UInt8)
🔗defUInt16.fromExpr
: Lean.Expr →
Lean.Meta.SimpM (Option UInt16)
🔗defUInt32.fromExpr
: Lean.Expr →
Lean.Meta.SimpM (Option UInt32)
🔗defUInt64.fromExpr
: Lean.Expr →
Lean.Meta.SimpM (Option UInt64)
🔗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