Equations
- Int.OfNat.toExpr (Int.OfNat.Expr.num v) = Lean.mkApp (Lean.mkConst `Int.OfNat.Expr.num) (Lean.mkNatLit v)
- Int.OfNat.toExpr (Int.OfNat.Expr.var i) = Lean.mkApp (Lean.mkConst `Int.OfNat.Expr.var) (Lean.mkNatLit i)
- Int.OfNat.toExpr (a.add b) = Lean.mkApp2 (Lean.mkConst `Int.OfNat.Expr.add) (Int.OfNat.toExpr a) (Int.OfNat.toExpr b)
- Int.OfNat.toExpr (a.mul b) = Lean.mkApp2 (Lean.mkConst `Int.OfNat.Expr.mul) (Int.OfNat.toExpr a) (Int.OfNat.toExpr b)
- Int.OfNat.toExpr (a.div b) = Lean.mkApp2 (Lean.mkConst `Int.OfNat.Expr.div) (Int.OfNat.toExpr a) (Int.OfNat.toExpr b)
- Int.OfNat.toExpr (a.mod b) = Lean.mkApp2 (Lean.mkConst `Int.OfNat.Expr.mod) (Int.OfNat.toExpr a) (Int.OfNat.toExpr b)
Instances For
Equations
- Int.OfNat.instToExprExpr = { toExpr := fun (a : Int.OfNat.Expr) => Int.OfNat.toExpr a, toTypeExpr := Lean.mkConst `Int.OfNat.Expr }
Equations
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (Int.OfNat.Expr.num v) = Lean.mkIntLit ↑v
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (Int.OfNat.Expr.var i) = Lean.mkIntNatCast ctx[i]!
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (a.add b) = Lean.mkIntAdd (Int.OfNat.Expr.denoteAsIntExpr.go ctx a) (Int.OfNat.Expr.denoteAsIntExpr.go ctx b)
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (a.mul b) = Lean.mkIntMul (Int.OfNat.Expr.denoteAsIntExpr.go ctx a) (Int.OfNat.Expr.denoteAsIntExpr.go ctx b)
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (a.div b) = Lean.mkIntDiv (Int.OfNat.Expr.denoteAsIntExpr.go ctx a) (Int.OfNat.Expr.denoteAsIntExpr.go ctx b)
- Int.OfNat.Expr.denoteAsIntExpr.go ctx (a.mod b) = Lean.mkIntMod (Int.OfNat.Expr.denoteAsIntExpr.go ctx a) (Int.OfNat.Expr.denoteAsIntExpr.go ctx b)
Instances For
Given e of the form lhs ≤ rhs where lhs and rhs have type Nat,
returns (lhs, rhs) where lhs and rhs are Int.OfNat.Expr.
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
- Int.OfNat.toIntEq lhs rhs = do let lhs ← Int.OfNat.toOfNatExpr lhs let rhs ← Int.OfNat.toOfNatExpr rhs pure (lhs, rhs)
Instances For
Given e of type Int, tries to compute a : Int.OfNat.Expr s.t.
a.denoteAsInt ctx is e
If e is of the form a.denoteAsInt ctx for some a and ctx,
assert that e is nonnegative.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given x whose denotation is e, if e is of the form NatCast.natCast a,
asserts that it is nonnegative.
Equations
- One or more equations did not get rendered due to their size.