Converts the linear polynomial into the "simplified" expression
Equations
Instances For
Equations
- Int.Linear.Poly.toExpr.go none (Int.Linear.Poly.num k) = Int.Linear.Expr.num k
- Int.Linear.Poly.toExpr.go (some e) (Int.Linear.Poly.num 0) = e
- Int.Linear.Poly.toExpr.go (some e) (Int.Linear.Poly.num k) = e.add (Int.Linear.Expr.num k)
- Int.Linear.Poly.toExpr.go none (Int.Linear.Poly.add 1 x_2 p) = Int.Linear.Poly.toExpr.go (some (Int.Linear.Expr.var x_2)) p
- Int.Linear.Poly.toExpr.go none (Int.Linear.Poly.add k x_2 p) = Int.Linear.Poly.toExpr.go (some (Int.Linear.Expr.mulL k (Int.Linear.Expr.var x_2))) p
- Int.Linear.Poly.toExpr.go (some e) (Int.Linear.Poly.add 1 x_2 p) = Int.Linear.Poly.toExpr.go (some (e.add (Int.Linear.Expr.var x_2))) p
- Int.Linear.Poly.toExpr.go (some e) (Int.Linear.Poly.add k x_2 p) = Int.Linear.Poly.toExpr.go (some (e.add (Int.Linear.Expr.mulL k (Int.Linear.Expr.var x_2)))) p
Instances For
Applies the given variable permutation to e
Equations
- Int.Linear.Expr.applyPerm perm e = Int.Linear.Expr.applyPerm.go perm e
Instances For
Equations
- Int.Linear.Expr.applyPerm.go perm (Int.Linear.Expr.num v) = Int.Linear.Expr.num v
- Int.Linear.Expr.applyPerm.go perm (Int.Linear.Expr.var i) = Int.Linear.Expr.var (perm[i]?.getD i)
- Int.Linear.Expr.applyPerm.go perm a.neg = (Int.Linear.Expr.applyPerm.go perm a).neg
- Int.Linear.Expr.applyPerm.go perm (a.add b) = (Int.Linear.Expr.applyPerm.go perm a).add (Int.Linear.Expr.applyPerm.go perm b)
- Int.Linear.Expr.applyPerm.go perm (a.sub b) = (Int.Linear.Expr.applyPerm.go perm a).sub (Int.Linear.Expr.applyPerm.go perm b)
- Int.Linear.Expr.applyPerm.go perm (Int.Linear.Expr.mulL k a) = Int.Linear.Expr.mulL k (Int.Linear.Expr.applyPerm.go perm a)
- Int.Linear.Expr.applyPerm.go perm (a.mulR k) = (Int.Linear.Expr.applyPerm.go perm a).mulR k
Instances For
Equations
- Int.Linear.instReprPoly_lean = { reprPrec := Int.Linear.reprPoly✝ }
Equations
- Int.Linear.instReprExpr_lean = { reprPrec := Int.Linear.reprExpr✝ }
Equations
- Lean.Meta.Simp.Arith.Int.ofPoly (Int.Linear.Poly.num a) = Lean.mkApp (Lean.mkConst `Int.Linear.Poly.num) (Lean.toExpr a)
- Lean.Meta.Simp.Arith.Int.ofPoly (Int.Linear.Poly.add a a_1 a_2) = Lean.mkApp3 (Lean.mkConst `Int.Linear.Poly.add) (Lean.toExpr a) (Lean.toExpr a_1) (Lean.Meta.Simp.Arith.Int.ofPoly a_2)
Instances For
Equations
- Lean.Meta.Simp.Arith.Int.instToExprPoly = { toExpr := fun (a : Int.Linear.Poly) => Lean.Meta.Simp.Arith.Int.ofPoly a, toTypeExpr := Lean.mkConst `Int.Linear.Poly }
Equations
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (Int.Linear.Expr.num v) = Lean.mkApp (Lean.mkConst `Int.Linear.Expr.num) (Lean.toExpr v)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (Int.Linear.Expr.var i) = Lean.mkApp (Lean.mkConst `Int.Linear.Expr.var) (Lean.mkNatLit i)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr a.neg = Lean.mkApp (Lean.mkConst `Int.Linear.Expr.neg) (Lean.Meta.Simp.Arith.Int.ofLinearExpr a)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (a.add b) = Lean.mkApp2 (Lean.mkConst `Int.Linear.Expr.add) (Lean.Meta.Simp.Arith.Int.ofLinearExpr a) (Lean.Meta.Simp.Arith.Int.ofLinearExpr b)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (a.sub b) = Lean.mkApp2 (Lean.mkConst `Int.Linear.Expr.sub) (Lean.Meta.Simp.Arith.Int.ofLinearExpr a) (Lean.Meta.Simp.Arith.Int.ofLinearExpr b)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (Int.Linear.Expr.mulL k a) = Lean.mkApp2 (Lean.mkConst `Int.Linear.Expr.mulL) (Lean.toExpr k) (Lean.Meta.Simp.Arith.Int.ofLinearExpr a)
- Lean.Meta.Simp.Arith.Int.ofLinearExpr (a.mulR k) = Lean.mkApp2 (Lean.mkConst `Int.Linear.Expr.mulR) (Lean.Meta.Simp.Arith.Int.ofLinearExpr a) (Lean.toExpr k)
Instances For
Equations
- Lean.Meta.Simp.Arith.Int.instToExprExpr = { toExpr := fun (a : Int.Linear.Expr) => Lean.Meta.Simp.Arith.Int.ofLinearExpr a, toTypeExpr := Lean.mkConst `Int.Linear.Expr }
Equations
- Int.Linear.Expr.denoteExpr ctx (Int.Linear.Expr.num v) = pure (Lean.toExpr v)
- Int.Linear.Expr.denoteExpr ctx (Int.Linear.Expr.var i) = pure (ctx i)
- Int.Linear.Expr.denoteExpr ctx a.neg = do let __do_lift ← Int.Linear.Expr.denoteExpr ctx a pure (Lean.mkIntNeg __do_lift)
- Int.Linear.Expr.denoteExpr ctx (a.add b) = do let __do_lift ← Int.Linear.Expr.denoteExpr ctx a let __do_lift_1 ← Int.Linear.Expr.denoteExpr ctx b pure (Lean.mkIntAdd __do_lift __do_lift_1)
- Int.Linear.Expr.denoteExpr ctx (a.sub b) = do let __do_lift ← Int.Linear.Expr.denoteExpr ctx a let __do_lift_1 ← Int.Linear.Expr.denoteExpr ctx b pure (Lean.mkIntSub __do_lift __do_lift_1)
- Int.Linear.Expr.denoteExpr ctx (Int.Linear.Expr.mulL k a) = do let __do_lift ← Int.Linear.Expr.denoteExpr ctx a pure (Lean.mkIntMul (Lean.toExpr k) __do_lift)
- Int.Linear.Expr.denoteExpr ctx (a.mulR k) = do let __do_lift ← Int.Linear.Expr.denoteExpr ctx a pure (Lean.mkIntMul __do_lift (Lean.toExpr k))
Instances For
Equations
- Int.Linear.Poly.denoteExpr ctx (Int.Linear.Poly.num k) = pure (Lean.toExpr k)
- Int.Linear.Poly.denoteExpr ctx (Int.Linear.Poly.add 1 x p_2) = Int.Linear.Poly.denoteExpr.go ctx (ctx x) p_2
- Int.Linear.Poly.denoteExpr ctx (Int.Linear.Poly.add k x p_2) = Int.Linear.Poly.denoteExpr.go ctx (Lean.mkIntMul (Lean.toExpr k) (ctx x)) p_2
Instances For
Equations
- Int.Linear.Poly.denoteExpr.go ctx r (Int.Linear.Poly.num 0) = pure r
- Int.Linear.Poly.denoteExpr.go ctx r (Int.Linear.Poly.num k) = pure (Lean.mkIntAdd r (Lean.toExpr k))
- Int.Linear.Poly.denoteExpr.go ctx r (Int.Linear.Poly.add 1 x p_2) = Int.Linear.Poly.denoteExpr.go ctx (Lean.mkIntAdd r (ctx x)) p_2
- Int.Linear.Poly.denoteExpr.go ctx r (Int.Linear.Poly.add k x p_2) = Int.Linear.Poly.denoteExpr.go ctx (Lean.mkIntAdd r (Lean.mkIntMul (Lean.toExpr k) (ctx x))) p_2
Instances For
@[reducible, inline]
Equations
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
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
Equations
- One or more equations did not get rendered due to their size.