Support for the linear arithmetic module for IntModule in grind
Equations
Instances For
Equations
Equations
Equations
- Lean.Grind.Linarith.instBEqExpr.beq Lean.Grind.Linarith.Expr.zero Lean.Grind.Linarith.Expr.zero = true
- Lean.Grind.Linarith.instBEqExpr.beq (Lean.Grind.Linarith.Expr.var a) (Lean.Grind.Linarith.Expr.var b) = (a == b)
- Lean.Grind.Linarith.instBEqExpr.beq (a.add a_1) (b.add b_1) = (Lean.Grind.Linarith.instBEqExpr.beq a b && Lean.Grind.Linarith.instBEqExpr.beq a_1 b_1)
- Lean.Grind.Linarith.instBEqExpr.beq (a.sub a_1) (b.sub b_1) = (Lean.Grind.Linarith.instBEqExpr.beq a b && Lean.Grind.Linarith.instBEqExpr.beq a_1 b_1)
- Lean.Grind.Linarith.instBEqExpr.beq a.neg b.neg = Lean.Grind.Linarith.instBEqExpr.beq a b
- Lean.Grind.Linarith.instBEqExpr.beq (Lean.Grind.Linarith.Expr.natMul a a_1) (Lean.Grind.Linarith.Expr.natMul b b_1) = (a == b && Lean.Grind.Linarith.instBEqExpr.beq a_1 b_1)
- Lean.Grind.Linarith.instBEqExpr.beq (Lean.Grind.Linarith.Expr.intMul a a_1) (Lean.Grind.Linarith.Expr.intMul b b_1) = (a == b && Lean.Grind.Linarith.instBEqExpr.beq a_1 b_1)
- Lean.Grind.Linarith.instBEqExpr.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
- Lean.Grind.Linarith.Var.denote ctx v = Lean.RArray.get ctx v
Instances For
Equations
- Lean.Grind.Linarith.Expr.denote ctx Lean.Grind.Linarith.Expr.zero = 0
- Lean.Grind.Linarith.Expr.denote ctx (Lean.Grind.Linarith.Expr.var v) = Lean.Grind.Linarith.Var.denote ctx v
- Lean.Grind.Linarith.Expr.denote ctx (a.add b) = Lean.Grind.Linarith.Expr.denote ctx a + Lean.Grind.Linarith.Expr.denote ctx b
- Lean.Grind.Linarith.Expr.denote ctx (a.sub b) = Lean.Grind.Linarith.Expr.denote ctx a - Lean.Grind.Linarith.Expr.denote ctx b
- Lean.Grind.Linarith.Expr.denote ctx (Lean.Grind.Linarith.Expr.natMul k a) = k • Lean.Grind.Linarith.Expr.denote ctx a
- Lean.Grind.Linarith.Expr.denote ctx (Lean.Grind.Linarith.Expr.intMul k a) = k • Lean.Grind.Linarith.Expr.denote ctx a
- Lean.Grind.Linarith.Expr.denote ctx a.neg = -Lean.Grind.Linarith.Expr.denote ctx a
Instances For
Expr.denote for kernel reduction. The theorems that take hypotheses about user terms state them
with Expr.denote_k, so that the kernel unfolds Expr.rec instead of Expr.denote's brecOn.
It is an abbrev so that the kernel's lazy delta reduction unfolds it before the user's terms.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Grind.Linarith.instBEqPoly.beq Lean.Grind.Linarith.Poly.nil Lean.Grind.Linarith.Poly.nil = true
- Lean.Grind.Linarith.instBEqPoly.beq (Lean.Grind.Linarith.Poly.add a a_1 a_2) (Lean.Grind.Linarith.Poly.add b b_1 b_2) = (a == b && (a_1 == b_1 && Lean.Grind.Linarith.instBEqPoly.beq a_2 b_2))
- Lean.Grind.Linarith.instBEqPoly.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
- Lean.Grind.Linarith.Poly.denote'.go ctx r Lean.Grind.Linarith.Poly.nil = r
- Lean.Grind.Linarith.Poly.denote'.go ctx r (Lean.Grind.Linarith.Poly.add 1 v p_2) = Lean.Grind.Linarith.Poly.denote'.go ctx (r + Lean.Grind.Linarith.Var.denote ctx v) p_2
- Lean.Grind.Linarith.Poly.denote'.go ctx r (Lean.Grind.Linarith.Poly.add k v p_2) = Lean.Grind.Linarith.Poly.denote'.go ctx (r + k • Lean.Grind.Linarith.Var.denote ctx v) p_2
Instances For
Similar to Poly.denote, but produces a denotation better for normalization.
Equations
- Lean.Grind.Linarith.Poly.denote' ctx Lean.Grind.Linarith.Poly.nil = 0
- Lean.Grind.Linarith.Poly.denote' ctx (Lean.Grind.Linarith.Poly.add 1 v p_2) = Lean.Grind.Linarith.Poly.denote'.go ctx (Lean.Grind.Linarith.Var.denote ctx v) p_2
- Lean.Grind.Linarith.Poly.denote' ctx (Lean.Grind.Linarith.Poly.add k v p_2) = Lean.Grind.Linarith.Poly.denote'.go ctx (k • Lean.Grind.Linarith.Var.denote ctx v) p_2
Instances For
Equations
- (Lean.Grind.Linarith.Poly.add a y p_2).coeff x = bif x == y then a else p_2.coeff x
- Lean.Grind.Linarith.Poly.nil.coeff x = 0
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.Linarith.Poly.insert k v Lean.Grind.Linarith.Poly.nil = Lean.Grind.Linarith.Poly.add k v Lean.Grind.Linarith.Poly.nil
Instances For
Normalizes the given polynomial by fusing monomial and constants.
Equations
Instances For
Equations
- Lean.Grind.Linarith.Poly.nil.append p₂ = p₂
- (Lean.Grind.Linarith.Poly.add k v p_1).append p₂ = Lean.Grind.Linarith.Poly.add k v (p_1.append p₂)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.Linarith.Poly.nil.combine p₂ = p₂
- p₁.combine Lean.Grind.Linarith.Poly.nil = p₁
Instances For
Converts the given expression into a polynomial.
Equations
Instances For
Equations
- Lean.Grind.Linarith.Expr.toPoly'.go coeff Lean.Grind.Linarith.Expr.zero = id
- Lean.Grind.Linarith.Expr.toPoly'.go coeff (Lean.Grind.Linarith.Expr.var v) = fun (x : Lean.Grind.Linarith.Poly) => Lean.Grind.Linarith.Poly.add coeff v x
- Lean.Grind.Linarith.Expr.toPoly'.go coeff (a.add b) = Lean.Grind.Linarith.Expr.toPoly'.go coeff a ∘ Lean.Grind.Linarith.Expr.toPoly'.go coeff b
- Lean.Grind.Linarith.Expr.toPoly'.go coeff (a.sub b) = Lean.Grind.Linarith.Expr.toPoly'.go coeff a ∘ Lean.Grind.Linarith.Expr.toPoly'.go (-coeff) b
- Lean.Grind.Linarith.Expr.toPoly'.go coeff (Lean.Grind.Linarith.Expr.natMul k a) = bif k == 0 then id else Lean.Grind.Linarith.Expr.toPoly'.go (coeff.mul ↑k) a
- Lean.Grind.Linarith.Expr.toPoly'.go coeff (Lean.Grind.Linarith.Expr.intMul k a) = bif k == 0 then id else Lean.Grind.Linarith.Expr.toPoly'.go (coeff.mul k) a
- Lean.Grind.Linarith.Expr.toPoly'.go coeff a.neg = Lean.Grind.Linarith.Expr.toPoly'.go (-coeff) a
Instances For
p.mul k multiplies all coefficients and constant of the polynomial p by k.
Equations
- Lean.Grind.Linarith.Poly.nil.mul' k = Lean.Grind.Linarith.Poly.nil
- (Lean.Grind.Linarith.Poly.add k_1 v p_2).mul' k = Lean.Grind.Linarith.Poly.add (k * k_1) v (p_2.mul' k)
Instances For
Kernel-reduction variants of the polynomial functions used by the certificates, written with
recursors, Bool.rec, and the operations of Init.Data.Int.Kernel.
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
- p.coeff_k x = Lean.Grind.Linarith.Poly.rec 0 (fun (a : Int) (y : Lean.Grind.Linarith.Var) (x_1 : Lean.Grind.Linarith.Poly) (ih : Int) => Bool.rec ih a (Nat.beq x y)) p
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
- (Lean.Grind.Linarith.Poly.add a v p_2).leadCoeff = a
- p.leadCoeff = 1
Instances For
Helper theorems for conflict resolution during model construction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.Linarith.diseq_split_cert p₁ p₂ = p₂.beq' (p₁.mul_k (-1))
Instances For
Helper theorems for internalizing facts into the linear arithmetic procedure
Equations
- Lean.Grind.Linarith.norm_cert lhs rhs p = p.beq' (lhs.sub rhs).norm_k
Instances For
Helper theorems for closing the goal
Equations
Instances For
Coefficient normalization
Equations
- Lean.Grind.Linarith.eq_neg_cert p₁ p₂ = p₂.beq' (p₁.mul_k (-1))
Instances For
Substitution
Equations
- Lean.Grind.Linarith.eq_diseq_subst1_cert k p₁ p₂ p₃ = p₃.beq' ((p₁.mul_k k).combine_k p₂)