Data-structures, definitions and theorems for implementing the
grind solver and normalizer for commutative rings and its extensions (e.g., fields,
commutative semirings, etc.)
The solver uses proof-by-reflection.
Equations
Instances For
Equations
Equations
Equations
- Lean.Grind.CommRing.instBEqExpr.beq (Lean.Grind.CommRing.Expr.num a) (Lean.Grind.CommRing.Expr.num b) = (a == b)
- Lean.Grind.CommRing.instBEqExpr.beq (Lean.Grind.CommRing.Expr.natCast a) (Lean.Grind.CommRing.Expr.natCast b) = (a == b)
- Lean.Grind.CommRing.instBEqExpr.beq (Lean.Grind.CommRing.Expr.intCast a) (Lean.Grind.CommRing.Expr.intCast b) = (a == b)
- Lean.Grind.CommRing.instBEqExpr.beq (Lean.Grind.CommRing.Expr.var a) (Lean.Grind.CommRing.Expr.var b) = (a == b)
- Lean.Grind.CommRing.instBEqExpr.beq a.neg b.neg = Lean.Grind.CommRing.instBEqExpr.beq a b
- Lean.Grind.CommRing.instBEqExpr.beq (a.add a_1) (b.add b_1) = (Lean.Grind.CommRing.instBEqExpr.beq a b && Lean.Grind.CommRing.instBEqExpr.beq a_1 b_1)
- Lean.Grind.CommRing.instBEqExpr.beq (a.sub a_1) (b.sub b_1) = (Lean.Grind.CommRing.instBEqExpr.beq a b && Lean.Grind.CommRing.instBEqExpr.beq a_1 b_1)
- Lean.Grind.CommRing.instBEqExpr.beq (a.mul a_1) (b.mul b_1) = (Lean.Grind.CommRing.instBEqExpr.beq a b && Lean.Grind.CommRing.instBEqExpr.beq a_1 b_1)
- Lean.Grind.CommRing.instBEqExpr.beq (a.pow a_1) (b.pow b_1) = (Lean.Grind.CommRing.instBEqExpr.beq a b && a_1 == b_1)
- Lean.Grind.CommRing.instBEqExpr.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- Lean.Grind.CommRing.instHashableExpr.hash (Lean.Grind.CommRing.Expr.num a) = mixHash 0 (hash a)
- Lean.Grind.CommRing.instHashableExpr.hash (Lean.Grind.CommRing.Expr.natCast a) = mixHash 1 (hash a)
- Lean.Grind.CommRing.instHashableExpr.hash (Lean.Grind.CommRing.Expr.intCast a) = mixHash 2 (hash a)
- Lean.Grind.CommRing.instHashableExpr.hash (Lean.Grind.CommRing.Expr.var a) = mixHash 3 (hash a)
- Lean.Grind.CommRing.instHashableExpr.hash a.neg = mixHash 4 (Lean.Grind.CommRing.instHashableExpr.hash a)
- Lean.Grind.CommRing.instHashableExpr.hash (a.add a_1) = mixHash (mixHash 5 (Lean.Grind.CommRing.instHashableExpr.hash a)) (Lean.Grind.CommRing.instHashableExpr.hash a_1)
- Lean.Grind.CommRing.instHashableExpr.hash (a.sub a_1) = mixHash (mixHash 6 (Lean.Grind.CommRing.instHashableExpr.hash a)) (Lean.Grind.CommRing.instHashableExpr.hash a_1)
- Lean.Grind.CommRing.instHashableExpr.hash (a.mul a_1) = mixHash (mixHash 7 (Lean.Grind.CommRing.instHashableExpr.hash a)) (Lean.Grind.CommRing.instHashableExpr.hash a_1)
- Lean.Grind.CommRing.instHashableExpr.hash (a.pow a_1) = mixHash (mixHash 8 (Lean.Grind.CommRing.instHashableExpr.hash a)) (hash a_1)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.denoteInt k = Int.rec (fun (n : Nat) => OfNat.ofNat n) (fun (n : Nat) => -OfNat.ofNat n.succ) k
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- Lean.Grind.CommRing.Power.denote ctx { x := x_1, k := 0 } = 1
- Lean.Grind.CommRing.Power.denote ctx { x := x_1, k := 1 } = Lean.Grind.CommRing.Var.denote ctx x_1
- Lean.Grind.CommRing.Power.denote ctx { x := x_1, k := k } = Lean.Grind.CommRing.Var.denote ctx x_1 ^ k
Instances For
Equations
- Lean.Grind.CommRing.instBEqMon.beq Lean.Grind.CommRing.Mon.unit Lean.Grind.CommRing.Mon.unit = true
- Lean.Grind.CommRing.instBEqMon.beq (Lean.Grind.CommRing.Mon.mult a a_1) (Lean.Grind.CommRing.Mon.mult b b_1) = (a == b && Lean.Grind.CommRing.instBEqMon.beq a_1 b_1)
- Lean.Grind.CommRing.instBEqMon.beq x✝¹ x✝ = false
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Mon.denote'.go ctx Lean.Grind.CommRing.Mon.unit acc = acc
- Lean.Grind.CommRing.Mon.denote'.go ctx (Lean.Grind.CommRing.Mon.mult p m_1) acc = Lean.Grind.CommRing.Mon.denote'.go ctx m_1 (acc * Lean.Grind.CommRing.Power.denote ctx p)
Instances For
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 p m).concat m₂ = Lean.Grind.CommRing.Mon.mult p (m.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
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Mon.mulPow_nc pw Lean.Grind.CommRing.Mon.unit = Lean.Grind.CommRing.Mon.mult pw Lean.Grind.CommRing.Mon.unit
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
Kernel-reduction variants of the monomial and polynomial operations, written with recursors,
Bool.rec and the operations of Init.Data.Int.Kernel, for use in certificates. A function that
merges two sorted lists recurses on the first one, and on the second one in a nested recursor
whose induction hypothesis handles the steps where only the second list shrinks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.mul_nc m₂ = m₂
- (Lean.Grind.CommRing.Mon.mult pw Lean.Grind.CommRing.Mon.unit).mul_nc m₂ = Lean.Grind.CommRing.Mon.mulPow_nc pw m₂
- (Lean.Grind.CommRing.Mon.mult pw m₁_2).mul_nc m₂ = Lean.Grind.CommRing.Mon.mult pw (m₁_2.mul_nc m₂)
Instances For
Equations
Instances For
Equations
- m.degree_k = Lean.Grind.CommRing.Mon.rec 0 (fun (pw : Lean.Grind.CommRing.Power) (x : Lean.Grind.CommRing.Mon) (ih : Nat) => pw.k.add ih) m
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
Equations
- Lean.Grind.CommRing.powerRevlex_k k₁ k₂ = Bool.rec (Bool.rec Ordering.eq Ordering.lt (k₂.blt k₁)) Ordering.gt (k₁.blt k₂)
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Grind.CommRing.instBEqPoly.beq (Lean.Grind.CommRing.Poly.num a) (Lean.Grind.CommRing.Poly.num b) = (a == b)
- Lean.Grind.CommRing.instBEqPoly.beq (Lean.Grind.CommRing.Poly.add a a_1 a_2) (Lean.Grind.CommRing.Poly.add b b_1 b_2) = (a == b && (a_1 == b_1 && Lean.Grind.CommRing.instBEqPoly.beq a_2 b_2))
- Lean.Grind.CommRing.instBEqPoly.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.Grind.CommRing.instHashablePoly.hash (Lean.Grind.CommRing.Poly.num a) = mixHash 0 (hash a)
- Lean.Grind.CommRing.instHashablePoly.hash (Lean.Grind.CommRing.Poly.add a a_1 a_2) = mixHash (mixHash (mixHash 1 (hash a)) (hash a_1)) (Lean.Grind.CommRing.instHashablePoly.hash a_2)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.CommRing.Poly.denote ctx (Lean.Grind.CommRing.Poly.num k) = ↑k
- Lean.Grind.CommRing.Poly.denote ctx (Lean.Grind.CommRing.Poly.add k m p_2) = k • Lean.Grind.CommRing.Mon.denote ctx m + Lean.Grind.CommRing.Poly.denote ctx p_2
Instances For
Equations
- Lean.Grind.CommRing.denoteTerm ctx k m = bif k == 1 then Lean.Grind.CommRing.Mon.denote' ctx m else k • Lean.Grind.CommRing.Mon.denote' ctx m
Instances For
Equations
- Lean.Grind.CommRing.Poly.denote'.go ctx (Lean.Grind.CommRing.Poly.num 0) acc = acc
- Lean.Grind.CommRing.Poly.denote'.go ctx (Lean.Grind.CommRing.Poly.num k) acc = acc + ↑k
- Lean.Grind.CommRing.Poly.denote'.go ctx (Lean.Grind.CommRing.Poly.add k m p_2) acc = Lean.Grind.CommRing.Poly.denote'.go ctx p_2 (acc + Lean.Grind.CommRing.denoteTerm ctx k m)
Instances For
Equations
- Lean.Grind.CommRing.Poly.denote' ctx (Lean.Grind.CommRing.Poly.num k) = ↑k
- Lean.Grind.CommRing.Poly.denote' ctx (Lean.Grind.CommRing.Poly.add k m p_2) = Lean.Grind.CommRing.Poly.denote'.go ctx p_2 (Lean.Grind.CommRing.denoteTerm ctx k m)
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
- One or more equations did not get rendered due to their size.
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 k_1) = Lean.Grind.CommRing.Poly.add k m (Lean.Grind.CommRing.Poly.num k_1)
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num k).concat p₂ = p₂.addConst k
- (Lean.Grind.CommRing.Poly.add k m p_1).concat p₂ = Lean.Grind.CommRing.Poly.add k m (p_1.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
- Lean.Grind.CommRing.Poly.mulConst.go k (Lean.Grind.CommRing.Poly.num k_1) = Lean.Grind.CommRing.Poly.num (k * k_1)
- Lean.Grind.CommRing.Poly.mulConst.go k (Lean.Grind.CommRing.Poly.add k_1 m p_1) = Lean.Grind.CommRing.Poly.add (k * k_1) m (Lean.Grind.CommRing.Poly.mulConst.go k p_1)
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.
- Lean.Grind.CommRing.Poly.mulMon.go k m (Lean.Grind.CommRing.Poly.add k_1 m_1 p_1) = Lean.Grind.CommRing.Poly.add (k * k_1) (m.mul m_1) (Lean.Grind.CommRing.Poly.mulMon.go k m p_1)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.mulMon_nc.go k m (Lean.Grind.CommRing.Poly.num k_1) acc = Lean.Grind.CommRing.Poly.insert (k * k_1) m acc
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num k).length = 0
- (Lean.Grind.CommRing.Poly.add k m p_1).length = 1 + p_1.length
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
- One or more equations did not get rendered due to their size.
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 k) acc = acc.combine (Lean.Grind.CommRing.Poly.mulConst k p₂)
- Lean.Grind.CommRing.Poly.mul.go p₂ (Lean.Grind.CommRing.Poly.add k m p_1) acc = Lean.Grind.CommRing.Poly.mul.go p₂ p_1 (acc.combine (Lean.Grind.CommRing.Poly.mulMon k m p₂))
Instances For
Equations
- p₁.mul_nc p₂ = Lean.Grind.CommRing.Poly.mul_nc.go p₂ p₁ (Lean.Grind.CommRing.Poly.num 0)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mul_nc.go p₂ (Lean.Grind.CommRing.Poly.num k) acc = acc.combine (Lean.Grind.CommRing.Poly.mulConst k p₂)
- Lean.Grind.CommRing.Poly.mul_nc.go p₂ (Lean.Grind.CommRing.Poly.add k m p_1) acc = Lean.Grind.CommRing.Poly.mul_nc.go p₂ p_1 (acc.combine (Lean.Grind.CommRing.Poly.mulMon_nc k m p₂))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- p.pow_k k = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (p.mul_k ih) p (k.beq 0)) k
Instances For
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Grind.CommRing.Expr.num k).toPoly = Lean.Grind.CommRing.Poly.num k
- (Lean.Grind.CommRing.Expr.intCast k).toPoly = Lean.Grind.CommRing.Poly.num k
- (Lean.Grind.CommRing.Expr.natCast k).toPoly = Lean.Grind.CommRing.Poly.num ↑k
- (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 = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k)
- ((Lean.Grind.CommRing.Expr.intCast n).pow k).toPoly = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k)
- ((Lean.Grind.CommRing.Expr.natCast n).pow k).toPoly = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (↑n ^ k)
- (a.pow k).toPoly = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else a.toPoly.pow k
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.degreeOf x = 0
- (Lean.Grind.CommRing.Mon.mult p m_1).degreeOf x = bif p.x == x then p.k else m_1.degreeOf x
Instances For
Equations
- Lean.Grind.CommRing.Mon.unit.cancelVar x = Lean.Grind.CommRing.Mon.unit
- (Lean.Grind.CommRing.Mon.mult p m_1).cancelVar x = bif p.x == x then m_1 else Lean.Grind.CommRing.Mon.mult p (m_1.cancelVar x)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.cancelVar' c x (Lean.Grind.CommRing.Poly.num k) acc = acc.addConst k
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Poly.gcdCoeffs.go (Lean.Grind.CommRing.Poly.num k) acc = if (acc == 1) = true then acc else acc.gcd k.natAbs
- Lean.Grind.CommRing.Poly.gcdCoeffs.go (Lean.Grind.CommRing.Poly.add k m p_2) acc = if (acc == 1) = true then acc else Lean.Grind.CommRing.Poly.gcdCoeffs.go p_2 (acc.gcd k.natAbs)
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num k).divConst a = Lean.Grind.CommRing.Poly.num (k / a)
- (Lean.Grind.CommRing.Poly.add k m p_2).divConst a = Lean.Grind.CommRing.Poly.add (k / a) m (p_2.divConst a)
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Poly.maxDegreeOf.go x (Lean.Grind.CommRing.Poly.num k) max = max
- Lean.Grind.CommRing.Poly.maxDegreeOf.go x (Lean.Grind.CommRing.Poly.add k m p_2) max = Lean.Grind.CommRing.Poly.maxDegreeOf.go x p_2 (max.max (m.degreeOf x))
Instances For
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Grind.CommRing.Expr.num k).toPoly_nc = Lean.Grind.CommRing.Poly.num k
- (Lean.Grind.CommRing.Expr.intCast k).toPoly_nc = Lean.Grind.CommRing.Poly.num k
- (Lean.Grind.CommRing.Expr.natCast k).toPoly_nc = Lean.Grind.CommRing.Poly.num ↑k
- (Lean.Grind.CommRing.Expr.var x_1).toPoly_nc = Lean.Grind.CommRing.Poly.ofVar x_1
- (a.add b).toPoly_nc = a.toPoly_nc.combine b.toPoly_nc
- (a.mul b).toPoly_nc = a.toPoly_nc.mul_nc b.toPoly_nc
- a.neg.toPoly_nc = Lean.Grind.CommRing.Poly.mulConst (-1) a.toPoly_nc
- (a.sub b).toPoly_nc = a.toPoly_nc.combine (Lean.Grind.CommRing.Poly.mulConst (-1) b.toPoly_nc)
- ((Lean.Grind.CommRing.Expr.num n).pow k).toPoly_nc = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k)
- ((Lean.Grind.CommRing.Expr.intCast n).pow k).toPoly_nc = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k)
- ((Lean.Grind.CommRing.Expr.natCast n).pow k).toPoly_nc = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (↑n ^ k)
- (a.pow k).toPoly_nc = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else a.toPoly_nc.pow_nc k
Instances For
Equations
- (Lean.Grind.CommRing.Poly.num k).normEq0 c = bif k % ↑c == 0 then Lean.Grind.CommRing.Poly.num 0 else Lean.Grind.CommRing.Poly.num k
- (Lean.Grind.CommRing.Poly.add k m p_2).normEq0 c = bif k % ↑c == 0 then p_2.normEq0 c else Lean.Grind.CommRing.Poly.add k m (p_2.normEq0 c)
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 k_1).addConstC k c = Lean.Grind.CommRing.Poly.num ((k_1 + k) % ↑c)
- (Lean.Grind.CommRing.Poly.add k_1 m p_2).addConstC k c = Lean.Grind.CommRing.Poly.add k_1 m (p_2.addConstC k c)
Instances For
Equations
- Lean.Grind.CommRing.Poly.insertC k m p c = have k := k % ↑c; bif k == 0 then p else Lean.Grind.CommRing.Poly.insertC.go m c k 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 k_1) = Lean.Grind.CommRing.Poly.add k m (Lean.Grind.CommRing.Poly.num k_1)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mulConstC k p c = have k_1 := k % ↑c; bif k_1 == 0 then Lean.Grind.CommRing.Poly.num 0 else bif k_1 == 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 k_1) = Lean.Grind.CommRing.Poly.num (k * k_1 % ↑c)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Poly.mulMonC_nc.go k m c (Lean.Grind.CommRing.Poly.num k_1) acc = Lean.Grind.CommRing.Poly.insert (k * k_1 % ↑c) m acc
Instances For
Equations
- One or more equations did not get rendered due to their size.
- (Lean.Grind.CommRing.Poly.num k₁).combineC (Lean.Grind.CommRing.Poly.num k₂) c = Lean.Grind.CommRing.Poly.num ((k₁ + k₂) % ↑c)
- (Lean.Grind.CommRing.Poly.num k₁).combineC (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2) c = (Lean.Grind.CommRing.Poly.add k₂ m₂ p₂_2).addConstC k₁ c
- (Lean.Grind.CommRing.Poly.add k₁ m₁ p₁_2).combineC (Lean.Grind.CommRing.Poly.num k₂) c = (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 k) acc = acc.combineC (Lean.Grind.CommRing.Poly.mulConstC k p₂ c) c
- Lean.Grind.CommRing.Poly.mulC.go p₂ c (Lean.Grind.CommRing.Poly.add k m p_1) acc = Lean.Grind.CommRing.Poly.mulC.go p₂ c p_1 (acc.combineC (Lean.Grind.CommRing.Poly.mulMonC k m p₂ c) c)
Instances For
Equations
- p₁.mulC_nc p₂ c = Lean.Grind.CommRing.Poly.mulC_nc.go p₂ c p₁ (Lean.Grind.CommRing.Poly.num 0)
Instances For
Equations
- Lean.Grind.CommRing.Poly.mulC_nc.go p₂ c (Lean.Grind.CommRing.Poly.num k) acc = acc.combineC (Lean.Grind.CommRing.Poly.mulConstC k p₂ c) c
- Lean.Grind.CommRing.Poly.mulC_nc.go p₂ c (Lean.Grind.CommRing.Poly.add k m p_1) acc = Lean.Grind.CommRing.Poly.mulC_nc.go p₂ c p_1 (acc.combineC (Lean.Grind.CommRing.Poly.mulMonC_nc k m p₂ c) c)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Expr.toPolyC.go c (Lean.Grind.CommRing.Expr.num k) = Lean.Grind.CommRing.Poly.num (k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC.go c (Lean.Grind.CommRing.Expr.natCast k) = Lean.Grind.CommRing.Poly.num (↑k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC.go c (Lean.Grind.CommRing.Expr.intCast k) = Lean.Grind.CommRing.Poly.num (k % ↑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) = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC.go c (a.pow k) = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else (Lean.Grind.CommRing.Expr.toPolyC.go c a).powC k c
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (Lean.Grind.CommRing.Expr.num k) = Lean.Grind.CommRing.Poly.num (k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (Lean.Grind.CommRing.Expr.natCast k) = Lean.Grind.CommRing.Poly.num (↑k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (Lean.Grind.CommRing.Expr.intCast k) = Lean.Grind.CommRing.Poly.num (k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (Lean.Grind.CommRing.Expr.var x_1) = Lean.Grind.CommRing.Poly.ofVar x_1
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (a.add b) = (Lean.Grind.CommRing.Expr.toPolyC_nc.go c a).combineC (Lean.Grind.CommRing.Expr.toPolyC_nc.go c b) c
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (a.mul b) = (Lean.Grind.CommRing.Expr.toPolyC_nc.go c a).mulC_nc (Lean.Grind.CommRing.Expr.toPolyC_nc.go c b) c
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c a.neg = Lean.Grind.CommRing.Poly.mulConstC (-1) (Lean.Grind.CommRing.Expr.toPolyC_nc.go c a) c
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c ((Lean.Grind.CommRing.Expr.num n).pow k) = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else Lean.Grind.CommRing.Poly.num (n ^ k % ↑c)
- Lean.Grind.CommRing.Expr.toPolyC_nc.go c (a.pow k) = bif k == 0 then Lean.Grind.CommRing.Poly.num 1 else (Lean.Grind.CommRing.Expr.toPolyC_nc.go c a).powC_nc k c
Instances For
Kernel-reduction variants of the definitions for the IsCharP case.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- p.powC_k k c = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (p.mulC_k ih c) p (k.beq 0)) k
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Kernel-reduction variants of Poly.insert and of the definitions for the non-commutative case.
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.pow_nc_k k = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (ih.mul_nc_k p) p (k.beq 0)) k
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.powC_nc_k k c = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (ih.mulC_nc_k p c) p (k.beq 0)) k
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Theorems for justifying the procedure for commutative rings in grind.
Kernel-reduction variants of Mon.degreeOf, Mon.cancelVar and Poly.cancelVar.
Equations
- m.degreeOf_k x = Lean.Grind.CommRing.Mon.rec 0 (fun (pw : Lean.Grind.CommRing.Power) (x_1 : Lean.Grind.CommRing.Mon) (ih : Nat) => Bool.rec ih pw.k (Nat.beq pw.x x)) m
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.CommRing.cancel_var_cert c x p₁ p₂ = (c.bneZero_k && p₂.beq' (Lean.Grind.CommRing.Poly.cancelVar_k c x p₁))
Instances For
Theorems for justifying the procedure for commutative rings with a characteristic in grind.
Expr spelling of a polynomial: the left-associated sum of its terms, as in Poly.denote'.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Poly.toExpr.go (Lean.Grind.CommRing.Poly.num k) acc = bif k == 0 then acc else acc.add (Lean.Grind.CommRing.Expr.num k)
- Lean.Grind.CommRing.Poly.toExpr.go (Lean.Grind.CommRing.Poly.add k m p_2) acc = Lean.Grind.CommRing.Poly.toExpr.go p_2 (acc.add (Lean.Grind.CommRing.Poly.toExpr.goTerm k m))
Instances For
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
- Lean.Grind.CommRing.Poly.toExpr_k.goTerm k m = Bool.rec ((Lean.Grind.CommRing.Expr.num k).mul m.toExpr_k) m.toExpr_k (k.beq' 1)
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
Balanced polynomial normalization for certificates. Expr.toPolyB_k collects the summands of
sums and differences into a list and adds them pairwise, level by level, and so does
Poly.mulB_k with the partial products of a multiplication. The kernel then checks a sum of n
summands with O(n log n) monomial comparisons, instead of the O(n²) of adding them one by one
with Expr.toPoly_k when each summand goes at the end of the polynomial. The result is the
same polynomial as Expr.toPoly, because Poly.combine of polynomials in normal form is their
normal form.
The sum of the denotations of ps.
Equations
- Lean.Grind.CommRing.Poly.denoteList ctx [] = 0
- Lean.Grind.CommRing.Poly.denoteList ctx (p :: ps) = Lean.Grind.CommRing.Poly.denote ctx p + Lean.Grind.CommRing.Poly.denoteList ctx ps
Instances For
Adds ps with f by levels of pairwise additions. Each level consumes an element of fuel;
the list of summands is at most halved by each level, so ps itself is enough fuel.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
The partial products of p₁ * p₂, one per monomial of p₁.
Equations
- One or more equations did not get rendered due to their size.
Instances For
true if p is a monomial k * m without constant.
Equations
- One or more equations did not get rendered due to their size.
Instances For
q multiplied by the first monomial of p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
p₁ * p₂, adding the partial products pairwise unless a factor is a constant or a monomial.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- p.powB_k k = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (p.mulB_k ih) p (k.beq 0)) k
Instances For
p, negated if s.
Equations
- p.signB_k s = Bool.rec p (Lean.Grind.CommRing.Poly.mulConst_k (Int.negSucc 0) p) s
Instances For
e.sumsB_k s acc prepends to acc the polynomials of the summands of e, negated if s.
The summands are the maximal subterms of e that are not sums, differences or negations.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Expr.toPolyB_k if bal, and Expr.toPoly_k otherwise. The balanced additions cost more
kernel steps for short sums, so the certificate producer chooses.
Equations
- Lean.Grind.CommRing.Expr.toPolyX_k bal e = Bool.rec e.toPoly_k e.toPolyB_k bal
Instances For
Balanced polynomial normalization in a ring of characteristic c, like Expr.toPolyB_k.
q multiplied by the first monomial of p in characteristic c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Poly.mulB_k in characteristic c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- p.powBC_k k c = Nat.rec (Lean.Grind.CommRing.Poly.num 1) (fun (k : Nat) (ih : Lean.Grind.CommRing.Poly) => Bool.rec (p.mulBC_k ih c) p (k.beq 0)) k
Instances For
p, negated in characteristic c if s.
Equations
- p.signBC_k c s = Bool.rec p (Lean.Grind.CommRing.Poly.mulConstC_k (Int.negSucc 0) p c) s
Instances For
Expr.sumsB_k in characteristic c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- e.toPolyBC_k c = Lean.Grind.CommRing.Poly.sumB_k (fun (a b : Lean.Grind.CommRing.Poly) => a.combineC_k c b) (e.sumsBC_k c false [])
Instances For
Expr.toPolyBC_k if bal, and Expr.toPolyC_k otherwise.
Equations
- Lean.Grind.CommRing.Expr.toPolyXC_k bal e c = Bool.rec (e.toPolyC_k c) (e.toPolyBC_k c) bal
Instances For
Hint-directed addition of polynomials. Certificates state the result p of a step and prove
p = a.mergeHint hs b by Eq.refl, so the kernel checks the step by definitional equality: the
monomials that p shares with a are compared by pointer after the kernel's hash-consing, and the
hints hs place the monomials of b without comparing monomial orders.
mergeHead norm c k m a cont places the monomial k*m at the head of a, then continues with
cont on the remaining part of a. If c is true and the head of a is k₁*m, the two are
added (with coefficient norm (k₁ + k), dropped if zero), otherwise k*m is inserted.
Equations
- One or more equations did not get rendered due to their size.
Instances For
mergeHintG norm addK comb hs a b adds a and b following the hints hs, one per monomial of
b, in order. mergeHint and mergeHintC instantiate norm, addK and comb for rings
without and with a characteristic. A hint h = 2*n + c places the head monomial k*m of b:
- the first
n = h / 2monomials of the remaining part ofaare kept, since they are greater thanm; - if
c = h % 2is1, the next monomial ofaisk₁*m, and the two are added intonorm (k₁ + k) * m, which is dropped if its coefficient is zero; - if
cis0,k*mis inserted before the next monomial ofa.
The next hint continues after m in both a and b. When b reaches its constant, it is added
with addK. If the hints run out before the monomials of b, the rest is added with comb.
Wrong hints produce a wrong sum, and the certificate p = a.mergeHint hs b then fails to check.
Example: in the order x³ > x² > x, with a = 5*x³ + 2*x² + 7 and b = 3*x² + 4*x + 1,
hs = [3, 0]:
3 = 2*1 + 1keeps5*x³and adds3*x²to2*x², giving5*x²;0 = 2*0 + 0inserts4*xbefore the constant7;- the constant
1ofbis added to7.
The sum is 5*x³ + 5*x² + 4*x + 8. With a = x² + 2*x and b = -x² + 1, hs = [1] adds -x²
to x², drops the zero monomial, and the sum is 2*x + 1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Grind.CommRing.Poly.mergeHint hs a b = Lean.Grind.CommRing.Poly.mergeHintG (fun (k : Int) => k) Lean.Grind.CommRing.Poly.addConst_k Lean.Grind.CommRing.Poly.combine_k hs a b
Instances For
Theorems for stepwise proof-term construction
Equations
- Lean.Grind.CommRing.Stepwise.core_cert lhs rhs p = (lhs.sub rhs).toPoly_k.beq' p
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.mul_ne_cert p₁ k p = (k != 0 && (Lean.Grind.CommRing.Poly.mulConst_k k p₁).beq' p)
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.div_cert p₁ k p = (!k.beq' 0 && (Lean.Grind.CommRing.Poly.mulConst_k k p).beq' p₁)
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.unsat_eq_cert p k = (!k.beq' 0 && p.beq' (Lean.Grind.CommRing.Poly.num k))
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.imp_1eq_cert lhs rhs p₁ p₂ = ((lhs.sub rhs).toPoly_k.beq' p₁ && p₂.beq' (Lean.Grind.CommRing.Poly.num 0))
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.mul_certC p₁ k p c = (Lean.Grind.CommRing.Poly.mulConstC_k k p₁ c).beq' p
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.div_certC p₁ k p c = (!k.beq' 0 && (Lean.Grind.CommRing.Poly.mulConstC_k k p c).beq' p₁)
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.unsat_eq_certC p k c = (!(k.emod_k (Int.ofNat c)).beq' 0 && p.beq' (Lean.Grind.CommRing.Poly.num k))
Instances For
Equations
- Lean.Grind.CommRing.Stepwise.imp_1eq_certC lhs rhs p₁ p₂ c = (((lhs.sub rhs).toPolyC_k c).beq' p₁ && p₂.beq' (Lean.Grind.CommRing.Poly.num 0))
Instances For
Equations
Instances For
IntModule interface
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- Lean.Grind.CommRing.mul_ineq_cert p₁ k p = (decide (k > 0) && (Lean.Grind.CommRing.Poly.mulConst_k k p₁).beq' p)
Instances For
Equations
Instances For
normEq0 helper theorems
Equations
- Lean.Grind.CommRing.eq_normEq0_cert c p₁ p₂ p = (p₁.beq' (Lean.Grind.CommRing.Poly.num ↑c) && p.beq' (p₂.normEq0 c))
Instances For
Equations
- Lean.Grind.CommRing.eq_gcd_cert a b (Lean.Grind.CommRing.Poly.add k v p_2) p₂ p = false
- Lean.Grind.CommRing.eq_gcd_cert a b (Lean.Grind.CommRing.Poly.num g) (Lean.Grind.CommRing.Poly.add k v p_3) p = false
- Lean.Grind.CommRing.eq_gcd_cert a b (Lean.Grind.CommRing.Poly.num g) (Lean.Grind.CommRing.Poly.num g_1) (Lean.Grind.CommRing.Poly.add k v p_4) = false
- Lean.Grind.CommRing.eq_gcd_cert a b (Lean.Grind.CommRing.Poly.num g) (Lean.Grind.CommRing.Poly.num g_1) (Lean.Grind.CommRing.Poly.num g_2) = (g_2 == a * g + b * g_1)
Instances For
Equations
- Lean.Grind.CommRing.d_normEq0_cert c p₁ p₂ p = (p₂.beq' (Lean.Grind.CommRing.Poly.num ↑c) && p.beq' (p₁.normEq0 c))
Instances For
Equations
Instances For
Kernel-reduction variants of Poly.denote': cutsat states the result of norm_int with
Poly.denote'_k, which the kernel unfolds to match it with its own polynomials.
They are abbrevs so that the kernel's lazy delta reduction unfolds them before the arithmetic on
the other side (e.g., Int.add), whose unfolding would make the kernel reduce the atoms.
Equations
- Lean.Grind.CommRing.denoteTerm_k ctx k m = Bool.rec (k • Lean.Grind.CommRing.Mon.denote'_k ctx m) (Lean.Grind.CommRing.Mon.denote'_k ctx m) (k.beq' 1)
Instances For
Helper theorems for normalizing ring constraints in the grind order module.
Relation certificates over the polynomials of the normalized sides: p is the polynomial of
a - b, and a', b' are the Expr spellings of pa, pb with p = pa - pb. Every
hypothesis is checked by definitional equality.
Relations whose normal form is p = 0, p ≤ 0 or p < 0 (the lhsOnly mode of Sym.Arith): the
rendered side lhs' is checked against the polynomial p of lhs - rhs directly.
The relation from the constant difference of its sides, h, which the theorems below state with
Expr.toPolyX_k, and stepwise certificates (Expr.denote_mul_of_terms) as
(lhs.sub rhs).denote ctx = (Poly.num k).denote ctx.
Relations whose sides have the same polynomial p: each side is checked against p alone.
Stepwise certificates for large products. The kernel evaluates the partial products of
Poly.mulB_k lazily, and evaluates each again at every level of the pairwise additions that
compares its monomials. These theorems state the polynomial of each large product, and the list of
its partial products, so that the kernel evaluates each partial product once, when it checks the
list by definitional equality, and adds the stated ones.
a ^ (k + 1) from a ^ k, multiplying by the polynomial pa of a.
Stepwise certificates for large products in characteristic c, like Expr.denote_mul_of_terms.
Variants of the theorems above for rings with a nonzero characteristic c.
In characteristic c, an equation can be multiplied by k' when k * k' ≡ 1 modulo c.
Equations
- Lean.Grind.CommRing.norm_cnstr_nc_cert lhs rhs lhs' rhs' = (rhs.sub lhs).toPoly_nc_k.beq' (rhs'.sub lhs').toPoly_nc_k
Instances For
Equations
- Lean.Grind.CommRing.norm_eq_nc_cert lhs rhs lhs' rhs' = (lhs.sub rhs).toPoly_nc_k.beq' (lhs'.sub rhs').toPoly_nc_k
Instances For
Equations
- Lean.Grind.CommRing.norm_cnstrC_nc_cert lhs rhs lhs' rhs' c = ((rhs.sub lhs).toPolyC_nc_k c).beq' ((rhs'.sub lhs').toPolyC_nc_k c)
Instances For
Equations
- Lean.Grind.CommRing.norm_eqC_nc_cert lhs rhs lhs' rhs' c = ((lhs.sub rhs).toPolyC_nc_k c).beq' ((lhs'.sub rhs').toPolyC_nc_k c)
Instances For
Helper theorems for quick normalization