Documentation

Init.Grind.Ring.Poly

@[reducible, inline]
Equations
Instances For
    Instances For
      @[reducible, inline]
      Equations
      Instances For
        def Lean.Grind.CommRing.Var.denote {α : Type u_1} (ctx : Context α) (v : Var) :
        α
        Equations
        Instances For
          noncomputable def Lean.Grind.CommRing.denoteInt {α : Type u_1} [Ring α] (k : Int) :
          α
          Equations
          Instances For
            noncomputable def Lean.Grind.CommRing.Expr.denote {α : Type u_1} [Ring α] (ctx : Context α) (e : Expr) :
            α
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Instances For
                noncomputable def Lean.Grind.CommRing.Power.beq' (pw₁ pw₂ : Power) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem Lean.Grind.CommRing.Power.beq'_eq (pw₁ pw₂ : Power) :
                  (pw₁.beq' pw₂ = true) = (pw₁ = pw₂)
                  Equations
                  Instances For
                    def Lean.Grind.CommRing.Power.denote {α : Type u_1} [Semiring α] (ctx : Context α) :
                    Powerα
                    Equations
                    Instances For
                      Instances For
                        noncomputable def Lean.Grind.CommRing.Mon.beq' (m₁ : Mon) :
                        MonBool
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[simp]
                          theorem Lean.Grind.CommRing.Mon.beq'_eq (m₁ m₂ : Mon) :
                          (m₁.beq' m₂ = true) = (m₁ = m₂)
                          Equations
                          Instances For
                            def Lean.Grind.CommRing.Mon.mul.go (fuel : Nat) (m₁ m₂ : Mon) :
                            Equations
                            Instances For
                              Equations
                              Instances For
                                Equations
                                Instances For
                                  noncomputable def Lean.Grind.CommRing.powerRevlex_k (k₁ k₂ : Nat) :
                                  Equations
                                  Instances For
                                    Equations
                                    Instances For
                                      Equations
                                      Instances For
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          noncomputable def Lean.Grind.CommRing.Mon.grevlex_k (m₁ m₂ : Mon) :
                                          Equations
                                          Instances For
                                            theorem Lean.Grind.CommRing.Mon.revlex_k_eq_revlex (m₁ m₂ : Mon) :
                                            m₁.revlex_k m₂ = m₁.revlex m₂
                                            theorem Lean.Grind.CommRing.Mon.grevlex_k_eq_grevlex (m₁ m₂ : Mon) :
                                            m₁.grevlex_k m₂ = m₁.grevlex m₂
                                            Instances For
                                              noncomputable def Lean.Grind.CommRing.Poly.beq' (p₁ : Poly) :
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[simp]
                                                theorem Lean.Grind.CommRing.Poly.beq'_eq (p₁ p₂ : Poly) :
                                                (p₁.beq' p₂ = true) = (p₁ = p₂)
                                                Equations
                                                Instances For
                                                  noncomputable def Lean.Grind.CommRing.Poly.addConst_k (p : Poly) (k : Int) :
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Equations
                                                    Instances For
                                                      Equations
                                                      Instances For
                                                        noncomputable def Lean.Grind.CommRing.Poly.mulConst_k (k : Int) (p : Poly) :
                                                        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
                                                            Instances For
                                                              noncomputable def Lean.Grind.CommRing.Poly.mulMon_k (k : Int) (m : Mon) (p : Poly) :
                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                @[simp]

                                                                A Poly.combine optimized for the kernel.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  @[simp]
                                                                  theorem Lean.Grind.CommRing.Poly.combine_k_eq_combine (p₁ p₂ : Poly) :
                                                                  p₁.combine_k p₂ = p₁.combine p₂
                                                                  Equations
                                                                  Instances For
                                                                    Equations
                                                                    Instances For
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      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.

                                                                        def Lean.Grind.CommRing.Poly.insertC (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                        Equations
                                                                        Instances For
                                                                          Equations
                                                                          Instances For
                                                                            Equations
                                                                            Instances For
                                                                              Equations
                                                                              Instances For
                                                                                def Lean.Grind.CommRing.Poly.mulMonC (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                                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
                                                                                    def Lean.Grind.CommRing.Poly.mulC (p₁ p₂ : Poly) (c : Nat) :
                                                                                    Equations
                                                                                    Instances For
                                                                                      Equations
                                                                                      Instances For
                                                                                        Equations
                                                                                        Instances For

                                                                                          A Nullstellensatz certificate.

                                                                                          lhs₁ = rh₁ → ... → lhsₙ = rhₙ → q₁*(lhs₁ - rhs₁) + ... + qₙ*(lhsₙ - rhsₙ) = 0
                                                                                          
                                                                                          Instances For
                                                                                            noncomputable def Lean.Grind.CommRing.NullCert.denote {α : Type u_1} [CommRing α] (ctx : Context α) :
                                                                                            NullCertα
                                                                                            q₁*(lhs₁ - rhs₁) + ... + qₙ*(lhsₙ - rhsₙ)
                                                                                            
                                                                                            Equations
                                                                                            Instances For
                                                                                              def Lean.Grind.CommRing.NullCert.eqsImplies {α : Type u_1} [CommRing α] (ctx : Context α) (nc : NullCert) (p : Prop) :
                                                                                              lhs₁ = rh₁ → ... → lhsₙ = rhₙ → p
                                                                                              
                                                                                              Equations
                                                                                              Instances For

                                                                                                A polynomial representing

                                                                                                q₁*(lhs₁ - rhs₁) + ... + qₙ*(lhsₙ - rhsₙ)
                                                                                                
                                                                                                Equations
                                                                                                Instances For

                                                                                                  Theorems for justifying the procedure for commutative rings in grind.

                                                                                                  theorem Lean.Grind.CommRing.denoteInt_eq {α : Type u_1} [CommRing α] (k : Int) :
                                                                                                  denoteInt k = k
                                                                                                  theorem Lean.Grind.CommRing.Power.denote_eq {α : Type u_1} [Semiring α] (ctx : Context α) (p : Power) :
                                                                                                  denote ctx p = Var.denote ctx p.x ^ p.k
                                                                                                  theorem Lean.Grind.CommRing.Mon.denote'_eq_denote {α : Type u_1} [Semiring α] (ctx : Context α) (m : Mon) :
                                                                                                  denote' ctx m = denote ctx m
                                                                                                  theorem Lean.Grind.CommRing.Mon.denote_ofVar {α : Type u_1} [Semiring α] (ctx : Context α) (x : Var) :
                                                                                                  denote ctx (ofVar x) = Var.denote ctx x
                                                                                                  theorem Lean.Grind.CommRing.Mon.denote_concat {α : Type u_1} [Semiring α] (ctx : Context α) (m₁ m₂ : Mon) :
                                                                                                  denote ctx (m₁.concat m₂) = denote ctx m₁ * denote ctx m₂
                                                                                                  theorem Lean.Grind.CommRing.Mon.denote_mulPow {α : Type u_1} [CommSemiring α] (ctx : Context α) (p : Power) (m : Mon) :
                                                                                                  denote ctx (mulPow p m) = Power.denote ctx p * denote ctx m
                                                                                                  theorem Lean.Grind.CommRing.Mon.denote_mul {α : Type u_1} [CommSemiring α] (ctx : Context α) (m₁ m₂ : Mon) :
                                                                                                  denote ctx (m₁.mul m₂) = denote ctx m₁ * denote ctx m₂
                                                                                                  theorem Lean.Grind.CommRing.Var.eq_of_revlex {x₁ x₂ : Var} :
                                                                                                  x₁.revlex x₂ = Ordering.eqx₁ = x₂
                                                                                                  theorem Lean.Grind.CommRing.eq_of_powerRevlex {k₁ k₂ : Nat} :
                                                                                                  powerRevlex k₁ k₂ = Ordering.eqk₁ = k₂
                                                                                                  theorem Lean.Grind.CommRing.Power.eq_of_revlex (p₁ p₂ : Power) :
                                                                                                  p₁.revlex p₂ = Ordering.eqp₁ = p₂
                                                                                                  theorem Lean.Grind.CommRing.Mon.eq_of_revlexWF {m₁ m₂ : Mon} :
                                                                                                  m₁.revlexWF m₂ = Ordering.eqm₁ = m₂
                                                                                                  theorem Lean.Grind.CommRing.Mon.eq_of_revlexFuel {fuel : Nat} {m₁ m₂ : Mon} :
                                                                                                  revlexFuel fuel m₁ m₂ = Ordering.eqm₁ = m₂
                                                                                                  theorem Lean.Grind.CommRing.Mon.eq_of_revlex {m₁ m₂ : Mon} :
                                                                                                  m₁.revlex m₂ = Ordering.eqm₁ = m₂
                                                                                                  theorem Lean.Grind.CommRing.Mon.eq_of_grevlex {m₁ m₂ : Mon} :
                                                                                                  m₁.grevlex m₂ = Ordering.eqm₁ = m₂
                                                                                                  theorem Lean.Grind.CommRing.Poly.denoteTerm_eq {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                                                  denote'.denoteTerm ctx k m = k * Mon.denote ctx m
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote'_eq_denote {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) :
                                                                                                  denote' ctx p = denote ctx p
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_ofMon {α : Type u_1} [CommRing α] (ctx : Context α) (m : Mon) :
                                                                                                  denote ctx (ofMon m) = Mon.denote ctx m
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_ofVar {α : Type u_1} [CommRing α] (ctx : Context α) (x : Var) :
                                                                                                  denote ctx (ofVar x) = Var.denote ctx x
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_addConst {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (k : Int) :
                                                                                                  denote ctx (p.addConst k) = denote ctx p + k
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_insert {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                  denote ctx (insert k m p) = k * Mon.denote ctx m + denote ctx p
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_concat {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                  denote ctx (p₁.concat p₂) = denote ctx p₁ + denote ctx p₂
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulConst {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (p : Poly) :
                                                                                                  denote ctx (mulConst k p) = k * denote ctx p
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulMon {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                  denote ctx (mulMon k m p) = k * Mon.denote ctx m * denote ctx p
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_combine {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                  denote ctx (p₁.combine p₂) = denote ctx p₁ + denote ctx p₂
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mul_go {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ acc : Poly) :
                                                                                                  denote ctx (mul.go p₂ p₁ acc) = denote ctx acc + denote ctx p₁ * denote ctx p₂
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mul {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                  denote ctx (p₁.mul p₂) = denote ctx p₁ * denote ctx p₂
                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_pow {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                  denote ctx (p.pow k) = denote ctx p ^ k
                                                                                                  theorem Lean.Grind.CommRing.Expr.denote_toPoly {α : Type u_1} [CommRing α] (ctx : Context α) (e : Expr) :
                                                                                                  theorem Lean.Grind.CommRing.Expr.eq_of_toPoly_eq {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Expr) (h : (a.toPoly == b.toPoly) = true) :
                                                                                                  denote ctx a = denote ctx b
                                                                                                  theorem Lean.Grind.CommRing.NullCert.eqsImplies_helper {α : Type u_1} [CommRing α] (ctx : Context α) (nc : NullCert) (p : Prop) :
                                                                                                  (denote ctx nc = 0p)eqsImplies ctx nc p

                                                                                                  Helper theorem for proving NullCert theorems.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    theorem Lean.Grind.CommRing.NullCert.eq {α : Type u_1} [CommRing α] (ctx : Context α) (nc : NullCert) {lhs rhs : Expr} :
                                                                                                    nc.eq_cert lhs rhs = trueeqsImplies 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(pq)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 = trueExpr.denote ctx lhs Expr.denote ctx rhseqsImplies ctx nc False
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      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 = trueeqsImplies 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 = trueExpr.denote ctx lhs Expr.denote ctx rhseqsImplies ctx nc False
                                                                                                      theorem Lean.Grind.CommRing.NullCert.eq_unsat {α : Type u_1} [CommRing α] [IsCharP α 0] (ctx : Context α) (nc : NullCert) (k : Int) :

                                                                                                      Theorems for justifying the procedure for commutative rings with a characteristic in grind.

                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_addConstC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Int) :
                                                                                                      denote ctx (p.addConstC k c) = denote ctx p + k
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_insertC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                      denote ctx (insertC k m p c) = k * Mon.denote ctx m + denote ctx p
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_mulConstC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (k : Int) (p : Poly) :
                                                                                                      denote ctx (mulConstC k p c) = k * denote ctx p
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_mulMonC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                      denote ctx (mulMonC k m p c) = k * Mon.denote ctx m * denote ctx p
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_combineC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                      denote ctx (p₁.combineC p₂ c) = denote ctx p₁ + denote ctx p₂
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_mulC_go {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ p₂ acc : Poly) :
                                                                                                      denote ctx (mulC.go p₂ c p₁ acc) = denote ctx acc + denote ctx p₁ * denote ctx p₂
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_mulC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                      denote ctx (p₁.mulC p₂ c) = denote ctx p₁ * denote ctx p₂
                                                                                                      theorem Lean.Grind.CommRing.Poly.denote_powC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                      denote ctx (p.powC k c) = denote ctx p ^ k
                                                                                                      theorem Lean.Grind.CommRing.Expr.denote_toPolyC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (e : Expr) :
                                                                                                      Poly.denote ctx (e.toPolyC c) = denote ctx e
                                                                                                      theorem Lean.Grind.CommRing.Expr.eq_of_toPolyC_eq {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a b : Expr) (h : (a.toPolyC c == b.toPolyC c) = true) :
                                                                                                      denote ctx a = denote ctx b
                                                                                                      theorem Lean.Grind.CommRing.NullCert.denote_toPolyC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (nc : NullCert) :
                                                                                                      Poly.denote ctx (nc.toPolyC c) = denote ctx nc
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        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 = trueeqsImplies 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 = trueExpr.denote ctx lhs Expr.denote ctx rhseqsImplies ctx nc False
                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          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 = trueeqsImplies 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 = trueExpr.denote ctx lhs Expr.denote ctx rhseqsImplies ctx nc False
                                                                                                          theorem Lean.Grind.CommRing.NullCert.eq_unsatC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (nc : NullCert) (k : Int) :

                                                                                                          Theorems for stepwise proof-term construction

                                                                                                          noncomputable def Lean.Grind.CommRing.Stepwise.core_cert (lhs rhs : Expr) (p : Poly) :
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            theorem Lean.Grind.CommRing.Stepwise.core {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                            core_cert lhs rhs p = trueExpr.denote ctx lhs = Expr.denote ctx rhsPoly.denote ctx p = 0
                                                                                                            noncomputable def Lean.Grind.CommRing.Stepwise.superpose_cert (k₁ : Int) (m₁ : Mon) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) :
                                                                                                            Equations
                                                                                                            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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                              noncomputable def Lean.Grind.CommRing.Stepwise.simp_cert (k₁ : Int) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) :
                                                                                                              Equations
                                                                                                              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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                                def Lean.Grind.CommRing.Stepwise.mul {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                mul_cert p₁ k p = truePoly.denote ctx p₁ = 0Poly.denote ctx p = 0
                                                                                                                Equations
                                                                                                                • =
                                                                                                                Instances For
                                                                                                                  noncomputable def Lean.Grind.CommRing.Stepwise.div_cert (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                  Equations
                                                                                                                  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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p = 0
                                                                                                                    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 = truePoly.denote ctx p = 0False
                                                                                                                      Equations
                                                                                                                      • =
                                                                                                                      Instances For
                                                                                                                        theorem Lean.Grind.CommRing.Stepwise.d_init {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) :
                                                                                                                        1 * Poly.denote ctx p = Poly.denote ctx p
                                                                                                                        noncomputable def Lean.Grind.CommRing.Stepwise.d_step1_cert (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) :
                                                                                                                        Equations
                                                                                                                        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 = truek * Poly.denote ctx init = Poly.denote ctx p₁Poly.denote ctx p₂ = 0k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                          noncomputable def Lean.Grind.CommRing.Stepwise.d_stepk_cert (k₁ : Int) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) :
                                                                                                                          Equations
                                                                                                                          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 = truek * Poly.denote ctx init = Poly.denote ctx p₁Poly.denote ctx p₂ = 0↑(k₁ * k) * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                            noncomputable def Lean.Grind.CommRing.Stepwise.imp_1eq_cert (lhs rhs : Expr) (p₁ p₂ : Poly) :
                                                                                                                            Equations
                                                                                                                            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₂ = true1 * Poly.denote ctx p₁ = Poly.denote ctx p₂Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                                                              noncomputable def Lean.Grind.CommRing.Stepwise.imp_keq_cert (lhs rhs : Expr) (k : Int) (p₁ p₂ : Poly) :
                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                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₂ = truek * Poly.denote ctx p₁ = Poly.denote ctx p₂Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                                                                noncomputable def Lean.Grind.CommRing.Stepwise.core_certC (lhs rhs : Expr) (p : Poly) (c : Nat) :
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  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 = trueExpr.denote ctx lhs = Expr.denote ctx rhsPoly.denote ctx p = 0
                                                                                                                                  noncomputable def Lean.Grind.CommRing.Stepwise.superpose_certC (k₁ : Int) (m₁ : Mon) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (c : Nat) :
                                                                                                                                  Equations
                                                                                                                                  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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                                                    noncomputable def Lean.Grind.CommRing.Stepwise.mul_certC (p₁ : Poly) (k : Int) (p : Poly) (c : Nat) :
                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      def Lean.Grind.CommRing.Stepwise.mulC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                      mul_certC p₁ k p c = truePoly.denote ctx p₁ = 0Poly.denote ctx p = 0
                                                                                                                                      Equations
                                                                                                                                      • =
                                                                                                                                      Instances For
                                                                                                                                        noncomputable def Lean.Grind.CommRing.Stepwise.div_certC (p₁ : Poly) (k : Int) (p : Poly) (c : Nat) :
                                                                                                                                        Equations
                                                                                                                                        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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p = 0
                                                                                                                                          Equations
                                                                                                                                          • =
                                                                                                                                          Instances For
                                                                                                                                            noncomputable def Lean.Grind.CommRing.Stepwise.simp_certC (k₁ : Int) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (c : Nat) :
                                                                                                                                            Equations
                                                                                                                                            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 = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                                                              def Lean.Grind.CommRing.Stepwise.unsat_eqC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Int) :
                                                                                                                                              unsat_eq_certC p k c = truePoly.denote ctx p = 0False
                                                                                                                                              Equations
                                                                                                                                              • =
                                                                                                                                              Instances For
                                                                                                                                                noncomputable def Lean.Grind.CommRing.Stepwise.d_step1_certC (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (c : Nat) :
                                                                                                                                                Equations
                                                                                                                                                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 = truek * Poly.denote ctx init = Poly.denote ctx p₁Poly.denote ctx p₂ = 0k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Stepwise.d_stepk_certC (k₁ : Int) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (c : Nat) :
                                                                                                                                                  Equations
                                                                                                                                                  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 = truek * Poly.denote ctx init = Poly.denote ctx p₁Poly.denote ctx p₂ = 0↑(k₁ * k) * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Stepwise.imp_1eq_certC (lhs rhs : Expr) (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                    Equations
                                                                                                                                                    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 = true1 * Poly.denote ctx p₁ = Poly.denote ctx p₂Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Stepwise.imp_keq_certC (lhs rhs : Expr) (k : Int) (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                      Equations
                                                                                                                                                      Instances For
                                                                                                                                                        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 = truek * Poly.denote ctx p₁ = Poly.denote ctx p₂Expr.denote ctx lhs = Expr.denote ctx rhs

                                                                                                                                                        IntModule interface

                                                                                                                                                        theorem Lean.Grind.CommRing.Mon.denoteAsIntModule_go_eq_denote {α : Type u_1} [CommRing α] (ctx : Context α) (m : Mon) (acc : α) :
                                                                                                                                                        denoteAsIntModule.go ctx m acc = acc * denote ctx m
                                                                                                                                                        theorem Lean.Grind.CommRing.eq_norm {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert lhs rhs p = trueExpr.denote ctx lhs = Expr.denote ctx rhsPoly.denoteAsIntModule ctx p = 0
                                                                                                                                                        theorem Lean.Grind.CommRing.diseq_norm {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert lhs rhs p = trueExpr.denote ctx lhs Expr.denote ctx rhsPoly.denoteAsIntModule ctx p 0
                                                                                                                                                        theorem Lean.Grind.CommRing.le_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Preorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert lhs rhs p = trueExpr.denote ctx lhs Expr.denote ctx rhsPoly.denoteAsIntModule ctx p 0
                                                                                                                                                        theorem Lean.Grind.CommRing.lt_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Preorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert lhs rhs p = trueExpr.denote ctx lhs < Expr.denote ctx rhsPoly.denoteAsIntModule ctx p < 0
                                                                                                                                                        theorem Lean.Grind.CommRing.not_le_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [LinearOrder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert rhs lhs p = true¬Expr.denote ctx lhs Expr.denote ctx rhsPoly.denoteAsIntModule ctx p < 0
                                                                                                                                                        theorem Lean.Grind.CommRing.not_lt_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [LinearOrder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert rhs lhs p = true¬Expr.denote ctx lhs < Expr.denote ctx rhsPoly.denoteAsIntModule ctx p 0
                                                                                                                                                        theorem Lean.Grind.CommRing.not_le_norm' {α : Type u_1} [CommRing α] [LE α] [LT α] [Preorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        theorem Lean.Grind.CommRing.not_lt_norm' {α : Type u_1} [CommRing α] [LE α] [LT α] [Preorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                        Stepwise.core_cert lhs rhs p = true¬Expr.denote ctx lhs < Expr.denote ctx rhs¬Poly.denoteAsIntModule ctx p < 0
                                                                                                                                                        theorem Lean.Grind.CommRing.inv_int_eq {α : Type u_1} [Field α] [IsCharP α 0] (b : Int) :
                                                                                                                                                        (b != 0) = truedenoteInt b * (denoteInt b)⁻¹ = 1
                                                                                                                                                        theorem Lean.Grind.CommRing.inv_int_eqC {α : Type u_1} {c : Nat} [Field α] [IsCharP α c] (b : Int) :
                                                                                                                                                        (b % c != 0) = truedenoteInt b * (denoteInt b)⁻¹ = 1
                                                                                                                                                        theorem Lean.Grind.CommRing.inv_zero_eqC {α : Type u_1} {c : Nat} [Field α] [IsCharP α c] (b : Int) :
                                                                                                                                                        (b % c == 0) = true(denoteInt b)⁻¹ = 0
                                                                                                                                                        theorem Lean.Grind.CommRing.inv_split {α : Type u_1} [Field α] (a : α) :
                                                                                                                                                        if a = 0 then a⁻¹ = 0 else a * a⁻¹ = 1
                                                                                                                                                        theorem Lean.Grind.CommRing.diseq_to_eq {α : Type u_1} [Field α] (a b : α) :
                                                                                                                                                        a b → (a - b) * (a - b)⁻¹ = 1
                                                                                                                                                        theorem Lean.Grind.CommRing.diseq0_to_eq {α : Type u_1} [Field α] (a : α) :
                                                                                                                                                        a 0a * a⁻¹ = 1

                                                                                                                                                        normEq0 helper theorems

                                                                                                                                                        theorem Lean.Grind.CommRing.Poly.normEq0_eq {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (c : Nat) (h : c = 0) :
                                                                                                                                                        denote ctx (p.normEq0 c) = denote ctx p
                                                                                                                                                        noncomputable def Lean.Grind.CommRing.eq_normEq0_cert (c : Nat) (p₁ p₂ p : Poly) :
                                                                                                                                                        Equations
                                                                                                                                                        Instances For
                                                                                                                                                          theorem Lean.Grind.CommRing.eq_normEq0 {α : Type u_1} [CommRing α] (ctx : Context α) (c : Nat) (p₁ p₂ p : Poly) :
                                                                                                                                                          eq_normEq0_cert c p₁ p₂ p = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                                                                          theorem Lean.Grind.CommRing.gcd_eq_0 {α : Type u_1} [CommRing α] (g n m a b : Int) (h : g = a * n + b * m) (h₁ : n = 0) (h₂ : m = 0) :
                                                                                                                                                          g = 0
                                                                                                                                                          theorem Lean.Grind.CommRing.eq_gcd {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Int) (p₁ p₂ p : Poly) :
                                                                                                                                                          eq_gcd_cert a b p₁ p₂ p = truePoly.denote ctx p₁ = 0Poly.denote ctx p₂ = 0Poly.denote ctx p = 0
                                                                                                                                                          noncomputable def Lean.Grind.CommRing.d_normEq0_cert (c : Nat) (p₁ p₂ p : Poly) :
                                                                                                                                                          Equations
                                                                                                                                                          Instances For
                                                                                                                                                            theorem Lean.Grind.CommRing.d_normEq0 {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (c : Nat) (init p₁ p₂ p : Poly) :
                                                                                                                                                            d_normEq0_cert c p₁ p₂ p = truek * Poly.denote ctx init = Poly.denote ctx p₁Poly.denote ctx p₂ = 0k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                            noncomputable def Lean.Grind.CommRing.norm_int_cert (e : Expr) (p : Poly) :
                                                                                                                                                            Equations
                                                                                                                                                            Instances For