@[reducible, inline]
Equations
Instances For
Equations
Equations
Equations
@[reducible, inline]
Equations
Instances For
Equations
- Lean.Grind.CommRing.Var.denote ctx v = Lean.RArray.get ctx v
Instances For
Equations
- Lean.Grind.CommRing.denoteInt k = bif decide (k < 0) then -OfNat.ofNat k.natAbs else OfNat.ofNat k.natAbs
Instances For
Equations
- Lean.Grind.CommRing.Expr.denote ctx (a.add b) = Lean.Grind.CommRing.Expr.denote ctx a + Lean.Grind.CommRing.Expr.denote ctx b
- Lean.Grind.CommRing.Expr.denote ctx (a.sub b) = Lean.Grind.CommRing.Expr.denote ctx a - Lean.Grind.CommRing.Expr.denote ctx b
- Lean.Grind.CommRing.Expr.denote ctx (a.mul b) = Lean.Grind.CommRing.Expr.denote ctx a * Lean.Grind.CommRing.Expr.denote ctx b
- Lean.Grind.CommRing.Expr.denote ctx a.neg = -Lean.Grind.CommRing.Expr.denote ctx a
- Lean.Grind.CommRing.Expr.denote ctx (Lean.Grind.CommRing.Expr.num k) = Lean.Grind.CommRing.denoteInt k
- Lean.Grind.CommRing.Expr.denote ctx (Lean.Grind.CommRing.Expr.var v) = Lean.Grind.CommRing.Var.denote ctx v
- Lean.Grind.CommRing.Expr.denote ctx (a.pow k) = Lean.Grind.CommRing.Expr.denote ctx a ^ k
Instances For
Equations
Equations
Equations
Equations
- Lean.Grind.CommRing.Power.denote ctx { x := a, k := 0 } = 1
- Lean.Grind.CommRing.Power.denote ctx { x := a, k := 1 } = Lean.Grind.CommRing.Var.denote ctx a
- Lean.Grind.CommRing.Power.denote ctx { x := a, k := a_1 } = Lean.Grind.CommRing.Var.denote ctx a ^ a_1
Instances For
Equations
Equations
- Lean.Grind.CommRing.instReprMon = { reprPrec := Lean.Grind.CommRing.reprMon✝ }
Equations
Equations
Equations
Instances For
Equations
- Lean.Grind.CommRing.Mon.ofVar x = Lean.Grind.CommRing.Mon.mult { x := x, k := 1 } Lean.Grind.CommRing.Mon.unit
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.concat m₂ = m₂
- (Lean.Grind.CommRing.Mon.mult a a_1).concat m₂ = Lean.Grind.CommRing.Mon.mult a (a_1.concat m₂)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.mulPow pw Lean.Grind.CommRing.Mon.unit = Lean.Grind.CommRing.Mon.mult pw Lean.Grind.CommRing.Mon.unit
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.length = 0
- (Lean.Grind.CommRing.Mon.mult a a_1).length = 1 + a_1.length
Instances For
Equations
- Lean.Grind.CommRing.hugeFuel = 1000000
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.mul.go 0 m₁ m₂ = m₁.concat m₂
- Lean.Grind.CommRing.Mon.mul.go fuel_2.succ m₁ Lean.Grind.CommRing.Mon.unit = m₁
- Lean.Grind.CommRing.Mon.mul.go fuel_2.succ Lean.Grind.CommRing.Mon.unit m₂ = m₂
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.degree = 0
- (Lean.Grind.CommRing.Mon.mult a a_1).degree = a.k + a_1.degree
Instances For
Equations
- x.revlex y = bif Nat.blt x y then Ordering.gt else bif Nat.blt y x then Ordering.lt else Ordering.eq
Instances For
Equations
- Lean.Grind.CommRing.powerRevlex k₁ k₂ = bif k₁.blt k₂ then Ordering.gt else bif k₂.blt k₁ then Ordering.lt else Ordering.eq
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.unit.revlexWF Lean.Grind.CommRing.Mon.unit = Ordering.eq
- Lean.Grind.CommRing.Mon.unit.revlexWF (Lean.Grind.CommRing.Mon.mult p m) = Ordering.gt
- (Lean.Grind.CommRing.Mon.mult p m).revlexWF Lean.Grind.CommRing.Mon.unit = Ordering.lt
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.revlexFuel 0 m₁ m₂ = m₁.revlexWF m₂
- Lean.Grind.CommRing.Mon.revlexFuel fuel_2.succ Lean.Grind.CommRing.Mon.unit Lean.Grind.CommRing.Mon.unit = Ordering.eq
- Lean.Grind.CommRing.Mon.revlexFuel fuel_2.succ Lean.Grind.CommRing.Mon.unit (Lean.Grind.CommRing.Mon.mult p m) = Ordering.gt
- Lean.Grind.CommRing.Mon.revlexFuel fuel_2.succ (Lean.Grind.CommRing.Mon.mult p m) Lean.Grind.CommRing.Mon.unit = Ordering.lt
Instances For
Equations
Instances For
Equations
Equations
Equations
Equations
- Lean.Grind.CommRing.Poly.denote ctx (Lean.Grind.CommRing.Poly.num a) = ↑a
- Lean.Grind.CommRing.Poly.denote ctx (Lean.Grind.CommRing.Poly.add a a_1 a_2) = ↑a * Lean.Grind.CommRing.Mon.denote ctx a_1 + Lean.Grind.CommRing.Poly.denote ctx a_2
Instances For
Equations
Instances For
Equations
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num k).isSorted = true
- (Lean.Grind.CommRing.Poly.add k v (Lean.Grind.CommRing.Poly.num k_1)).isSorted = true
- (Lean.Grind.CommRing.Poly.add k m₁ (Lean.Grind.CommRing.Poly.add k_1 m₂ p)).isSorted = (m₁.grevlex m₂ == Ordering.gt && (Lean.Grind.CommRing.Poly.add k_1 m₂ p).isSorted)
Instances For
Equations
- p.addConst k = bif k == 0 then p else Lean.Grind.CommRing.Poly.addConst.go k p
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Poly.insert k m p = bif k == 0 then p else bif m == Lean.Grind.CommRing.Mon.unit then p.addConst k else Lean.Grind.CommRing.Poly.insert.go k m p
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.insert.go k m (Lean.Grind.CommRing.Poly.num a) = Lean.Grind.CommRing.Poly.add k m (Lean.Grind.CommRing.Poly.num a)
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num a).concat p₂ = p₂.addConst a
- (Lean.Grind.CommRing.Poly.add a a_1 a_2).concat p₂ = Lean.Grind.CommRing.Poly.add a a_1 (a_2.concat p₂)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mulConst k p = bif k == 0 then Lean.Grind.CommRing.Poly.num 0 else bif k == 1 then p else Lean.Grind.CommRing.Poly.mulConst.go k p
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.mulMon.go k m (Lean.Grind.CommRing.Poly.add a a_1 a_2) = Lean.Grind.CommRing.Poly.add (k * a) (m.mul a_1) (Lean.Grind.CommRing.Poly.mulMon.go k m a_2)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.combine.go 0 p₁ p₂ = p₁.concat p₂
- Lean.Grind.CommRing.Poly.combine.go fuel_2.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.num k₂) = Lean.Grind.CommRing.Poly.num (k₁ + k₂)
- Lean.Grind.CommRing.Poly.combine.go fuel_2.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2) = (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2).addConst k₁
- Lean.Grind.CommRing.Poly.combine.go fuel_2.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁_2) (Lean.Grind.CommRing.Poly.num k₂) = (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁_2).addConst k₂
Instances For
Equations
- p₁.mul p₂ = Lean.Grind.CommRing.Poly.mul.go p₂ p₁ (Lean.Grind.CommRing.Poly.num 0)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mul.go p₂ (Lean.Grind.CommRing.Poly.num a) acc = acc.combine (Lean.Grind.CommRing.Poly.mulConst a p₂)
- Lean.Grind.CommRing.Poly.mul.go p₂ (Lean.Grind.CommRing.Poly.add a a_1 a_2) acc = Lean.Grind.CommRing.Poly.mul.go p₂ a_2 (acc.combine (Lean.Grind.CommRing.Poly.mulMon a a_1 p₂))
Instances For
Equations
- (Lean.Grind.CommRing.Expr.num n).toPoly = Lean.Grind.CommRing.Poly.num n
- (Lean.Grind.CommRing.Expr.var x_1).toPoly = Lean.Grind.CommRing.Poly.ofVar x_1
- (a.add b).toPoly = a.toPoly.combine b.toPoly
- (a.mul b).toPoly = a.toPoly.mul b.toPoly
- a.neg.toPoly = Lean.Grind.CommRing.Poly.mulConst (-1) a.toPoly
- (a.sub b).toPoly = a.toPoly.combine (Lean.Grind.CommRing.Poly.mulConst (-1) b.toPoly)
- ((Lean.Grind.CommRing.Expr.num n).pow k).toPoly = Lean.Grind.CommRing.Poly.num (n ^ k)
- ((Lean.Grind.CommRing.Expr.var x_1).pow k).toPoly = Lean.Grind.CommRing.Poly.ofMon (Lean.Grind.CommRing.Mon.mult { x := x_1, k := k } Lean.Grind.CommRing.Mon.unit)
- (a.pow k).toPoly = a.toPoly.pow k
Instances For
Definitions for the IsCharP
case
We considered using a single set of definitions parameterized by Option c
or simply set c = 0
since
n % 0 = n
in Lean, but decided against it to avoid unnecessary kernel‑reduction overhead.
Once we can specialize definitions before they reach the kernel,
we can merge the two versions. Until then, the IsCharP
definitions will carry the C
suffix.
We use them whenever we can infer the characteristic using type class instance synthesis.
Equations
- (Lean.Grind.CommRing.Poly.num a).addConstC k c = Lean.Grind.CommRing.Poly.num ((a + k) % ↑c)
- (Lean.Grind.CommRing.Poly.add a a_1 a_2).addConstC k c = Lean.Grind.CommRing.Poly.add a a_1 (a_2.addConstC k c)
Instances For
Equations
- Lean.Grind.CommRing.Poly.insertC k m p c = bif k % ↑c == 0 then p else Lean.Grind.CommRing.Poly.insertC.go m c (k % ↑c) p
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.insertC.go m c k (Lean.Grind.CommRing.Poly.num a) = Lean.Grind.CommRing.Poly.add k m (Lean.Grind.CommRing.Poly.num a)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mulConstC k p c = bif k % ↑c == 0 then Lean.Grind.CommRing.Poly.num 0 else bif k % ↑c == 1 then p else Lean.Grind.CommRing.Poly.mulConstC.go k c p
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.mulConstC.go k c (Lean.Grind.CommRing.Poly.num a) = Lean.Grind.CommRing.Poly.num (k * a % ↑c)
Instances For
Equations
- p₁.combineC p₂ c = Lean.Grind.CommRing.Poly.combineC.go c Lean.Grind.CommRing.hugeFuel p₁ p₂
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.combineC.go c 0 p₁ p₂ = p₁.concat p₂
- Lean.Grind.CommRing.Poly.combineC.go c fuel_2.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.num k₂) = Lean.Grind.CommRing.Poly.num ((k₁ + k₂) % ↑c)
- Lean.Grind.CommRing.Poly.combineC.go c fuel_2.succ (Lean.Grind.CommRing.Poly.num k₁) (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2) = (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2).addConstC k₁ c
- Lean.Grind.CommRing.Poly.combineC.go c fuel_2.succ (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁_2) (Lean.Grind.CommRing.Poly.num k₂) = (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁_2).addConstC k₂ c
Instances For
Equations
- p₁.mulC p₂ c = Lean.Grind.CommRing.Poly.mulC.go p₂ c p₁ (Lean.Grind.CommRing.Poly.num 0)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mulC.go p₂ c (Lean.Grind.CommRing.Poly.num a) acc = acc.combineC (Lean.Grind.CommRing.Poly.mulConstC a p₂ c) c
- Lean.Grind.CommRing.Poly.mulC.go p₂ c (Lean.Grind.CommRing.Poly.add a a_1 a_2) acc = Lean.Grind.CommRing.Poly.mulC.go p₂ c a_2 (acc.combineC (Lean.Grind.CommRing.Poly.mulMonC a a_1 p₂ c) c)
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Expr.toPolyC.go c (Lean.Grind.CommRing.Expr.num n) = Lean.Grind.CommRing.Poly.num (n % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC.go c (Lean.Grind.CommRing.Expr.var x_1) = Lean.Grind.CommRing.Poly.ofVar x_1
- Lean.Grind.CommRing.Expr.toPolyC.go c (a.add b) = (Lean.Grind.CommRing.Expr.toPolyC.go c a).combineC (Lean.Grind.CommRing.Expr.toPolyC.go c b) c
- Lean.Grind.CommRing.Expr.toPolyC.go c (a.mul b) = (Lean.Grind.CommRing.Expr.toPolyC.go c a).mulC (Lean.Grind.CommRing.Expr.toPolyC.go c b) c
- Lean.Grind.CommRing.Expr.toPolyC.go c a.neg = Lean.Grind.CommRing.Poly.mulConstC (-1) (Lean.Grind.CommRing.Expr.toPolyC.go c a) c
- Lean.Grind.CommRing.Expr.toPolyC.go c (a.sub b) = (Lean.Grind.CommRing.Expr.toPolyC.go c a).combineC (Lean.Grind.CommRing.Poly.mulConstC (-1) (Lean.Grind.CommRing.Expr.toPolyC.go c b) c) c
- Lean.Grind.CommRing.Expr.toPolyC.go c ((Lean.Grind.CommRing.Expr.num n).pow k) = Lean.Grind.CommRing.Poly.num (n ^ k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC.go c ((Lean.Grind.CommRing.Expr.var x_1).pow k) = Lean.Grind.CommRing.Poly.ofMon (Lean.Grind.CommRing.Mon.mult { x := x_1, k := k } Lean.Grind.CommRing.Mon.unit)
- Lean.Grind.CommRing.Expr.toPolyC.go c (a.pow k) = (Lean.Grind.CommRing.Expr.toPolyC.go c a).powC k c
Instances For
q₁*(lhs₁ - rhs₁) + ... + qₙ*(lhsₙ - rhsₙ)
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.NullCert.denote ctx Lean.Grind.CommRing.NullCert.empty = 0
Instances For
def
Lean.Grind.CommRing.NullCert.eqsImplies
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(nc : NullCert)
(p : Prop)
:
lhs₁ = rh₁ → ... → lhsₙ = rhₙ → p
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.NullCert.eqsImplies ctx Lean.Grind.CommRing.NullCert.empty p = p
Instances For
A polynomial representing
q₁*(lhs₁ - rhs₁) + ... + qₙ*(lhsₙ - rhsₙ)
Equations
- Lean.Grind.CommRing.NullCert.empty.toPoly = Lean.Grind.CommRing.Poly.num 0
- (Lean.Grind.CommRing.NullCert.add q lhs rhs nc_1).toPoly = (q.mul (lhs.sub rhs).toPoly).combine nc_1.toPoly
Instances For
Equations
- Lean.Grind.CommRing.NullCert.empty.toPolyC c = Lean.Grind.CommRing.Poly.num 0
- (Lean.Grind.CommRing.NullCert.add q lhs rhs nc_1).toPolyC c = (q.mulC ((lhs.sub rhs).toPolyC c) c).combineC (nc_1.toPolyC c) c
Instances For
Theorems for justifying the procedure for commutative rings in grind
.
theorem
Lean.Grind.CommRing.Mon.denote_ofVar
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(x : Var)
:
theorem
Lean.Grind.CommRing.eq_of_powerRevlex
{k₁ k₂ : Nat}
:
powerRevlex k₁ k₂ = Ordering.eq → k₁ = k₂
theorem
Lean.Grind.CommRing.Power.eq_of_revlex
(p₁ p₂ : Power)
:
p₁.revlex p₂ = Ordering.eq → p₁ = p₂
theorem
Lean.Grind.CommRing.Mon.eq_of_revlexWF
{m₁ m₂ : Mon}
:
m₁.revlexWF m₂ = Ordering.eq → m₁ = m₂
theorem
Lean.Grind.CommRing.Mon.eq_of_revlexFuel
{fuel : Nat}
{m₁ m₂ : Mon}
:
revlexFuel fuel m₁ m₂ = Ordering.eq → m₁ = m₂
theorem
Lean.Grind.CommRing.Poly.denote_ofMon
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(m : Mon)
:
theorem
Lean.Grind.CommRing.Poly.denote_ofVar
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(x : Var)
:
theorem
Lean.Grind.CommRing.Expr.denote_toPoly
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(e : Expr)
:
theorem
Lean.Grind.CommRing.NullCert.denote_toPoly
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(nc : NullCert)
:
theorem
Lean.Grind.CommRing.NullCert.eq
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(nc : NullCert)
{lhs rhs : Expr}
:
nc.eq_cert lhs rhs = true → eqsImplies ctx nc (Expr.denote ctx lhs = Expr.denote ctx rhs)
theorem
Lean.Grind.CommRing.NullCert.eqsImplies_helper'
{α : Type u_1}
[CommRing α]
{ctx : Context α}
{nc : NullCert}
{p q : Prop}
:
eqsImplies ctx nc p → (p → q) → eqsImplies ctx nc q
theorem
Lean.Grind.CommRing.NullCert.ne_unsat
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(nc : NullCert)
(lhs rhs : Expr)
:
nc.eq_cert lhs rhs = true → Expr.denote ctx lhs ≠ Expr.denote ctx rhs → eqsImplies ctx nc False
theorem
Lean.Grind.CommRing.NullCert.eq_nzdiv
{α : Type u_1}
[CommRing α]
[NoNatZeroDivisors α]
(ctx : Context α)
(nc : NullCert)
(k : Int)
(lhs rhs : Expr)
:
nc.eq_nzdiv_cert k lhs rhs = true → eqsImplies ctx nc (Expr.denote ctx lhs = Expr.denote ctx rhs)
theorem
Lean.Grind.CommRing.NullCert.ne_nzdiv_unsat
{α : Type u_1}
[CommRing α]
[NoNatZeroDivisors α]
(ctx : Context α)
(nc : NullCert)
(k : Int)
(lhs rhs : Expr)
:
nc.eq_nzdiv_cert k lhs rhs = true → Expr.denote ctx lhs ≠ Expr.denote ctx rhs → eqsImplies ctx nc False
Equations
- nc.eq_unsat_cert k = (decide (k ≠ 0) && nc.toPoly == Lean.Grind.CommRing.Poly.num k)
Instances For
theorem
Lean.Grind.CommRing.NullCert.eq_unsat
{α : Type u_1}
[CommRing α]
[IsCharP α 0]
(ctx : Context α)
(nc : NullCert)
(k : Int)
:
nc.eq_unsat_cert k = true → eqsImplies ctx nc False
Theorems for justifying the procedure for commutative rings with a characteristic in grind
.
theorem
Lean.Grind.CommRing.NullCert.eqC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(nc : NullCert)
{lhs rhs : Expr}
:
nc.eq_certC lhs rhs c = true → eqsImplies ctx nc (Expr.denote ctx lhs = Expr.denote ctx rhs)
theorem
Lean.Grind.CommRing.NullCert.ne_unsatC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(nc : NullCert)
(lhs rhs : Expr)
:
nc.eq_certC lhs rhs c = true → Expr.denote ctx lhs ≠ Expr.denote ctx rhs → eqsImplies ctx nc False
theorem
Lean.Grind.CommRing.NullCert.eq_nzdivC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
[NoNatZeroDivisors α]
(ctx : Context α)
(nc : NullCert)
(k : Int)
(lhs rhs : Expr)
:
nc.eq_nzdiv_certC k lhs rhs c = true → eqsImplies ctx nc (Expr.denote ctx lhs = Expr.denote ctx rhs)
theorem
Lean.Grind.CommRing.NullCert.ne_nzdiv_unsatC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
[NoNatZeroDivisors α]
(ctx : Context α)
(nc : NullCert)
(k : Int)
(lhs rhs : Expr)
:
nc.eq_nzdiv_certC k lhs rhs c = true → Expr.denote ctx lhs ≠ Expr.denote ctx rhs → eqsImplies ctx nc False
Equations
- nc.eq_unsat_certC k c = (k % ↑c != 0 && nc.toPolyC c == Lean.Grind.CommRing.Poly.num k)
Instances For
theorem
Lean.Grind.CommRing.NullCert.eq_unsatC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(nc : NullCert)
(k : Int)
:
nc.eq_unsat_certC k c = true → eqsImplies ctx nc False
Theorems for stepwise proof-term construction
Equations
- Lean.Grind.CommRing.Stepwise.core_cert lhs rhs p = ((lhs.sub rhs).toPoly == p)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.core
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(lhs rhs : Expr)
(p : Poly)
:
core_cert lhs rhs p = true → Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
def
Lean.Grind.CommRing.Stepwise.superpose_cert
(k₁ : Int)
(m₁ : Mon)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
Equations
- Lean.Grind.CommRing.Stepwise.superpose_cert k₁ m₁ p₁ k₂ m₂ p₂ p = ((Lean.Grind.CommRing.Poly.mulMon k₁ m₁ p₁).combine (Lean.Grind.CommRing.Poly.mulMon k₂ m₂ p₂) == p)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.superpose
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(k₁ : Int)
(m₁ : Mon)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
superpose_cert k₁ m₁ p₁ k₂ m₂ p₂ p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
def
Lean.Grind.CommRing.Stepwise.simp_cert
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
Equations
- Lean.Grind.CommRing.Stepwise.simp_cert k₁ p₁ k₂ m₂ p₂ p = ((Lean.Grind.CommRing.Poly.mulConst k₁ p₁).combine (Lean.Grind.CommRing.Poly.mulMon k₂ m₂ p₂) == p)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.simp
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
simp_cert k₁ p₁ k₂ m₂ p₂ p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
Equations
- Lean.Grind.CommRing.Stepwise.mul_cert p₁ k p = (Lean.Grind.CommRing.Poly.mulConst k p₁ == p)
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.div_cert p₁ k p = (k != 0 && Lean.Grind.CommRing.Poly.mulConst k p == p₁)
Instances For
def
Lean.Grind.CommRing.Stepwise.div
{α : Type u_1}
[CommRing α]
(ctx : Context α)
[NoNatZeroDivisors α]
(p₁ : Poly)
(k : Int)
(p : Poly)
:
div_cert p₁ k p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
Equations
- ⋯ = ⋯
Instances For
Equations
Instances For
def
Lean.Grind.CommRing.Stepwise.unsat_eq
{α : Type u_1}
[CommRing α]
(ctx : Context α)
[IsCharP α 0]
(p : Poly)
(k : Int)
:
unsat_eq_cert p k = true → Poly.denote ctx p = 0 → False
Equations
- ⋯ = ⋯
Instances For
theorem
Lean.Grind.CommRing.Stepwise.d_init
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(p : Poly)
:
Equations
- Lean.Grind.CommRing.Stepwise.d_step1_cert p₁ k₂ m₂ p₂ p = (p == p₁.combine (Lean.Grind.CommRing.Poly.mulMon k₂ m₂ p₂))
Instances For
theorem
Lean.Grind.CommRing.Stepwise.d_step1
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(k : Int)
(init p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
d_step1_cert p₁ k₂ m₂ p₂ p = true →
↑k * Poly.denote ctx init = Poly.denote ctx p₁ →
Poly.denote ctx p₂ = 0 → ↑k * Poly.denote ctx init = Poly.denote ctx p
def
Lean.Grind.CommRing.Stepwise.d_stepk_cert
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
Equations
- Lean.Grind.CommRing.Stepwise.d_stepk_cert k₁ p₁ k₂ m₂ p₂ p = (p == (Lean.Grind.CommRing.Poly.mulConst k₁ p₁).combine (Lean.Grind.CommRing.Poly.mulMon k₂ m₂ p₂))
Instances For
theorem
Lean.Grind.CommRing.Stepwise.d_stepk
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(k₁ k : Int)
(init p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
d_stepk_cert k₁ p₁ k₂ m₂ p₂ p = true →
↑k * Poly.denote ctx init = Poly.denote ctx p₁ →
Poly.denote ctx p₂ = 0 → ↑(k₁ * k) * Poly.denote ctx init = Poly.denote ctx p
Equations
- Lean.Grind.CommRing.Stepwise.imp_1eq_cert lhs rhs p₁ p₂ = ((lhs.sub rhs).toPoly == p₁ && p₂ == Lean.Grind.CommRing.Poly.num 0)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.imp_1eq
{α : Type u_1}
[CommRing α]
(ctx : Context α)
(lhs rhs : Expr)
(p₁ p₂ : Poly)
:
imp_1eq_cert lhs rhs p₁ p₂ = true →
↑1 * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
theorem
Lean.Grind.CommRing.Stepwise.imp_keq
{α : Type u_1}
[CommRing α]
(ctx : Context α)
[NoNatZeroDivisors α]
(k : Int)
(lhs rhs : Expr)
(p₁ p₂ : Poly)
:
imp_keq_cert lhs rhs k p₁ p₂ = true →
↑k * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
theorem
Lean.Grind.CommRing.Stepwise.coreC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(lhs rhs : Expr)
(p : Poly)
:
core_certC lhs rhs p c = true → Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
def
Lean.Grind.CommRing.Stepwise.superpose_certC
(k₁ : Int)
(m₁ : Mon)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
(c : Nat)
:
Equations
- Lean.Grind.CommRing.Stepwise.superpose_certC k₁ m₁ p₁ k₂ m₂ p₂ p c = ((Lean.Grind.CommRing.Poly.mulMonC k₁ m₁ p₁ c).combineC (Lean.Grind.CommRing.Poly.mulMonC k₂ m₂ p₂ c) c == p)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.superposeC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(k₁ : Int)
(m₁ : Mon)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
superpose_certC k₁ m₁ p₁ k₂ m₂ p₂ p c = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
Equations
- Lean.Grind.CommRing.Stepwise.mul_certC p₁ k p c = (Lean.Grind.CommRing.Poly.mulConstC k p₁ c == p)
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.div_certC p₁ k p c = (k != 0 && Lean.Grind.CommRing.Poly.mulConstC k p c == p₁)
Instances For
def
Lean.Grind.CommRing.Stepwise.divC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
[NoNatZeroDivisors α]
(p₁ : Poly)
(k : Int)
(p : Poly)
:
div_certC p₁ k p c = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
Equations
- ⋯ = ⋯
Instances For
def
Lean.Grind.CommRing.Stepwise.simp_certC
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
(c : Nat)
:
Equations
- Lean.Grind.CommRing.Stepwise.simp_certC k₁ p₁ k₂ m₂ p₂ p c = ((Lean.Grind.CommRing.Poly.mulConstC k₁ p₁ c).combineC (Lean.Grind.CommRing.Poly.mulMonC k₂ m₂ p₂ c) c == p)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.simpC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
simp_certC k₁ p₁ k₂ m₂ p₂ p c = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
Equations
- Lean.Grind.CommRing.Stepwise.unsat_eq_certC p k c = (k % ↑c != 0 && p == Lean.Grind.CommRing.Poly.num k)
Instances For
def
Lean.Grind.CommRing.Stepwise.d_step1_certC
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
(c : Nat)
:
Equations
- Lean.Grind.CommRing.Stepwise.d_step1_certC p₁ k₂ m₂ p₂ p c = (p == p₁.combineC (Lean.Grind.CommRing.Poly.mulMonC k₂ m₂ p₂ c) c)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.d_step1C
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(k : Int)
(init p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
d_step1_certC p₁ k₂ m₂ p₂ p c = true →
↑k * Poly.denote ctx init = Poly.denote ctx p₁ →
Poly.denote ctx p₂ = 0 → ↑k * Poly.denote ctx init = Poly.denote ctx p
def
Lean.Grind.CommRing.Stepwise.d_stepk_certC
(k₁ : Int)
(p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
(c : Nat)
:
Equations
- Lean.Grind.CommRing.Stepwise.d_stepk_certC k₁ p₁ k₂ m₂ p₂ p c = (p == (Lean.Grind.CommRing.Poly.mulConstC k₁ p₁ c).combineC (Lean.Grind.CommRing.Poly.mulMonC k₂ m₂ p₂ c) c)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.d_stepkC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(k₁ k : Int)
(init p₁ : Poly)
(k₂ : Int)
(m₂ : Mon)
(p₂ p : Poly)
:
d_stepk_certC k₁ p₁ k₂ m₂ p₂ p c = true →
↑k * Poly.denote ctx init = Poly.denote ctx p₁ →
Poly.denote ctx p₂ = 0 → ↑(k₁ * k) * Poly.denote ctx init = Poly.denote ctx p
Equations
- Lean.Grind.CommRing.Stepwise.imp_1eq_certC lhs rhs p₁ p₂ c = ((lhs.sub rhs).toPolyC c == p₁ && p₂ == Lean.Grind.CommRing.Poly.num 0)
Instances For
theorem
Lean.Grind.CommRing.Stepwise.imp_1eqC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
(lhs rhs : Expr)
(p₁ p₂ : Poly)
:
imp_1eq_certC lhs rhs p₁ p₂ c = true →
↑1 * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
theorem
Lean.Grind.CommRing.Stepwise.imp_keqC
{α : Type u_1}
{c : Nat}
[CommRing α]
[IsCharP α c]
(ctx : Context α)
[NoNatZeroDivisors α]
(k : Int)
(lhs rhs : Expr)
(p₁ p₂ : Poly)
:
imp_keq_certC lhs rhs k p₁ p₂ c = true →
↑k * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs