Documentation

Init.Grind.Ring.CommSolver

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.

@[reducible, inline]
Equations
Instances For
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[reducible, inline]
        Equations
        Instances For
          @[inline]
          abbrev Lean.Grind.CommRing.Var.denote {α : Type u_1} (ctx : Context α) (v : Var) :
          α
          Equations
          Instances For
            @[inline]
            noncomputable abbrev Lean.Grind.CommRing.denoteInt {α : Type u_1} [Ring α] (k : Int) :
            α
            Equations
            Instances For
              @[inline]
              noncomputable abbrev 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
                  Equations
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def Lean.Grind.CommRing.Power.beq' (pw₁ pw₂ : Power) :
                      Equations
                      Instances For
                        @[simp]
                        theorem Lean.Grind.CommRing.Power.beq'_eq (pw₁ pw₂ : Power) :
                        (pw₁.beq' pw₂ = true) = (pw₁ = pw₂)
                        Equations
                        Instances For
                          @[inline]
                          abbrev Lean.Grind.CommRing.Power.denote {α : Type u_1} [Semiring α] (ctx : Context α) :
                          Power → α
                          Equations
                          Instances For
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                noncomputable def Lean.Grind.CommRing.Mon.beq' (m₁ : Mon) :
                                Mon → Bool
                                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
                                    Equations
                                    Instances For
                                      Equations
                                      Instances For
                                        def Lean.Grind.CommRing.Mon.mul.go (fuel : Nat) (m₁ m₂ : Mon) :
                                        Equations
                                        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.

                                          noncomputable def Lean.Grind.CommRing.Mon.mul_k (m₁ : Mon) :
                                          Mon → Mon
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            theorem Lean.Grind.CommRing.Mon.mul_k_eq_mul_go (fuel : Nat) (m₁ m₂ : Mon) (h : m₁.length + m₂.length < fuel) :
                                            m₁.mul_k m₂ = mul.go fuel m₁ m₂
                                            @[simp]
                                            theorem Lean.Grind.CommRing.Mon.mul_k_eq_mul (m₁ m₂ : Mon) :
                                            m₁.mul_k m₂ = m₁.mul m₂
                                            noncomputable def Lean.Grind.CommRing.Mon.degree_k (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
                                                        Instances For
                                                          noncomputable def Lean.Grind.CommRing.Mon.revlex_k (m₁ : Mon) :
                                                          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_revlexWF (m₁ m₂ : Mon) :
                                                              m₁.revlex_k m₂ = m₁.revlexWF m₂
                                                              theorem Lean.Grind.CommRing.Mon.revlexFuel_eq_revlexWF (fuel : Nat) (m₁ m₂ : Mon) :
                                                              revlexFuel fuel m₁ m₂ = m₁.revlexWF m₂
                                                              @[simp]
                                                              theorem Lean.Grind.CommRing.Mon.revlex_k_eq_revlex (m₁ m₂ : Mon) :
                                                              m₁.revlex_k m₂ = m₁.revlex m₂
                                                              @[simp]
                                                              theorem Lean.Grind.CommRing.Mon.grevlex_k_eq_grevlex (m₁ m₂ : Mon) :
                                                              m₁.grevlex_k m₂ = m₁.grevlex m₂
                                                              Instances For
                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                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₂)
                                                                    @[inline]
                                                                    abbrev Lean.Grind.CommRing.denoteTerm {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                    α
                                                                    Equations
                                                                    Instances For
                                                                      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]
                                                                                      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.combine_k (p₁ : Poly) :
                                                                                            Equations
                                                                                            • One or more equations did not get rendered due to their size.
                                                                                            Instances For
                                                                                              theorem Lean.Grind.CommRing.Poly.combine_k_eq_combine_go (fuel : Nat) (p₁ p₂ : Poly) (h : p₁.length + p₂.length < fuel) :
                                                                                              p₁.combine_k p₂ = combine.go fuel p₁ p₂
                                                                                              @[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
                                                                                                  noncomputable def Lean.Grind.CommRing.Poly.mul_k (p₁ p₂ : Poly) :
                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For
                                                                                                    @[simp]
                                                                                                    theorem Lean.Grind.CommRing.Poly.mul_k_eq_mul (p₁ p₂ : Poly) :
                                                                                                    p₁.mul_k p₂ = p₁.mul p₂
                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.pow_k (p : Poly) (k : Nat) :
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      @[simp]
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        Equations
                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                        Instances For
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            Equations
                                                                                                            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
                                                                                                                          Equations
                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                          Instances For
                                                                                                                            def Lean.Grind.CommRing.Poly.mulMonC_nc.go (k : Int) (m : Mon) (c : Nat) (p acc : Poly) :
                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                def Lean.Grind.CommRing.Poly.mulC (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      Equations
                                                                                                                                      Instances For
                                                                                                                                        Equations
                                                                                                                                        Instances For

                                                                                                                                          Kernel-reduction variants of the definitions for the IsCharP case.

                                                                                                                                          noncomputable def Lean.Grind.CommRing.Poly.addConstC_k (p : Poly) (k : Int) (c : Nat) :
                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For
                                                                                                                                            noncomputable def Lean.Grind.CommRing.Poly.insertC_k.go (k : Int) (m : Mon) (c : Nat) (p : Poly) :
                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For
                                                                                                                                              @[simp]
                                                                                                                                              theorem Lean.Grind.CommRing.Poly.insertC_k_eq_insertC (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                                                                                              insertC_k k m p c = insertC k m p c
                                                                                                                                              noncomputable def Lean.Grind.CommRing.Poly.mulConstC_k.go (k : Int) (c : Nat) (p : Poly) :
                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For
                                                                                                                                                noncomputable def Lean.Grind.CommRing.Poly.mulConstC_k (k : Int) (p : Poly) (c : Nat) :
                                                                                                                                                Equations
                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                Instances For
                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Poly.mulMonC_k.go (k : Int) (m : Mon) (c : Nat) (p : Poly) :
                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For
                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.mulMonC_k (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                                                                                                    Equations
                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                    Instances For
                                                                                                                                                      @[simp]
                                                                                                                                                      theorem Lean.Grind.CommRing.Poly.mulMonC_k_eq_mulMonC (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                                                                                                      mulMonC_k k m p c = mulMonC k m p c
                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.combineC_k (p₁ : Poly) (c : Nat) :
                                                                                                                                                      Equations
                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                      Instances For
                                                                                                                                                        @[simp]
                                                                                                                                                        theorem Lean.Grind.CommRing.Poly.combineC_k_eq_combineC (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                        p₁.combineC_k c p₂ = p₁.combineC p₂ c
                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Poly.mulC_k (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          @[simp]
                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.mulC_k_eq_mulC (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                          p₁.mulC_k p₂ c = p₁.mulC p₂ c
                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Poly.powC_k (p : Poly) (k c : Nat) :
                                                                                                                                                          Equations
                                                                                                                                                          Instances For
                                                                                                                                                            @[simp]
                                                                                                                                                            theorem Lean.Grind.CommRing.Poly.powC_k_eq_powC (p : Poly) (k c : Nat) :
                                                                                                                                                            p.powC_k k c = p.powC k c
                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Expr.toPolyC_k (e : Expr) (c : Nat) :
                                                                                                                                                            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.

                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Poly.insert_k.go (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                              Equations
                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                              Instances For
                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Poly.insert_k (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                                Equations
                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                Instances For
                                                                                                                                                                  @[simp]
                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Mon.mulPow_nc_k (pw : Power) (m : Mon) :
                                                                                                                                                                  Equations
                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                  Instances For
                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Mon.mul_nc_k (m₁ m₂ : Mon) :
                                                                                                                                                                    Equations
                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                    Instances For
                                                                                                                                                                      @[simp]
                                                                                                                                                                      theorem Lean.Grind.CommRing.Mon.mul_nc_k_eq_mul_nc (m₁ m₂ : Mon) :
                                                                                                                                                                      m₁.mul_nc_k m₂ = m₁.mul_nc m₂
                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.mulMon_nc_k.go (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For
                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Poly.mulMon_nc_k (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        Instances For
                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Poly.mul_nc_k (p₁ p₂ : Poly) :
                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For
                                                                                                                                                                            @[simp]
                                                                                                                                                                            theorem Lean.Grind.CommRing.Poly.mul_nc_k_eq_mul_nc (p₁ p₂ : Poly) :
                                                                                                                                                                            p₁.mul_nc_k p₂ = p₁.mul_nc p₂
                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Poly.pow_nc_k (p : Poly) (k : Nat) :
                                                                                                                                                                            Equations
                                                                                                                                                                            Instances For
                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For
                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Poly.mulMonC_nc_k.go (k : Int) (m : Mon) (c : Nat) (p : Poly) :
                                                                                                                                                                                Equations
                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                Instances For
                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Poly.mulMonC_nc_k (k : Int) (m : Mon) (p : Poly) (c : Nat) :
                                                                                                                                                                                  Equations
                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    @[simp]
                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.mulC_nc_k (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                                                    Equations
                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                    Instances For
                                                                                                                                                                                      @[simp]
                                                                                                                                                                                      theorem Lean.Grind.CommRing.Poly.mulC_nc_k_eq_mulC_nc (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                                                      p₁.mulC_nc_k p₂ c = p₁.mulC_nc p₂ c
                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.powC_nc_k (p : Poly) (k c : Nat) :
                                                                                                                                                                                      Equations
                                                                                                                                                                                      Instances For
                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Expr.toPolyC_nc_k (e : Expr) (c : Nat) :
                                                                                                                                                                                        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.

                                                                                                                                                                                          theorem Lean.Grind.CommRing.denoteInt_eq {α : Type u_1} [Ring α] (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_mulPow_nc {α : Type u_1} [Semiring α] (ctx : Context α) (p : Power) (m : Mon) :
                                                                                                                                                                                          denote ctx (mulPow_nc 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.Mon.denote_mul_nc {α : Type u_1} [Semiring α] (ctx : Context α) (m₁ m₂ : Mon) :
                                                                                                                                                                                          denote ctx (m₁.mul_nc m₂) = denote ctx m₁ * denote ctx m₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.eq_of_powerRevlex {k₁ k₂ : Nat} :
                                                                                                                                                                                          powerRevlex k₁ k₂ = Ordering.eq → k₁ = k₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.eq_of_revlexWF {m₁ m₂ : Mon} :
                                                                                                                                                                                          m₁.revlexWF m₂ = Ordering.eq → m₁ = m₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.eq_of_revlexFuel {fuel : Nat} {m₁ m₂ : Mon} :
                                                                                                                                                                                          revlexFuel fuel m₁ m₂ = Ordering.eq → m₁ = m₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.eq_of_revlex {m₁ m₂ : Mon} :
                                                                                                                                                                                          m₁.revlex m₂ = Ordering.eq → m₁ = m₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.eq_of_grevlex {m₁ m₂ : Mon} :
                                                                                                                                                                                          m₁.grevlex m₂ = Ordering.eq → m₁ = m₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denoteTerm_eq {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                                                                                                                                          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} [Ring α] (ctx : Context α) (m : Mon) :
                                                                                                                                                                                          denote ctx (ofMon m) = Mon.denote ctx m
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_ofVar {α : Type u_1} [Ring α] (ctx : Context α) (x : Var) :
                                                                                                                                                                                          denote ctx (ofVar x) = Var.denote ctx x
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_addConst {α : Type u_1} [Ring α] (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} [Ring α] (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} [Ring α] (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} [Ring α] (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_mulMon_nc_go {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) (p acc : Poly) :
                                                                                                                                                                                          denote ctx (mulMon_nc.go k m p acc) = ↑k * Mon.denote ctx m * denote ctx p + denote ctx acc
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_mulMon_nc {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                                                          denote ctx (mulMon_nc k m p) = ↑k * Mon.denote ctx m * denote ctx p
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_combine {α : Type u_1} [Ring α] (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_mul_nc_go {α : Type u_1} [Ring α] (ctx : Context α) (p₁ p₂ acc : Poly) :
                                                                                                                                                                                          denote ctx (mul_nc.go p₂ p₁ acc) = denote ctx acc + denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_mul_nc {α : Type u_1} [Ring α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                          denote ctx (p₁.mul_nc 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.Poly.denote_pow_nc {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                                                                                                          denote ctx (p.pow_nc 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.denote_toPoly_nc {α : Type u_1} [Ring α] (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_k.beq' b.toPoly_k = true) :
                                                                                                                                                                                          denote ctx a = denote ctx b
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Expr.eq_of_toPoly_nc_eq {α : Type u_1} [Ring α] (ctx : Context α) (a b : Expr) (h : a.toPoly_nc_k.beq' b.toPoly_nc_k = true) :
                                                                                                                                                                                          denote ctx a = denote ctx b
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.denote_cancelVar {α : Type u_1} [CommSemiring α] (ctx : Context α) (m : Mon) (x : Var) :
                                                                                                                                                                                          denote ctx m = Var.denote ctx x ^ m.degreeOf x * denote ctx (m.cancelVar x)
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_cancelVar' {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (c : Int) (x : Var) (acc : Poly) :
                                                                                                                                                                                          c ≠ 0 → ↑c * Var.denote ctx x = 1 → denote ctx (cancelVar' c x p acc) = denote ctx p + denote ctx acc
                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_cancelVar {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (c : Int) (x : Var) :
                                                                                                                                                                                          c ≠ 0 → ↑c * Var.denote ctx x = 1 → denote ctx (cancelVar c x p) = denote ctx p

                                                                                                                                                                                          Kernel-reduction variants of Mon.degreeOf, Mon.cancelVar and Poly.cancelVar.

                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Mon.degreeOf_k (m : Mon) (x : Var) :
                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Mon.cancelVar_k (m : Mon) (x : Var) :
                                                                                                                                                                                            Equations
                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                            Instances For
                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Poly.cancelVar_k (c : Int) (x : Var) (p : Poly) :
                                                                                                                                                                                              Equations
                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                              Instances For
                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.cancel_var_cert (c : Int) (x : Var) (p₁ p₂ : Poly) :
                                                                                                                                                                                                Equations
                                                                                                                                                                                                Instances For
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.eq_cancel_var {α : Type u_1} [CommRing α] (ctx : Context α) (c : Int) (x : Var) (p₁ p₂ : Poly) :
                                                                                                                                                                                                  cancel_var_cert c x p₁ p₂ = true → ↑c * Var.denote ctx x = 1 → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.diseq_cancel_var {α : Type u_1} [CommRing α] (ctx : Context α) (c : Int) (x : Var) (p₁ p₂ : Poly) :
                                                                                                                                                                                                  cancel_var_cert c x p₁ p₂ = true → ↑c * Var.denote ctx x = 1 → Poly.denote ctx p₁ ≠ 0 → Poly.denote ctx p₂ ≠ 0
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.le_cancel_var {α : Type u_1} [CommRing α] [LE α] (ctx : Context α) (c : Int) (x : Var) (p₁ p₂ : Poly) :
                                                                                                                                                                                                  cancel_var_cert c x p₁ p₂ = true → ↑c * Var.denote ctx x = 1 → Poly.denote ctx p₁ ≤ 0 → Poly.denote ctx p₂ ≤ 0
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.lt_cancel_var {α : Type u_1} [CommRing α] [LT α] (ctx : Context α) (c : Int) (x : Var) (p₁ p₂ : Poly) :
                                                                                                                                                                                                  cancel_var_cert c x p₁ p₂ = true → ↑c * Var.denote ctx x = 1 → Poly.denote ctx p₁ < 0 → Poly.denote ctx p₂ < 0

                                                                                                                                                                                                  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} [Ring α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Int) :
                                                                                                                                                                                                  denote ctx (p.addConstC k c) = denote ctx p + ↑k
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulConstC {α : Type u_1} {c : Nat} [Ring α] [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_mulMonC_nc_go {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (k : Int) (m : Mon) (p acc : Poly) :
                                                                                                                                                                                                  denote ctx (mulMonC_nc.go k m c p acc) = ↑k * Mon.denote ctx m * denote ctx p + denote ctx acc
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulMonC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (k : Int) (m : Mon) (p : Poly) :
                                                                                                                                                                                                  denote ctx (mulMonC_nc k m p c) = ↑k * Mon.denote ctx m * denote ctx p
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_combineC {α : Type u_1} {c : Nat} [Ring α] [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_mulC_nc_go {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (p₁ p₂ acc : Poly) :
                                                                                                                                                                                                  denote ctx (mulC_nc.go p₂ c p₁ acc) = denote ctx acc + denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                                  denote ctx (p₁.mulC_nc 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.Poly.denote_powC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                                                                                                                  denote ctx (p.powC_nc 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.denote_toPolyC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (e : Expr) :
                                                                                                                                                                                                  Poly.denote ctx (e.toPolyC_nc 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_k c).beq' (b.toPolyC_k c) = true) :
                                                                                                                                                                                                  denote ctx a = denote ctx b
                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Expr.eq_of_toPolyC_nc_eq {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (a b : Expr) (h : (a.toPolyC_nc_k c).beq' (b.toPolyC_nc_k c) = true) :
                                                                                                                                                                                                  denote ctx a = denote ctx b

                                                                                                                                                                                                  Expr spelling of a polynomial: the left-associated sum of its terms, as in Poly.denote'.

                                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Mon.toExpr_k.go (m : Mon) :
                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Mon.toExpr_k (m : Mon) :
                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.toExpr_k.go (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
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Power.denote_toExpr {α : Type u_1} [Ring α] (ctx : Context α) (pw : Power) :
                                                                                                                                                                                                          Expr.denote ctx pw.toExpr = denote ctx pw
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.denote_toExpr_go {α : Type u_1} [Ring α] (ctx : Context α) (m : Mon) (acc : Expr) :
                                                                                                                                                                                                          Expr.denote ctx (toExpr.go m acc) = Expr.denote ctx acc * denote ctx m
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.denote_toExpr {α : Type u_1} [Ring α] (ctx : Context α) (m : Mon) :
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_toExpr_goTerm {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_toExpr_go {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) (acc : Expr) :
                                                                                                                                                                                                          Expr.denote ctx (toExpr.go p acc) = Expr.denote ctx acc + denote ctx p
                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_toExpr {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) :

                                                                                                                                                                                                          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.

                                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Poly.pairs_k (f : Poly → Poly → Poly) (ps : List Poly) :

                                                                                                                                                                                                          One level of pairwise additions with f, with pend the pending first summand of a pair.

                                                                                                                                                                                                          Equations
                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Poly.foldr_k (f : Poly → Poly → Poly) (ps : List Poly) :

                                                                                                                                                                                                            Adds ps with f from the right.

                                                                                                                                                                                                            Equations
                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Poly.sumGo_k (f : Poly → Poly → Poly) (fuel : List Poly) :

                                                                                                                                                                                                              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
                                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Poly.mulTerms_k (p₁ p₂ : Poly) :

                                                                                                                                                                                                                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
                                                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Poly.isMon_k (p : Poly) :

                                                                                                                                                                                                                  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
                                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.mulByMon_k (p q : Poly) :

                                                                                                                                                                                                                    q multiplied by the first monomial of p.

                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.mulB_k (p₁ p₂ : Poly) :

                                                                                                                                                                                                                      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
                                                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Poly.powB_k (p : Poly) (k : Nat) :
                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Expr.powLeafB_k (a : Expr) (k : Nat) (p : Poly) :

                                                                                                                                                                                                                          The polynomial of a ^ k, where p is the polynomial of a.

                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Poly.signB_k (p : Poly) (s : Bool) :

                                                                                                                                                                                                                            p, negated if s.

                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Expr.sumsB_k (e : Expr) :

                                                                                                                                                                                                                              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
                                                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Expr.toPolyX_k (bal : Bool) (e : Expr) :

                                                                                                                                                                                                                                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
                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denoteList_pairs_k {α : Type u_1} [CommRing α] (ctx : Context α) (f : Poly → Poly → Poly) (hf : ∀ (a b : Poly), denote ctx (f a b) = denote ctx a + denote ctx b) (ps : List Poly) (pend : Option Poly) :
                                                                                                                                                                                                                                  denoteList ctx (pairs_k f ps pend) = Option.rec 0 (fun (p : Poly) => denote ctx p) pend + denoteList ctx ps
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_foldr_k {α : Type u_1} [CommRing α] (ctx : Context α) (f : Poly → Poly → Poly) (hf : ∀ (a b : Poly), denote ctx (f a b) = denote ctx a + denote ctx b) (ps : List Poly) :
                                                                                                                                                                                                                                  denote ctx (foldr_k f ps) = denoteList ctx ps
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_sumGo_k {α : Type u_1} [CommRing α] (ctx : Context α) (f : Poly → Poly → Poly) (hf : ∀ (a b : Poly), denote ctx (f a b) = denote ctx a + denote ctx b) (fuel ps : List Poly) :
                                                                                                                                                                                                                                  denote ctx (sumGo_k f fuel ps) = denoteList ctx ps
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_sumB_k {α : Type u_1} [CommRing α] (ctx : Context α) (f : Poly → Poly → Poly) (hf : ∀ (a b : Poly), denote ctx (f a b) = denote ctx a + denote ctx b) (ps : List Poly) :
                                                                                                                                                                                                                                  denote ctx (sumB_k f ps) = denoteList ctx ps
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_combine_k {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Poly) :
                                                                                                                                                                                                                                  denote ctx (a.combine_k b) = denote ctx a + denote ctx b
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denoteList_mulTerms_k {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                                                                  denoteList ctx (p₁.mulTerms_k p₂) = denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulByMon_k {α : Type u_1} [CommRing α] (ctx : Context α) {p : Poly} (q : Poly) (h : p.isMon_k = true) :
                                                                                                                                                                                                                                  denote ctx (p.mulByMon_k q) = denote ctx p * denote ctx q
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_mulB_k {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                                                                  denote ctx (p₁.mulB_k p₂) = denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_powB_k {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                                                                                                                                                  denote ctx (p.powB_k k) = denote ctx p ^ k
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Expr.denote_powLeafB_k {α : Type u_1} [CommRing α] (ctx : Context α) (a : Expr) (k : Nat) (p : Poly) (h : Poly.denote ctx p = denote ctx a) :
                                                                                                                                                                                                                                  Poly.denote ctx (a.powLeafB_k k p) = denote ctx a ^ k
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Poly.denote_signB_k {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) (s : Bool) :
                                                                                                                                                                                                                                  denote ctx (p.signB_k s) = bif s then -denote ctx p else denote ctx p
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Expr.denoteList_sumsB_k {α : Type u_1} [CommRing α] (ctx : Context α) (e : Expr) (s : Bool) (acc : List Poly) :
                                                                                                                                                                                                                                  Poly.denoteList ctx (e.sumsB_k s acc) = (bif s then -denote ctx e else denote ctx e) + Poly.denoteList ctx acc
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Expr.denote_toPolyX_k {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (e : Expr) :
                                                                                                                                                                                                                                  Poly.denote ctx (toPolyX_k bal e) = denote ctx e
                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Expr.eq_of_toPolyX_eq_toExpr {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (a b : Expr) (p : Poly) (h₁ : p = toPolyX_k bal a) (h₂ : b = p.toExpr_k) :
                                                                                                                                                                                                                                  denote ctx a = denote ctx b

                                                                                                                                                                                                                                  Balanced polynomial normalization in a ring of characteristic c, like Expr.toPolyB_k.

                                                                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Poly.mulTermsC_k (p₁ p₂ : Poly) (c : Nat) :
                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.mulByMonC_k (p q : Poly) (c : Nat) :

                                                                                                                                                                                                                                    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
                                                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.mulBC_k (p₁ p₂ : Poly) (c : Nat) :

                                                                                                                                                                                                                                      Poly.mulB_k in characteristic c.

                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Poly.powBC_k (p : Poly) (k c : Nat) :
                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Expr.powLeafBC_k (a : Expr) (k c : Nat) (p : Poly) :

                                                                                                                                                                                                                                          The polynomial of a ^ k in characteristic c, where p is the polynomial of a.

                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.Poly.signBC_k (p : Poly) (c : Nat) (s : Bool) :

                                                                                                                                                                                                                                            p, negated in characteristic c if s.

                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Expr.sumsBC_k (e : Expr) (c : Nat) :

                                                                                                                                                                                                                                              Expr.sumsB_k in characteristic c.

                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Expr.toPolyBC_k (e : Expr) (c : Nat) :
                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.Expr.toPolyXC_k (bal : Bool) (e : Expr) (c : Nat) :

                                                                                                                                                                                                                                                  Expr.toPolyBC_k if bal, and Expr.toPolyC_k otherwise.

                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denote_combineC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a b : Poly) :
                                                                                                                                                                                                                                                    denote ctx (a.combineC_k c b) = denote ctx a + denote ctx b
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denoteList_mulTermsC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                                                                                    denoteList ctx (p₁.mulTermsC_k p₂ c) = denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denote_mulByMonC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) {p : Poly} (q : Poly) (h : p.isMon_k = true) :
                                                                                                                                                                                                                                                    denote ctx (p.mulByMonC_k q c) = denote ctx p * denote ctx q
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denote_mulBC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ p₂ : Poly) :
                                                                                                                                                                                                                                                    denote ctx (p₁.mulBC_k p₂ c) = denote ctx p₁ * denote ctx p₂
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denote_powBC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p : Poly) (k : Nat) :
                                                                                                                                                                                                                                                    denote ctx (p.powBC_k k c) = denote ctx p ^ k
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Expr.denote_powLeafBC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a : Expr) (k : Nat) (p : Poly) (h : Poly.denote ctx p = denote ctx a) :
                                                                                                                                                                                                                                                    Poly.denote ctx (a.powLeafBC_k k c p) = denote ctx a ^ k
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Poly.denote_signBC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p : Poly) (s : Bool) :
                                                                                                                                                                                                                                                    denote ctx (p.signBC_k c s) = bif s then -denote ctx p else denote ctx p
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Expr.denoteList_sumsBC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (e : Expr) (s : Bool) (acc : List Poly) :
                                                                                                                                                                                                                                                    Poly.denoteList ctx (e.sumsBC_k c s acc) = (bif s then -denote ctx e else denote ctx e) + Poly.denoteList ctx acc
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Expr.denote_toPolyXC_k {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal : Bool) (e : Expr) :
                                                                                                                                                                                                                                                    Poly.denote ctx (toPolyXC_k bal e c) = denote ctx e
                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.Expr.eq_of_toPolyC_eq_toExpr {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal : Bool) (a b : Expr) (p : Poly) (h₁ : p = toPolyXC_k bal a c) (h₂ : b = p.toExpr_k) :
                                                                                                                                                                                                                                                    denote ctx a = denote ctx b

                                                                                                                                                                                                                                                    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.

                                                                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.Poly.mergeHead (norm : Int → Int) (c : Bool) (k : Int) (m : Mon) (a : Poly) (cont : Poly → Poly) :

                                                                                                                                                                                                                                                    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
                                                                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Poly.skipThen (n : Nat) (a : Poly) (f : Poly → Poly) :

                                                                                                                                                                                                                                                      skipThen n a f keeps the first n monomials of a and applies f to the rest.

                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Poly.mergeHintG (norm : Int → Int) (addK : Poly → Int → Poly) (comb : Poly → Poly → Poly) (hs : List Nat) :
                                                                                                                                                                                                                                                        Poly → Poly → Poly

                                                                                                                                                                                                                                                        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 / 2 monomials of the remaining part of a are kept, since they are greater than m;
                                                                                                                                                                                                                                                        • if c = h % 2 is 1, the next monomial of a is k₁*m, and the two are added into norm (k₁ + k) * m, which is dropped if its coefficient is zero;
                                                                                                                                                                                                                                                        • if c is 0, k*m is inserted before the next monomial of a.

                                                                                                                                                                                                                                                        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 + 1 keeps 5*x³ and adds 3*x² to 2*x², giving 5*x²;
                                                                                                                                                                                                                                                        • 0 = 2*0 + 0 inserts 4*x before the constant 7;
                                                                                                                                                                                                                                                        • the constant 1 of b is added to 7.

                                                                                                                                                                                                                                                        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
                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_skipThen {α : Type u_1} [Ring α] (ctx : Context α) (f : Poly → Poly) (X : α) (hf : ∀ (a : Poly), denote ctx (f a) = denote ctx a + X) (n : Nat) (a : Poly) :
                                                                                                                                                                                                                                                          denote ctx (skipThen n a f) = denote ctx a + X
                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_mergeHead {α : Type u_1} [Ring α] (ctx : Context α) (norm : Int → Int) (hn : ∀ (k : Int), ↑(norm k) = ↑k) (cont : Poly → Poly) (Y : α) (hcont : ∀ (a : Poly), denote ctx (cont a) = denote ctx a + Y) (c : Bool) (k : Int) (m : Mon) (a : Poly) :
                                                                                                                                                                                                                                                          denote ctx (mergeHead norm c k m a cont) = denote ctx a + (k • Mon.denote ctx m + Y)
                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Poly.denote_mergeHintG {α : Type u_1} [Ring α] (ctx : Context α) (norm : Int → Int) (addK : Poly → Int → Poly) (comb : Poly → Poly → Poly) (hn : ∀ (k : Int), ↑(norm k) = ↑k) (ha : ∀ (a : Poly) (k : Int), denote ctx (addK a k) = denote ctx a + ↑k) (hc : ∀ (a b : Poly), denote ctx (comb a b) = denote ctx a + denote ctx b) (hs : List Nat) (a b : Poly) :
                                                                                                                                                                                                                                                          denote ctx (mergeHintG norm addK comb hs a b) = denote ctx a + denote ctx b
                                                                                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.Poly.mergeHintC (c : Nat) (hs : List Nat) (a b : Poly) :
                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                            theorem Lean.Grind.CommRing.Poly.denote_mergeHint {α : Type u_1} [Ring α] (ctx : Context α) (hs : List Nat) (a b : Poly) :
                                                                                                                                                                                                                                                            denote ctx (mergeHint hs a b) = denote ctx a + denote ctx b
                                                                                                                                                                                                                                                            theorem Lean.Grind.CommRing.Poly.denote_mergeHintC {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (hs : List Nat) (a b : Poly) :
                                                                                                                                                                                                                                                            denote ctx (mergeHintC c hs a b) = denote ctx a + denote ctx b

                                                                                                                                                                                                                                                            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) :
                                                                                                                                                                                                                                                              p = (lhs.sub rhs).toPoly_k → Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              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) (hs : List Nat) :
                                                                                                                                                                                                                                                              p = Poly.mergeHint hs (Poly.mulMon_k k₁ m₁ p₁) (Poly.mulMon_k k₂ m₂ p₂) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.Stepwise.simp1 {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (hs : List Nat) :
                                                                                                                                                                                                                                                              p = Poly.mergeHint hs p₁ (Poly.mulMon_k k₂ m₂ p₂) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.Stepwise.simp {α : Type u_1} [CommRing α] (ctx : Context α) (k₁ : Int) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (hs : List Nat) :
                                                                                                                                                                                                                                                              p = Poly.mergeHint hs (Poly.mulConst_k k₁ p₁) (Poly.mulMon_k k₂ m₂ p₂) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.Stepwise.mul {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                              mul_cert p₁ k p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.Stepwise.eq_mul {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                              mul_cert p₁ k p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.Stepwise.mul_ne_cert (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Stepwise.diseq_mul {α : Type u_1} [CommRing α] [NoNatZeroDivisors α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                mul_ne_cert p₁ k p = true → Poly.denote ctx p₁ ≠ 0 → Poly.denote ctx p ≠ 0
                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Stepwise.inv {α : Type u_1} [CommRing α] (ctx : Context α) (p₁ p : Poly) :
                                                                                                                                                                                                                                                                mul_cert p₁ (-1) p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.Stepwise.div_cert (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Stepwise.div {α : Type u_1} [CommRing α] (ctx : Context α) [NoNatZeroDivisors α] (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                  div_cert p₁ k p = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Stepwise.unsat_eq {α : Type u_1} [CommRing α] (ctx : Context α) [IsCharP α 0] (p : Poly) (k : Int) :
                                                                                                                                                                                                                                                                  unsat_eq_cert p k = true → Poly.denote ctx p = 0 → False
                                                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.Stepwise.d_init {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                  ↑1 * Poly.denote ctx p = Poly.denote ctx p
                                                                                                                                                                                                                                                                  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) (hs : List Nat) :
                                                                                                                                                                                                                                                                  p = Poly.mergeHint hs p₁ (Poly.mulMon_k k₂ m₂ p₂) → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → Poly.denote ctx p₂ = 0 → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                                                                                                                                  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) (hs : List Nat) :
                                                                                                                                                                                                                                                                  p = Poly.mergeHint hs (Poly.mulConst_k k₁ p₁) (Poly.mulMon_k k₂ m₂ p₂) → ↑k * 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₂ = true → ↑1 * 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₂ = true → ↑k * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                                                                                                                                                                                                      theorem Lean.Grind.CommRing.Stepwise.coreC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                      p = (lhs.sub rhs).toPolyC_k c → Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                      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) (hs : List Nat) :
                                                                                                                                                                                                                                                                      p = Poly.mergeHintC c hs (Poly.mulMonC_k k₁ m₁ p₁ c) (Poly.mulMonC_k k₂ m₂ p₂ c) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.Stepwise.mul_certC (p₁ : Poly) (k : Int) (p : Poly) (c : Nat) :
                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                        theorem 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 = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.Stepwise.div_certC (p₁ : Poly) (k : Int) (p : Poly) (c : Nat) :
                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Stepwise.divC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) [NoNatZeroDivisors α] (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                          div_certC p₁ k p c = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Stepwise.simp1C {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (p₁ : Poly) (k₂ : Int) (m₂ : Mon) (p₂ p : Poly) (hs : List Nat) :
                                                                                                                                                                                                                                                                          p = Poly.mergeHintC c hs p₁ (Poly.mulMonC_k k₂ m₂ p₂ c) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                          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) (hs : List Nat) :
                                                                                                                                                                                                                                                                          p = Poly.mergeHintC c hs (Poly.mulConstC_k k₁ p₁ c) (Poly.mulMonC_k k₂ m₂ p₂ c) → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                          theorem 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 = true → Poly.denote ctx p = 0 → False
                                                                                                                                                                                                                                                                          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) (hs : List Nat) :
                                                                                                                                                                                                                                                                          p = Poly.mergeHintC c hs p₁ (Poly.mulMonC_k k₂ m₂ p₂ c) → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → Poly.denote ctx p₂ = 0 → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                                                                                                                                          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) (hs : List Nat) :
                                                                                                                                                                                                                                                                          p = Poly.mergeHintC c hs (Poly.mulConstC_k k₁ p₁ c) (Poly.mulMonC_k k₂ m₂ p₂ c) → ↑k * 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 = true → ↑1 * 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 = true → ↑k * 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 = true → Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.eq_int_module {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.diseq_norm {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                              Stepwise.core_cert lhs rhs p = true → Expr.denote ctx lhs ≠ Expr.denote ctx rhs → Poly.denote ctx p ≠ 0
                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.diseq_int_module {α : Type u_1} [CommRing α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.le_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                              Stepwise.core_cert lhs rhs p = true → Expr.denote ctx lhs ≤ Expr.denote ctx rhs → Poly.denote ctx p ≤ 0
                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.le_int_module {α : Type u_1} [CommRing α] [LE α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                              noncomputable def Lean.Grind.CommRing.mul_ineq_cert (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_mul {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                                mul_ineq_cert p₁ k p = true → Poly.denote ctx p₁ ≤ 0 → Poly.denote ctx p ≤ 0
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                                Stepwise.core_cert lhs rhs p = true → Expr.denote ctx lhs < Expr.denote ctx rhs → Poly.denote ctx p < 0
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_int_module {α : Type u_1} [CommRing α] [LT α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_mul {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (p₁ : Poly) (k : Int) (p : Poly) :
                                                                                                                                                                                                                                                                                mul_ineq_cert p₁ k p = true → Poly.denote ctx p₁ < 0 → Poly.denote ctx p < 0
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.not_le_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                                Stepwise.core_cert rhs lhs p = true → ¬Expr.denote ctx lhs ≤ Expr.denote ctx rhs → Poly.denote ctx p < 0
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.not_lt_norm {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                                Stepwise.core_cert rhs lhs p = true → ¬Expr.denote ctx lhs < Expr.denote ctx rhs → Poly.denote ctx p ≤ 0
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.inv_int_eq {α : Type u_1} [Field α] [IsCharP α 0] (b : Int) :
                                                                                                                                                                                                                                                                                (b != 0) = true → denoteInt b * (denoteInt b)⁻¹ = 1
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.inv_int_eq' {α : Type u_1} [Field α] [IsCharP α 0] (b : Int) :
                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.inv_int_eqC {α : Type u_1} {c : Nat} [Field α] [IsCharP α c] (b : Int) :
                                                                                                                                                                                                                                                                                (b % ↑c != 0) = true → denoteInt 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 ≠ 0 → a * 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 = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.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 = true → Poly.denote ctx p₁ = 0 → Poly.denote ctx p₂ = 0 → Poly.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 = true → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → Poly.denote ctx p₂ = 0 → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                                                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.norm_int_cert (e : Expr) (p : Poly) :
                                                                                                                                                                                                                                                                                    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.

                                                                                                                                                                                                                                                                                      @[inline]
                                                                                                                                                                                                                                                                                      noncomputable abbrev Lean.Grind.CommRing.Mon.denote'_k.go {α : Type u_1} [Semiring α] (ctx : Context α) (m : Mon) :
                                                                                                                                                                                                                                                                                      α → α
                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                        @[inline]
                                                                                                                                                                                                                                                                                        noncomputable abbrev Lean.Grind.CommRing.Mon.denote'_k {α : Type u_1} [Semiring α] (ctx : Context α) (m : Mon) :
                                                                                                                                                                                                                                                                                        α
                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.Mon.denote'_k_eq {α : Type u_1} [Semiring α] (ctx : Context α) (m : Mon) :
                                                                                                                                                                                                                                                                                          denote'_k ctx m = denote' ctx m
                                                                                                                                                                                                                                                                                          @[inline]
                                                                                                                                                                                                                                                                                          noncomputable abbrev Lean.Grind.CommRing.denoteTerm_k {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                                                                                                                                                                                                                                          α
                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                            theorem Lean.Grind.CommRing.denoteTerm_k_eq {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) :
                                                                                                                                                                                                                                                                                            denoteTerm_k ctx k m = denoteTerm ctx k m
                                                                                                                                                                                                                                                                                            @[inline]
                                                                                                                                                                                                                                                                                            noncomputable abbrev Lean.Grind.CommRing.Poly.denote'_k.go {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                                            α → α
                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                              @[inline]
                                                                                                                                                                                                                                                                                              noncomputable abbrev Lean.Grind.CommRing.Poly.denote'_k {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                                              α
                                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Poly.denote'_k_eq {α : Type u_1} [Ring α] (ctx : Context α) (p : Poly) :
                                                                                                                                                                                                                                                                                                denote'_k ctx p = denote' ctx p

                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.sub_eq_of_toExpr {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (a b a' b' : Expr) (p pa pb : Poly) (h₁ : p = Expr.toPolyX_k bal (a.sub b)) (h₂ : a' = pa.toExpr_k) (h₃ : b' = pb.toExpr_k) (h₄ : p = pa.combine_k (Poly.mulConst_k (Int.negSucc 0) pb)) :
                                                                                                                                                                                                                                                                                                Expr.denote ctx a - Expr.denote ctx b = Expr.denote ctx a' - Expr.denote ctx b'
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.sub_eq_of_toExprC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal : Bool) (a b a' b' : Expr) (p pa pb : Poly) (h₁ : p = Expr.toPolyXC_k bal (a.sub b) c) (h₂ : a' = pa.toExpr_k) (h₃ : b' = pb.toExpr_k) (h₄ : p = pa.combineC_k c (Poly.mulConstC_k (Int.negSucc 0) pb c)) :
                                                                                                                                                                                                                                                                                                Expr.denote ctx a - Expr.denote ctx b = Expr.denote ctx a' - Expr.denote ctx b'
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_norm_poly {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyX_k bal (lhs.sub rhs)) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = lp.combine_k (Poly.mulConst_k (Int.negSucc 0) rp)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_norm_polyC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyXC_k bal (lhs.sub rhs) c) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = lp.combineC_k c (Poly.mulConstC_k (Int.negSucc 0) rp c)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_norm_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyX_k bal (rhs.sub lhs)) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = rp.combine_k (Poly.mulConst_k (Int.negSucc 0) lp)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_norm_polyC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyXC_k bal (rhs.sub lhs) c) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = rp.combineC_k c (Poly.mulConstC_k (Int.negSucc 0) lp c)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_norm_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyX_k bal (rhs.sub lhs)) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = rp.combine_k (Poly.mulConst_k (Int.negSucc 0) lp)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_norm_polyC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' rhs' : Expr) (p lp rp : Poly) (h₁ : p = Expr.toPolyXC_k bal (rhs.sub lhs) c) (h₂ : lhs' = lp.toExpr_k) (h₃ : rhs' = rp.toExpr_k) (h₄ : p = rp.combineC_k c (Poly.mulConstC_k (Int.negSucc 0) lp c)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')

                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.sub_eq_of_toExpr0 {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal (lhs.sub rhs)) (h₂ : lhs' = p.toExpr_k) :
                                                                                                                                                                                                                                                                                                Expr.denote ctx lhs' = Expr.denote ctx lhs - Expr.denote ctx rhs
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_norm_poly0 {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal (lhs.sub rhs)) (h₂ : lhs' = p.toExpr_k) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx (Expr.num 0))
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_norm_poly0 {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal (lhs.sub rhs)) (h₂ : lhs' = p.toExpr_k) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx (Expr.num 0))
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_norm_poly0 {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs lhs' : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal (lhs.sub rhs)) (h₂ : lhs' = p.toExpr_k) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx (Expr.num 0))

                                                                                                                                                                                                                                                                                                Relations whose sides differ by a constant: the relation is True or False.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.sub_eq_of_toPolyX_k {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (k : Int) (h : Expr.toPolyX_k bal (lhs.sub rhs) = Poly.num k) :
                                                                                                                                                                                                                                                                                                Expr.denote ctx lhs - Expr.denote ctx rhs = ↑k

                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_false_of_sub {α : Type u_1} [CommRing α] [IsCharP α 0] (ctx : Context α) (lhs rhs : Expr) (k : Int) (h : Expr.denote ctx lhs - Expr.denote ctx rhs = ↑k) (hk : k.beqZero_k = false) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_true_of_sub {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (n : Nat) (h : Expr.denote ctx rhs - Expr.denote ctx lhs = ↑(Int.ofNat n)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_true_of_sub {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (n : Nat) (h : Expr.denote ctx rhs - Expr.denote ctx lhs = ↑(Int.ofNat (n + 1))) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_false_of_sub {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (n : Nat) (h : Expr.denote ctx lhs - Expr.denote ctx rhs = ↑(Int.ofNat (n + 1))) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_false_of_sub {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs : Expr) (n : Nat) (h : Expr.denote ctx lhs - Expr.denote ctx rhs = ↑(Int.ofNat n)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_false_of_poly {α : Type u_1} [CommRing α] [IsCharP α 0] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (k : Int) (h : Expr.toPolyX_k bal (lhs.sub rhs) = Poly.num k) (hk : k.beqZero_k = false) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_true_of_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (n : Nat) (h : Expr.toPolyX_k bal (rhs.sub lhs) = Poly.num (Int.ofNat n)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_true_of_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (n : Nat) (h : Expr.toPolyX_k bal (rhs.sub lhs) = Poly.num (Int.ofNat (n + 1))) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_false_of_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (n : Nat) (h : Expr.toPolyX_k bal (lhs.sub rhs) = Poly.num (Int.ofNat (n + 1))) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_false_of_poly {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (bal : Bool) (lhs rhs : Expr) (n : Nat) (h : Expr.toPolyX_k bal (lhs.sub rhs) = Poly.num (Int.ofNat n)) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = False

                                                                                                                                                                                                                                                                                                Relations whose sides have the same polynomial p: each side is checked against p alone.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_true_of_toPoly_eq {α : Type u_1} [CommRing α] (ctx : Context α) (bal₁ bal₂ : Bool) (lhs rhs : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal₁ lhs) (h₂ : p = Expr.toPolyX_k bal₂ rhs) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_true_of_toPolyC_eq {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal₁ bal₂ : Bool) (lhs rhs : Expr) (p : Poly) (h₁ : p = Expr.toPolyXC_k bal₁ lhs c) (h₂ : p = Expr.toPolyXC_k bal₂ rhs c) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_true_of_toPoly_eq {α : Type u_1} [CommRing α] [LE α] [Std.IsPreorder α] (ctx : Context α) (bal₁ bal₂ : Bool) (lhs rhs : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal₁ lhs) (h₂ : p = Expr.toPolyX_k bal₂ rhs) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_false_of_toPoly_eq {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (bal₁ bal₂ : Bool) (lhs rhs : Expr) (p : Poly) (h₁ : p = Expr.toPolyX_k bal₁ lhs) (h₂ : p = Expr.toPolyX_k bal₂ rhs) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = False

                                                                                                                                                                                                                                                                                                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.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_eq_of_toPolyX {α : Type u_1} [CommRing α] (ctx : Context α) (bal : Bool) (e : Expr) (p : Poly) (h : p = toPolyX_k bal e) :
                                                                                                                                                                                                                                                                                                denote ctx e = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_mul_of_terms {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Expr) (pa pb : Poly) (ts : List Poly) (p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (ht : ts = pa.mulTerms_k pb) (hp : p = Poly.sumB_k Poly.combine_k ts) :
                                                                                                                                                                                                                                                                                                denote ctx (a.mul b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_add_of {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Expr) (pa pb p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (hp : p = pa.combine_k pb) :
                                                                                                                                                                                                                                                                                                denote ctx (a.add b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_sub_of {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Expr) (pa pb p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (hp : p = pa.combine_k (Poly.mulConst_k (Int.negSucc 0) pb)) :
                                                                                                                                                                                                                                                                                                denote ctx (a.sub b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_pow_succ_of_terms {α : Type u_1} [CommRing α] (ctx : Context α) (a : Expr) (k : Nat) (pa q : Poly) (ts : List Poly) (p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hq : denote ctx (a.pow k) = Poly.denote ctx q) (ht : ts = pa.mulTerms_k q) (hp : p = Poly.sumB_k Poly.combine_k ts) :
                                                                                                                                                                                                                                                                                                denote ctx (a.pow (k + 1)) = Poly.denote ctx p

                                                                                                                                                                                                                                                                                                a ^ (k + 1) from a ^ k, multiplying by the polynomial pa of a.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_pow_one_of {α : Type u_1} [CommRing α] (ctx : Context α) (a : Expr) (pa : Poly) (ha : denote ctx a = Poly.denote ctx pa) :
                                                                                                                                                                                                                                                                                                denote ctx (a.pow 1) = Poly.denote ctx pa
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.eq_true_of_denote_eq {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) (h₁ : Expr.denote ctx lhs = Poly.denote ctx p) (h₂ : Expr.denote ctx rhs = Poly.denote ctx p) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs = Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_neg_of {α : Type u_1} [CommRing α] (ctx : Context α) (a : Expr) (pa p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hp : p = Poly.mulConst_k (Int.negSucc 0) pa) :
                                                                                                                                                                                                                                                                                                denote ctx a.neg = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.le_true_of_denote_eq {α : Type u_1} [CommRing α] [LE α] [Std.IsPreorder α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) (h₁ : Expr.denote ctx lhs = Poly.denote ctx p) (h₂ : Expr.denote ctx rhs = Poly.denote ctx p) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = True
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.lt_false_of_denote_eq {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (lhs rhs : Expr) (p : Poly) (h₁ : Expr.denote ctx lhs = Poly.denote ctx p) (h₂ : Expr.denote ctx rhs = Poly.denote ctx p) :
                                                                                                                                                                                                                                                                                                (Expr.denote ctx lhs < Expr.denote ctx rhs) = False
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.eq_of_denote_eq_toExpr {α : Type u_1} [CommRing α] (ctx : Context α) (a b : Expr) (p : Poly) (h₁ : denote ctx a = Poly.denote ctx p) (h₂ : b = p.toExpr_k) :
                                                                                                                                                                                                                                                                                                denote ctx a = denote ctx b

                                                                                                                                                                                                                                                                                                Stepwise certificates for large products in characteristic c, like Expr.denote_mul_of_terms.

                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_eq_of_toPolyXC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (bal : Bool) (e : Expr) (p : Poly) (h : p = toPolyXC_k bal e c) :
                                                                                                                                                                                                                                                                                                denote ctx e = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_mul_of_termsC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a b : Expr) (pa pb : Poly) (ts : List Poly) (p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (ht : ts = pa.mulTermsC_k pb c) (hp : p = Poly.sumB_k (fun (a b : Poly) => a.combineC_k c b) ts) :
                                                                                                                                                                                                                                                                                                denote ctx (a.mul b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_add_ofC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a b : Expr) (pa pb p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (hp : p = pa.combineC_k c pb) :
                                                                                                                                                                                                                                                                                                denote ctx (a.add b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_sub_ofC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a b : Expr) (pa pb p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hb : denote ctx b = Poly.denote ctx pb) (hp : p = pa.combineC_k c (Poly.mulConstC_k (Int.negSucc 0) pb c)) :
                                                                                                                                                                                                                                                                                                denote ctx (a.sub b) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_neg_ofC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a : Expr) (pa p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hp : p = Poly.mulConstC_k (Int.negSucc 0) pa c) :
                                                                                                                                                                                                                                                                                                denote ctx a.neg = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                theorem Lean.Grind.CommRing.Expr.denote_pow_succ_of_termsC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (a : Expr) (k : Nat) (pa q : Poly) (ts : List Poly) (p : Poly) (ha : denote ctx a = Poly.denote ctx pa) (hq : denote ctx (a.pow k) = Poly.denote ctx q) (ht : ts = pa.mulTermsC_k q c) (hp : p = Poly.sumB_k (fun (a b : Poly) => a.combineC_k c b) ts) :
                                                                                                                                                                                                                                                                                                denote ctx (a.pow (k + 1)) = Poly.denote ctx p
                                                                                                                                                                                                                                                                                                noncomputable def Lean.Grind.CommRing.norm_cnstr_cert (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.le_norm_expr {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                  norm_cnstr_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                  theorem Lean.Grind.CommRing.lt_norm_expr {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                  norm_cnstr_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                  noncomputable def Lean.Grind.CommRing.norm_eq_cert (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                                    theorem Lean.Grind.CommRing.eq_norm_expr {α : Type u_1} [CommRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                    norm_eq_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')

                                                                                                                                                                                                                                                                                                    Variants of the theorems above for rings with a nonzero characteristic c.

                                                                                                                                                                                                                                                                                                    noncomputable def Lean.Grind.CommRing.norm_eq_mulC_cert (lhs rhs lhs' rhs' : Expr) (k k' : Int) (c : Nat) :
                                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                                                      theorem Lean.Grind.CommRing.eq_norm_mul_exprC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) (k k' : Int) :
                                                                                                                                                                                                                                                                                                      norm_eq_mulC_cert lhs rhs lhs' rhs' k k' c = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')

                                                                                                                                                                                                                                                                                                      In characteristic c, an equation can be multiplied by k' when k * k' ≡ 1 modulo c.

                                                                                                                                                                                                                                                                                                      noncomputable def Lean.Grind.CommRing.norm_cnstr_nc_cert (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                                        theorem Lean.Grind.CommRing.le_norm_expr_nc {α : Type u_1} [Ring α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                        norm_cnstr_nc_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                        theorem Lean.Grind.CommRing.lt_norm_expr_nc {α : Type u_1} [Ring α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                        norm_cnstr_nc_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                        noncomputable def Lean.Grind.CommRing.norm_eq_nc_cert (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                                                          theorem Lean.Grind.CommRing.eq_norm_expr_nc {α : Type u_1} [Ring α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                          norm_eq_nc_cert lhs rhs lhs' rhs' = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                          noncomputable def Lean.Grind.CommRing.norm_cnstrC_nc_cert (lhs rhs lhs' rhs' : Expr) (c : Nat) :
                                                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                                                            theorem Lean.Grind.CommRing.le_norm_exprC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                            norm_cnstrC_nc_cert lhs rhs lhs' rhs' c = true → (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                            theorem Lean.Grind.CommRing.lt_norm_exprC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                            norm_cnstrC_nc_cert lhs rhs lhs' rhs' c = true → (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')
                                                                                                                                                                                                                                                                                                            noncomputable def Lean.Grind.CommRing.norm_eqC_nc_cert (lhs rhs lhs' rhs' : Expr) (c : Nat) :
                                                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.eq_norm_exprC_nc {α : Type u_1} {c : Nat} [Ring α] [IsCharP α c] (ctx : Context α) (lhs rhs lhs' rhs' : Expr) :
                                                                                                                                                                                                                                                                                                              norm_eqC_nc_cert lhs rhs lhs' rhs' c = true → (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')

                                                                                                                                                                                                                                                                                                              Helper theorems for quick normalization

                                                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.le_norm0 {α : Type u_1} [Ring α] [LE α] (lhs rhs : α) :
                                                                                                                                                                                                                                                                                                              (lhs ≤ rhs) = (lhs ≤ rhs + ↑0)
                                                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.lt_norm0 {α : Type u_1} [Ring α] [LT α] (lhs rhs : α) :
                                                                                                                                                                                                                                                                                                              (lhs < rhs) = (lhs < rhs + ↑0)
                                                                                                                                                                                                                                                                                                              theorem Lean.Grind.CommRing.eq_norm0 {α : Type u_1} [Ring α] (lhs rhs : α) :
                                                                                                                                                                                                                                                                                                              (lhs = rhs) = (lhs = rhs + ↑0)