Documentation

Init.Grind.Ring.Kronecker

Ring identities by Kronecker substitution.

Evaluating a polynomial with integer coefficients at the point xᵢ = X ^ (B ^ i) maps the monomial with packed code v to X ^ v. When B is larger than every degree and 2 * ‖p‖₁ < X, two polynomials with the same value are equal: the value written in base X has the coefficients as digits. So the kernel checks an identity a = b by evaluating a and b at the point, which is arithmetic on large natural numbers that it performs on literals directly, and by bounding the coefficients with Expr.majorant_k. The polynomials of a and b are not computed: they only appear in the proof (Expr.toPP_k).

The value of p at the point xᵢ = X ^ (B ^ i), where the monomial with code v is X ^ v.

Equations
Instances For

    The coefficient of the monomial with code c (the constant has code 0).

    Equations
    Instances For

      The sum of the absolute values of the coefficients.

      Equations
      Instances For

        p without its terms with code c.

        Equations
        Instances For

          p without the terms with code 0, and the other codes decremented.

          Equations
          Instances For
            theorem Lean.Grind.CommRing.PPoly.coeff_zero_of_kron (X : Int) (hX : 0 < X) (p : PPoly) (h : kron X p = 0) (hn : 2 * ↑p.norm1 < X) :
            coeff 0 p = 0 ∧ kron X p.shiftDown = 0

            The lowest base-X digit of the value of p is its constant coefficient.

            theorem Lean.Grind.CommRing.PPoly.coeff_eq_zero_of_kron (X : Int) (hX : 0 < X) (c : Nat) (p : PPoly) :
            kron X p = 0 → 2 * ↑p.norm1 < X → coeff c p = 0

            Base-X digits: if 2 * ‖p‖₁ < X and the value of p is 0, every coefficient is 0.

            theorem Lean.Grind.CommRing.PPoly.denote_removeCode {α : Type u_1} [Ring α] (f : Nat → α) (B c : Nat) (p : PPoly) :
            denote f B p = ↑(coeff c p) * monDenote f B 0 c + denote f B (removeCode c p)
            theorem Lean.Grind.CommRing.PPoly.denote_eq_zero_of_coeff {α : Type u_1} [Ring α] (f : Nat → α) (B n : Nat) (p : PPoly) :
            p.size ≤ n → (∀ (c : Nat), coeff c p = 0) → denote f B p = 0

            A polynomial whose coefficients are all 0 denotes 0, also when it repeats monomials.

            theorem Lean.Grind.CommRing.PPoly.monDenote_kron (X : Int) {B : Nat} (hB : 1 < B) (i v : Nat) :
            monDenote (fun (i : Nat) => X ^ B ^ i) B i v = X ^ (B ^ i * v)

            The packed monomial with code v at the point xᵢ = X ^ (B ^ i).

            theorem Lean.Grind.CommRing.PPoly.denote_kron (X : Int) {B : Nat} (hB : 1 < B) (p : PPoly) :
            denote (fun (i : Nat) => X ^ B ^ i) B p = kron X p
            theorem Lean.Grind.CommRing.PPoly.denote_append {α : Type u_1} [Ring α] (f : Nat → α) (B : Nat) (p q : PPoly) :
            denote f B (p.append q) = denote f B p + denote f B q
            theorem Lean.Grind.CommRing.PPoly.denote_neg {α : Type u_1} [Ring α] (f : Nat → α) (B : Nat) (p : PPoly) :
            denote f B p.neg = -denote f B p
            theorem Lean.Grind.CommRing.PPoly.denote_eq_of_kron {α : Type u_1} [Ring α] (f : Nat → α) (B : Nat) (X : Int) (hX : 0 < X) (p q : PPoly) (h : kron X p = kron X q) (hn : 2 * ↑(p.norm1 + q.norm1) < X) :
            denote f B p = denote f B q

            p and q denote the same, if they have the same value at the point and small coefficients.

            Bounds on the coefficients of the polynomials of Expr.toPP_k.

            theorem Lean.Grind.CommRing.PPoly.norm1_pairs_k (ps : List PPoly) (pend : Option PPoly) :
            norm1List (pairs_k ps pend) ≤ (pend.elim 0 fun (x : PPoly) => x.norm1) + norm1List ps
            theorem Lean.Grind.CommRing.PPoly.norm1_mulB_k (p₁ p₂ : PPoly) :
            (p₁.mulB_k p₂).norm1 ≤ p₁.norm1 * p₂.norm1

            An upper bound on ‖p‖₁ for the polynomial p of e: the value of e with the absolute values of its numerals at 1.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Lean.Grind.CommRing.Expr.norm1_powPP_k (B : Nat) (a : Expr) (k : Nat) (p : PPoly) (hp : p.norm1 ≤ a.majorant_k) :
              (powPP_k B a k p).norm1 ≤ a.majorant_k ^ k
              noncomputable def Lean.Grind.CommRing.Expr.kronEval_k (K B : Nat) (e : Expr) :

              The value of e at the point xᵢ = (2 ^ K) ^ (B ^ i).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Lean.Grind.CommRing.Expr.kronEval_k_eq (K B : Nat) (e : Expr) :
                kronEval_k K B e = denoteF (fun (i : Nat) => (2 ^ K) ^ B ^ i) e
                noncomputable def Lean.Grind.CommRing.Expr.kronOk_k (K : Nat) (a b : Expr) :

                Checks that 2 ^ K is larger than twice the coefficients of a and b.

                Equations
                Instances For
                  theorem Lean.Grind.CommRing.Expr.eq_of_kron {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : degOk_k B a b = true) (hK : kronOk_k K a b = true) (h : kronEval_k K B a = kronEval_k K B b) :
                  denote ctx a = denote ctx b
                  theorem Lean.Grind.CommRing.eq_true_of_kron {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                  theorem Lean.Grind.CommRing.le_true_of_kron {α : Type u_1} [CommRing α] [LE α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                  theorem Lean.Grind.CommRing.lt_false_of_kron {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                  theorem Lean.Grind.CommRing.Expr.eq_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : degSOk_k B a b = true) (hK : kronOk_k K a b = true) (h : kronEval_k K B a = kronEval_k K B b) :
                  denoteS ctx a = denoteS ctx b
                  theorem Lean.Grind.CommRing.eq_true_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                  theorem Lean.Grind.CommRing.le_true_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                  theorem Lean.Grind.CommRing.lt_false_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :

                  Semiring relations with a common part c of both sides: a = a' + c and b = b' + c are checked at the point, and c is cancelled, so it is never written as a term of the semiring.

                  theorem Lean.Grind.CommRing.eq_cancel_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K B : Nat) (a b a' b' c : Expr) (hB₁ : Expr.degSOk_k B a (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronEval_k K B a = Expr.kronEval_k K B (a'.add c)) (hB₂ : Expr.degSOk_k B b (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronEval_k K B b = Expr.kronEval_k K B (b'.add c)) :
                  (Expr.denoteS ctx a = Expr.denoteS ctx b) = (Expr.denoteS ctx a' = Expr.denoteS ctx b')
                  theorem Lean.Grind.CommRing.le_cancel_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K B : Nat) (a b a' b' c : Expr) (hB₁ : Expr.degSOk_k B a (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronEval_k K B a = Expr.kronEval_k K B (a'.add c)) (hB₂ : Expr.degSOk_k B b (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronEval_k K B b = Expr.kronEval_k K B (b'.add c)) :
                  theorem Lean.Grind.CommRing.lt_cancel_of_kronS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K B : Nat) (a b a' b' c : Expr) (hB₁ : Expr.degSOk_k B a (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronEval_k K B a = Expr.kronEval_k K B (a'.add c)) (hB₂ : Expr.degSOk_k B b (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronEval_k K B b = Expr.kronEval_k K B (b'.add c)) :
                  (Expr.denoteS ctx a < Expr.denoteS ctx b) = (Expr.denoteS ctx a' < Expr.denoteS ctx b')

                  Linear identities by evaluation at xᵢ = X ^ (i + 1): when every product has a constant factor (Expr.degB_k e ≤ 1), the monomials are the variables, and their codes can be i + 1 instead of B ^ i, so the values stay small for many variables (Expr.eq_of_kronLin).

                  def Lean.Grind.CommRing.PPoly.denoteG {α : Type u_1} [Ring α] (g : Nat → α) :
                  PPoly → α

                  p with the monomial with code v valued at g v.

                  Equations
                  Instances For
                    theorem Lean.Grind.CommRing.PPoly.denoteG_removeCode {α : Type u_1} [Ring α] (g : Nat → α) (hg : g 0 = 1) (c : Nat) (p : PPoly) :
                    denoteG g p = ↑(coeff c p) * g c + denoteG g (removeCode c p)
                    theorem Lean.Grind.CommRing.PPoly.denoteG_eq_zero_of_coeff {α : Type u_1} [Ring α] (g : Nat → α) (hg : g 0 = 1) (n : Nat) (p : PPoly) :
                    p.size ≤ n → (∀ (c : Nat), coeff c p = 0) → denoteG g p = 0
                    theorem Lean.Grind.CommRing.PPoly.denoteG_append {α : Type u_1} [Ring α] (g : Nat → α) (p q : PPoly) :
                    denoteG g (p.append q) = denoteG g p + denoteG g q
                    theorem Lean.Grind.CommRing.PPoly.denoteG_neg {α : Type u_1} [Ring α] (g : Nat → α) (p : PPoly) :
                    theorem Lean.Grind.CommRing.PPoly.denoteG_scale {α : Type u_1} [Ring α] (g : Nat → α) (k : Int) (p : PPoly) :
                    denoteG g (scale k p) = ↑k * denoteG g p
                    theorem Lean.Grind.CommRing.PPoly.kron_scale (X k : Int) (p : PPoly) :
                    kron X (scale k p) = k * kron X p
                    theorem Lean.Grind.CommRing.Expr.denoteF_eq_evalConst {α : Type u_1} [CommRing α] (f : Nat → α) (e : Expr) (h : e.degB_k = 0) :
                    noncomputable def Lean.Grind.CommRing.Expr.kronLinEval_k (K : Nat) (e : Expr) :

                    The value of e at the point xᵢ = (2 ^ K) ^ (i + 1).

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      theorem Lean.Grind.CommRing.Expr.kronLinEval_k_eq (K : Nat) (e : Expr) :
                      kronLinEval_k K e = denoteF (fun (i : Nat) => (2 ^ K) ^ (i + 1)) e
                      def Lean.Grind.CommRing.PPoly.linVal {α : Type u_1} [Ring α] (f : Nat → α) (v : Nat) :
                      α

                      The valuation of the codes of Expr.toLin: the code i + 1 is the variable i.

                      Equations
                      Instances For
                        theorem Lean.Grind.CommRing.Expr.toLin_spec {α : Type u_1} [CommRing α] (f : Nat → α) (X : Int) (e : Expr) (h : e.degB_k ≤ 1) :
                        noncomputable def Lean.Grind.CommRing.Expr.lin_k (e : Expr) :

                        An upper bound on Expr.degB_k e, with Nat.lor in place of the maximum: it is the degree when the degree is at most 1, and is cheaper to reduce.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Lean.Grind.CommRing.Expr.max_le_lor (a b c d : Nat) (h₁ : a ≤ c) (h₂ : b ≤ d) :
                          Bool.rec a b (a.blt b) ≤ c.lor d
                          noncomputable def Lean.Grind.CommRing.Expr.linOk_k (a b : Expr) :

                          Checks that a and b are linear (Expr.degB_k ≤ 1, through Expr.lin_k).

                          Equations
                          Instances For
                            theorem Lean.Grind.CommRing.Expr.eq_of_kronLin {α : Type u_1} [CommRing α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linOk_k b = true) (hK : kronOk_k K a b = true) (h : kronLinEval_k K a = kronLinEval_k K b) :
                            denote ctx a = denote ctx b
                            theorem Lean.Grind.CommRing.eq_true_of_kronLin {α : Type u_1} [CommRing α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :
                            theorem Lean.Grind.CommRing.le_true_of_kronLin {α : Type u_1} [CommRing α] [LE α] [Std.IsPreorder α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :
                            theorem Lean.Grind.CommRing.lt_false_of_kronLin {α : Type u_1} [CommRing α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :
                            theorem Lean.Grind.CommRing.Expr.sub_eq_of_kronLin {α : Type u_1} [CommRing α] (ctx : Context α) (K : Nat) (a b : Expr) (k : Int) (hl : a.linOk_k (b.add (num k)) = true) (hK : kronOk_k K a (b.add (num k)) = true) (h : kronLinEval_k K a = kronLinEval_k K (b.add (num k))) :
                            denote ctx a - denote ctx b = ↑k

                            The difference of a and b is the constant k, for the theorems eq_false_of_sub, le_true_of_sub, ....

                            theorem Lean.Grind.CommRing.Expr.sub_eq_of_kron {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (a b : Expr) (k : Int) (hB : degOk_k B a (b.add (num k)) = true) (hK : kronOk_k K a (b.add (num k)) = true) (h : kronEval_k K B a = kronEval_k K B (b.add (num k))) :
                            denote ctx a - denote ctx b = ↑k

                            The difference of a and b is the constant k, by Kronecker substitution.

                            noncomputable def Lean.Grind.CommRing.Expr.linS_k (e : Expr) :

                            Expr.lin_k e, or at least 2 if e is not a semiring term (Expr.semi_k): one traversal checks that a semiring term is linear.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              noncomputable def Lean.Grind.CommRing.Expr.linSOk_k (a b : Expr) :

                              Checks that a and b are linear semiring terms (Expr.linS_k).

                              Equations
                              Instances For
                                theorem Lean.Grind.CommRing.Expr.eq_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linSOk_k b = true) (hK : kronOk_k K a b = true) (h : kronLinEval_k K a = kronLinEval_k K b) :
                                denoteS ctx a = denoteS ctx b
                                theorem Lean.Grind.CommRing.eq_true_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linSOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :
                                theorem Lean.Grind.CommRing.le_true_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [Std.IsPreorder α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linSOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :
                                theorem Lean.Grind.CommRing.lt_false_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (K : Nat) (a b : Expr) (hl : a.linSOk_k b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronLinEval_k K a = Expr.kronLinEval_k K b) :

                                Kronecker certificates for grind's Gröbner steps: a chain p = p₁ + Σ kᵢ * mᵢ * qᵢ of stated polynomials is checked by comparing values at the point (Stepwise.simpsK, Stepwise.d_stepsK). In characteristic c, the difference is c * E for a stated polynomial E (Stepwise.simpsKC).

                                noncomputable def Lean.Grind.CommRing.Int.shl_k (a : Int) (s : Nat) :

                                a * 2 ^ s for kernel reduction.

                                Equations
                                Instances For
                                  theorem Lean.Grind.CommRing.Int.shl_k_eq (a : Int) (s : Nat) :
                                  shl_k a s = a * 2 ^ s
                                  noncomputable def Lean.Grind.CommRing.Int.pairs_k (ps : List Int) :

                                  Adds the integers of ps by levels of pairwise additions, so that the kernel evaluates sums of nesting depth logarithmic in their number.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def Lean.Grind.CommRing.Int.sumGo_k (fuel : List Int) :
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      theorem Lean.Grind.CommRing.Int.pairs_k_sum (ps : List Int) (pend : Option Int) :
                                      List.foldr (fun (x1 x2 : Int) => x1 + x2) 0 (pairs_k ps pend) = pend.elim 0 id + List.foldr (fun (x1 x2 : Int) => x1 + x2) 0 ps
                                      theorem Lean.Grind.CommRing.Int.sumGo_k_eq (fuel ps : List Int) :
                                      sumGo_k fuel ps = List.foldr (fun (x1 x2 : Int) => x1 + x2) 0 ps
                                      theorem Lean.Grind.CommRing.Int.sumB_k_eq (ps : List Int) :
                                      sumB_k ps = List.foldr (fun (x1 x2 : Int) => x1 + x2) 0 ps
                                      noncomputable def Lean.Grind.CommRing.Poly.kronTerms_k (K B : Nat) (p : Poly) :

                                      The values of the terms of p at the point xᵢ = (2 ^ K) ^ (B ^ i).

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

                                        The value of p at the point xᵢ = (2 ^ K) ^ (B ^ i).

                                        Equations
                                        Instances For
                                          noncomputable def Lean.Grind.CommRing.Poly.norm1_k (p : Poly) :
                                          Equations
                                          Instances For
                                            theorem Lean.Grind.CommRing.Poly.kron_k_eq (K B : Nat) (p : Poly) :
                                            kron_k K B p = PPoly.kron (2 ^ K) (toPP_k B p)
                                            noncomputable def Lean.Grind.CommRing.PPoly.kronTerms_k (K : Nat) (p : PPoly) :
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              noncomputable def Lean.Grind.CommRing.PPoly.kron_k (K : Nat) (p : PPoly) :

                                              The value PPoly.kron (2 ^ K) of a packed polynomial, for kernel reduction.

                                              Equations
                                              Instances For
                                                Equations
                                                Instances For

                                                  The multiples k * m * q of a Gröbner step.

                                                  Instances For
                                                    noncomputable def Lean.Grind.CommRing.KList.kronTerms_k (K B : Nat) (ls : KList) :

                                                    The values of the multiples of ls at the point.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      noncomputable def Lean.Grind.CommRing.KList.norm_k (ls : KList) :
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def Lean.Grind.CommRing.KList.ok_k (B : Nat) (ls : KList) :
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          noncomputable def Lean.Grind.CommRing.KList.AllZero {α : Type u_1} [Ring α] (ctx : Context α) (ls : KList) :

                                                          Every polynomial of ls denotes 0.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            theorem Lean.Grind.CommRing.KList.allZero_cons {α : Type u_1} [Ring α] (ctx : Context α) (k : Int) (m : Mon) (q : Poly) (ls : KList) (hq : Poly.denote ctx q = 0) (hls : AllZero ctx ls) :
                                                            AllZero ctx (cons k m q ls)
                                                            noncomputable def Lean.Grind.CommRing.KList.toPP (B : Nat) (ls : KList) :

                                                            The multiples of ls with packed monomials, appended.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              theorem Lean.Grind.CommRing.PPoly.kron_mulMonN (X k : Int) (d v : Nat) (p : PPoly) :
                                                              kron X (mulMonN_k (fun (k : Int) => k) k d v p) = k * X ^ v * kron X p
                                                              theorem Lean.Grind.CommRing.PPoly.norm1_mulMonN (k : Int) (d v : Nat) (p : PPoly) :
                                                              (mulMonN_k (fun (k : Int) => k) k d v p).norm1 ≤ k.natAbs * p.norm1
                                                              theorem Lean.Grind.CommRing.KList.toPP_spec {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (hB : 1 < B) (ls : KList) (hok : ok_k B ls = true) :
                                                              PPoly.kron (2 ^ K) (toPP B ls) = kron_k K B ls ∧ (toPP B ls).norm1 ≤ ls.norm_k ∧ (AllZero ctx ls → PPoly.denote (Var.denote ctx) B (toPP B ls) = 0)

                                                              Multiples M * q of polynomials q that denote 0, with one cofactor M = Σ kᵢ * mᵢ per q: the multiples kᵢ * mᵢ * q of a chain usually share few polynomials q.

                                                              Instances For
                                                                noncomputable def Lean.Grind.CommRing.MList.kronTerms_k (K B : Nat) (ls : MList) :

                                                                The values of the multiples of ls at the point.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For
                                                                  noncomputable def Lean.Grind.CommRing.MList.norm_k (ls : MList) :
                                                                  Equations
                                                                  Instances For
                                                                    noncomputable def Lean.Grind.CommRing.MList.ok_k (B : Nat) (ls : MList) :
                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      noncomputable def Lean.Grind.CommRing.MList.AllZero {α : Type u_1} [Ring α] (ctx : Context α) (ls : MList) :

                                                                      Every polynomial q of ls denotes 0.

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        theorem Lean.Grind.CommRing.MList.allZero_cons {α : Type u_1} [Ring α] (ctx : Context α) (M q : Poly) (ls : MList) (hq : Poly.denote ctx q = 0) (hls : AllZero ctx ls) :
                                                                        AllZero ctx (cons M q ls)
                                                                        noncomputable def Lean.Grind.CommRing.MList.toPP (B : Nat) (ls : MList) :

                                                                        The terms of the multiples of ls, packed in base B.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          theorem Lean.Grind.CommRing.MList.toPP_spec {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (hB : 1 < B) (ls : MList) (hok : ok_k B ls = true) :
                                                                          PPoly.kron (2 ^ K) (toPP B ls) = kron_k K B ls ∧ (toPP B ls).norm1 ≤ ls.norm_k ∧ (AllZero ctx ls → PPoly.denote (Var.denote ctx) B (toPP B ls) = 0)
                                                                          theorem Lean.Grind.CommRing.KList.denote_eq {α : Type u_1} [CommRing α] (ctx : Context α) (K B c : Nat) (p₁ p : Poly) (E : PPoly) (ls : KList) (hB : 1 < B ∧ p.maxDeg_k < B ∧ p₁.maxDeg_k < B ∧ ok_k B ls = true) (hK : 2 * (p.norm1_k + p₁.norm1_k + ls.norm_k + c * E.norm1_k) < 2 ^ K) (h : Poly.kron_k K B p = Poly.kron_k K B p₁ + kron_k K B ls + ↑c * PPoly.kron_k K E) (hz : AllZero ctx ls) :
                                                                          Poly.denote ctx p = Poly.denote ctx p₁ + ↑c * PPoly.denote (Var.denote ctx) B E

                                                                          p and p₁ + Σ ls + c * E have the same value at the point, so they denote the same.

                                                                          theorem Lean.Grind.CommRing.MList.denote_eq {α : Type u_1} [CommRing α] (ctx : Context α) (K B c : Nat) (p₁ p : Poly) (E : PPoly) (ls : MList) (hB : 1 < B ∧ p.maxDeg_k < B ∧ p₁.maxDeg_k < B ∧ ok_k B ls = true) (hK : 2 * (p.norm1_k + p₁.norm1_k + ls.norm_k + c * E.norm1_k) < 2 ^ K) (h : Poly.kron_k K B p = Poly.kron_k K B p₁ + kron_k K B ls + ↑c * PPoly.kron_k K E) (hz : AllZero ctx ls) :
                                                                          Poly.denote ctx p = Poly.denote ctx p₁ + ↑c * PPoly.denote (Var.denote ctx) B E
                                                                          theorem Lean.Grind.CommRing.Expr.denote_eq_of_kron_poly {α : Type u_1} [CommRing α] (ctx : Context α) (K B c : Nat) (e : Expr) (p : Poly) (E : PPoly) (hB : 1 < B ∧ e.degB_k < B ∧ p.maxDeg_k < B) (hK : 2 * (e.majorant_k + p.norm1_k + c * E.norm1_k) < 2 ^ K) (h : kronEval_k K B e = Poly.kron_k K B p + ↑c * PPoly.kron_k K E) :
                                                                          denote ctx e = Poly.denote ctx p + ↑c * PPoly.denote (Var.denote ctx) B E

                                                                          e and p + c * E have the same value at the point, so they denote the same.

                                                                          noncomputable def Lean.Grind.CommRing.Stepwise.kronOk_k (K B c : Nat) (p₁ p : Poly) (E : PPoly) (ls : KList) :

                                                                          The checks of the Kronecker certificates of grind's steps: degrees below B, coefficients below 2 ^ K.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            theorem Lean.Grind.CommRing.Stepwise.of_kronOk_k {K B c : Nat} {p₁ p : Poly} {E : PPoly} {ls : KList} (h : kronOk_k K B c p₁ p E ls = true) :
                                                                            (1 < B ∧ p.maxDeg_k < B ∧ p₁.maxDeg_k < B ∧ KList.ok_k B ls = true) ∧ 2 * (p.norm1_k + p₁.norm1_k + ls.norm_k + c * E.norm1_k) < 2 ^ K
                                                                            theorem Lean.Grind.CommRing.Stepwise.simpsK {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (p₁ p : Poly) (ls : KList) (hB : kronOk_k K B 0 p₁ p (PPoly.num 0) ls = true) (h : (Poly.kron_k K B p).beq' ((Poly.kron_k K B p₁).add_k (KList.kron_k K B ls)) = true) :
                                                                            KList.AllZero ctx ls → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                            theorem Lean.Grind.CommRing.Stepwise.simpsKC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (K B : Nat) (p₁ p : Poly) (E : PPoly) (ls : KList) (hB : kronOk_k K B c p₁ p E ls = true) (h : (Poly.kron_k K B p).beq' (((Poly.kron_k K B p₁).add_k (KList.kron_k K B ls)).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) :
                                                                            KList.AllZero ctx ls → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                            theorem Lean.Grind.CommRing.Stepwise.d_stepsK {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (init : Poly) (K B : Nat) (p₁ p : Poly) (ls : KList) (hB : kronOk_k K B 0 p₁ p (PPoly.num 0) ls = true) (h : (Poly.kron_k K B p).beq' ((Poly.kron_k K B p₁).add_k (KList.kron_k K B ls)) = true) :
                                                                            KList.AllZero ctx ls → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                            theorem Lean.Grind.CommRing.Stepwise.d_stepsKC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (k : Int) (init : Poly) (K B : Nat) (p₁ p : Poly) (E : PPoly) (ls : KList) (hB : kronOk_k K B c p₁ p E ls = true) (h : (Poly.kron_k K B p).beq' (((Poly.kron_k K B p₁).add_k (KList.kron_k K B ls)).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) :
                                                                            KList.AllZero ctx ls → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                            noncomputable def Lean.Grind.CommRing.Stepwise.kronOkM_k (K B c : Nat) (p₁ p : Poly) (E : PPoly) (ls : MList) :

                                                                            kronOk_k, simpsK and d_stepsK for multiples grouped by polynomial (MList).

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              theorem Lean.Grind.CommRing.Stepwise.of_kronOkM_k {K B c : Nat} {p₁ p : Poly} {E : PPoly} {ls : MList} (h : kronOkM_k K B c p₁ p E ls = true) :
                                                                              (1 < B ∧ p.maxDeg_k < B ∧ p₁.maxDeg_k < B ∧ MList.ok_k B ls = true) ∧ 2 * (p.norm1_k + p₁.norm1_k + ls.norm_k + c * E.norm1_k) < 2 ^ K
                                                                              theorem Lean.Grind.CommRing.Stepwise.simpsM {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (p₁ p : Poly) (ls : MList) (hB : kronOkM_k K B 0 p₁ p (PPoly.num 0) ls = true) (h : (Poly.kron_k K B p).beq' ((Poly.kron_k K B p₁).add_k (MList.kron_k K B ls)) = true) :
                                                                              MList.AllZero ctx ls → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                              theorem Lean.Grind.CommRing.Stepwise.simpsMC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (K B : Nat) (p₁ p : Poly) (E : PPoly) (ls : MList) (hB : kronOkM_k K B c p₁ p E ls = true) (h : (Poly.kron_k K B p).beq' (((Poly.kron_k K B p₁).add_k (MList.kron_k K B ls)).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) :
                                                                              MList.AllZero ctx ls → Poly.denote ctx p₁ = 0 → Poly.denote ctx p = 0
                                                                              theorem Lean.Grind.CommRing.Stepwise.d_stepsM {α : Type u_1} [CommRing α] (ctx : Context α) (k : Int) (init : Poly) (K B : Nat) (p₁ p : Poly) (ls : MList) (hB : kronOkM_k K B 0 p₁ p (PPoly.num 0) ls = true) (h : (Poly.kron_k K B p).beq' ((Poly.kron_k K B p₁).add_k (MList.kron_k K B ls)) = true) :
                                                                              MList.AllZero ctx ls → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                              theorem Lean.Grind.CommRing.Stepwise.d_stepsMC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (k : Int) (init : Poly) (K B : Nat) (p₁ p : Poly) (E : PPoly) (ls : MList) (hB : kronOkM_k K B c p₁ p E ls = true) (h : (Poly.kron_k K B p).beq' (((Poly.kron_k K B p₁).add_k (MList.kron_k K B ls)).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) :
                                                                              MList.AllZero ctx ls → ↑k * Poly.denote ctx init = Poly.denote ctx p₁ → ↑k * Poly.denote ctx init = Poly.denote ctx p
                                                                              noncomputable def Lean.Grind.CommRing.Stepwise.impOk_k (K B c : Nat) (e : Expr) (p : Poly) (E : PPoly) :

                                                                              The checks of the Kronecker certificates of grind's implications.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                theorem Lean.Grind.CommRing.Stepwise.of_impOk_k {K B c : Nat} {e : Expr} {p : Poly} {E : PPoly} (h : impOk_k K B c e p E = true) :
                                                                                (1 < B ∧ e.degB_k < B ∧ p.maxDeg_k < B) ∧ 2 * (e.majorant_k + p.norm1_k + c * E.norm1_k) < 2 ^ K
                                                                                theorem Lean.Grind.CommRing.Stepwise.imp_1eqK {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (lhs rhs : Expr) (p₁ p₂ : Poly) (hB : impOk_k K B 0 (lhs.sub rhs) p₁ (PPoly.num 0) = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' (Poly.kron_k K B p₁) = true) (hp₂ : p₂ = Poly.num 0) :
                                                                                ↑1 * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                theorem Lean.Grind.CommRing.Stepwise.imp_1eqKC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (K B : Nat) (lhs rhs : Expr) (p₁ p₂ : Poly) (E : PPoly) (hB : impOk_k K B c (lhs.sub rhs) p₁ E = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' ((Poly.kron_k K B p₁).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) (hp₂ : p₂ = Poly.num 0) :
                                                                                ↑1 * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                theorem Lean.Grind.CommRing.Stepwise.coreK {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (lhs rhs : Expr) (p : Poly) (hB : impOk_k K B 0 (lhs.sub rhs) p (PPoly.num 0) = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' (Poly.kron_k K B p) = true) :
                                                                                Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0

                                                                                The input step lhs = rhs of grind's ring solver, with p the polynomial of lhs - rhs, by Kronecker substitution.

                                                                                theorem Lean.Grind.CommRing.Stepwise.coreKC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) (K B : Nat) (lhs rhs : Expr) (p : Poly) (E : PPoly) (hB : impOk_k K B c (lhs.sub rhs) p E = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' ((Poly.kron_k K B p).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) :
                                                                                Expr.denote ctx lhs = Expr.denote ctx rhs → Poly.denote ctx p = 0
                                                                                theorem Lean.Grind.CommRing.Stepwise.imp_keqK {α : Type u_1} [CommRing α] (ctx : Context α) [NoNatZeroDivisors α] (k : Int) (K B : Nat) (lhs rhs : Expr) (p₁ p₂ : Poly) (hk : k.beq' 0 = false) (hB : impOk_k K B 0 (lhs.sub rhs) p₁ (PPoly.num 0) = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' (Poly.kron_k K B p₁) = true) (hp₂ : p₂ = Poly.num 0) :
                                                                                ↑k * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs
                                                                                theorem Lean.Grind.CommRing.Stepwise.imp_keqKC {α : Type u_1} {c : Nat} [CommRing α] [IsCharP α c] (ctx : Context α) [NoNatZeroDivisors α] (k : Int) (K B : Nat) (lhs rhs : Expr) (p₁ p₂ : Poly) (E : PPoly) (hk : k.beq' 0 = false) (hB : impOk_k K B c (lhs.sub rhs) p₁ E = true) (h : (Expr.kronEval_k K B (lhs.sub rhs)).beq' ((Poly.kron_k K B p₁).add_k ((Int.ofNat c).mul_k (PPoly.kron_k K E))) = true) (hp₂ : p₂ = Poly.num 0) :
                                                                                ↑k * Poly.denote ctx p₁ = Poly.denote ctx p₂ → Expr.denote ctx lhs = Expr.denote ctx rhs

                                                                                Field identities with inverses of numerals (Expr.eq_of_kronQ). With the variables of invs denoting 1 / c, an expression e is num / den for an integer polynomial num (Expr.toPPQ, only used in proofs). The kernel computes the value of num at the point and den (Expr.kronQ_k), so a = b follows from num_a * den_b = num_b * den_a at the point, with a bound on the coefficients (Expr.majQ_k).

                                                                                noncomputable def Lean.Grind.CommRing.InvVars.lookup_k (invs : InvVars) (x : Var) :

                                                                                invs.lookup x for kernel reduction, for invs sorted by variable: the search stops at the first larger variable, so a variable below all of invs costs one comparison.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For

                                                                                  true if the numerals of invs are not 0.

                                                                                  Equations
                                                                                  Instances For
                                                                                    theorem Lean.Grind.CommRing.InvVars.lookup_k_spec {α : Type u_1} [Field α] (ctx : Context α) (invs : InvVars) (hok : ok ctx invs) (hnz : invs.nonzero_k = true) (x : Var) (c : Nat) (h : invs.lookup_k x = some c) :
                                                                                    Var.denote ctx x = (↑c)⁻¹ ∧ c ≠ 0
                                                                                    noncomputable def Lean.Grind.CommRing.Expr.degQB_k (invs : InvVars) (e : Expr) :

                                                                                    Expr.degB_k, where the variables of invs are constants.

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      noncomputable def Lean.Grind.CommRing.Expr.degQOk_k (B : Nat) (invs : InvVars) (a b : Expr) :

                                                                                      Checks the degree bound of a and b for the base B, where the variables of invs are constants.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        theorem Lean.Grind.CommRing.Expr.of_degQOk_k {B : Nat} {invs : InvVars} {a b : Expr} (h : degQOk_k B invs a b = true) :
                                                                                        1 < B ∧ degQB_k invs a < B ∧ degQB_k invs b < B
                                                                                        noncomputable def Lean.Grind.CommRing.Expr.kronQ_k (K B : Nat) (invs : InvVars) (e : Expr) :

                                                                                        The value of the numerator of e at the point xᵢ = (2 ^ K) ^ (B ^ i), and its denominator.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          noncomputable def Lean.Grind.CommRing.Expr.majQ_k (invs : InvVars) (e : Expr) :

                                                                                          A bound on the coefficients of the numerator of e, and its denominator.

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            theorem Lean.Grind.CommRing.PPoly.kron_combine_k (X : Int) {B : Nat} (hB : 1 < B) (p q : PPoly) :
                                                                                            kron X (p.combine_k q) = kron X p + kron X q
                                                                                            theorem Lean.Grind.CommRing.Expr.toPPQ_spec {α : Type u_1} [Field α] [IsCharP α 0] (f : Nat → α) (K B : Nat) (hB : 1 < B) (invs : InvVars) (hf : ∀ (x : Var) (c : Nat), invs.lookup_k x = some c → f x = (↑c)⁻¹ ∧ c ≠ 0) (e : Expr) (he : degQB_k invs e < B) :
                                                                                            PPoly.denote f B (toPPQ B invs e).fst = ↑(toPPQ B invs e).snd * denoteF f e ∧ PPoly.Deg B (degQB_k invs e) (toPPQ B invs e).fst ∧ (toPPQ B invs e).snd ≠ 0 ∧ PPoly.kron (2 ^ K) (toPPQ B invs e).fst = (kronQ_k K B invs e).fst ∧ (toPPQ B invs e).snd = (kronQ_k K B invs e).snd ∧ (toPPQ B invs e).fst.norm1 ≤ (majQ_k invs e).fst ∧ (toPPQ B invs e).snd = (majQ_k invs e).snd
                                                                                            noncomputable def Lean.Grind.CommRing.Expr.kronQOk_k (K : Nat) (invs : InvVars) (a b : Expr) :

                                                                                            Checks the bound on the coefficients of num_a * den_b - num_b * den_a.

                                                                                            Equations
                                                                                            • One or more equations did not get rendered due to their size.
                                                                                            Instances For
                                                                                              noncomputable def Lean.Grind.CommRing.Expr.kronQEq_k (K B : Nat) (invs : InvVars) (a b : Expr) :

                                                                                              num_a * den_b = num_b * den_a at the point.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                theorem Lean.Grind.CommRing.Expr.eq_of_kronQ {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (a b : Expr) (hB : degQOk_k B invs a b = true) (hK : kronQOk_k K invs a b = true) (h : kronQEq_k K B invs a b = true) :
                                                                                                denote ctx a = denote ctx b
                                                                                                theorem Lean.Grind.CommRing.eq_true_of_kronQ {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (a b : Expr) (hB : Expr.degQOk_k B invs a b = true) (hK : Expr.kronQOk_k K invs a b = true) (h : Expr.kronQEq_k K B invs a b = true) :

                                                                                                Linear field identities over many variables (Expr.eq_of_kronQLin): with the variables of invs as the inverses of their numerals, both sides are linear in the other variables, which are evaluated at xᵢ = (2 ^ K) ^ (i + 1) as in Expr.eq_of_kronLin.

                                                                                                noncomputable def Lean.Grind.CommRing.Expr.degQL_k (invs : InvVars) (e : Expr) :

                                                                                                Expr.lin_k, where the variables of invs are constants.

                                                                                                Equations
                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                Instances For
                                                                                                  noncomputable def Lean.Grind.CommRing.Expr.kronQLin_k (K : Nat) (invs : InvVars) (e : Expr) :

                                                                                                  The numerator and the denominator of e at the point xᵢ = (2 ^ K) ^ (i + 1).

                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For
                                                                                                    noncomputable def Lean.Grind.CommRing.Expr.evalQ (invs : InvVars) :

                                                                                                    The value of a constant expression: its variables at 0, those of invs at the inverses of their numerals.

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      theorem Lean.Grind.CommRing.Expr.lor_eq_zero {a b : Nat} (h : a.lor b = 0) :
                                                                                                      a = 0 ∧ b = 0
                                                                                                      theorem Lean.Grind.CommRing.Expr.lor_le_one {a b : Nat} (h : a.lor b ≤ 1) :
                                                                                                      a ≤ 1 ∧ b ≤ 1
                                                                                                      theorem Lean.Grind.CommRing.Expr.kronQLin_eq_evalQ (K : Nat) (invs : InvVars) (e : Expr) (h : degQL_k invs e = 0) :
                                                                                                      kronQLin_k K invs e = evalQ invs e

                                                                                                      A constant expression: its value at the point is its value.

                                                                                                      theorem Lean.Grind.CommRing.Expr.evalQ_spec {α : Type u_1} [Field α] [IsCharP α 0] (f : Nat → α) (invs : InvVars) (hf : ∀ (x : Var) (c : Nat), invs.lookup_k x = some c → f x = (↑c)⁻¹ ∧ c ≠ 0) (e : Expr) (h : degQL_k invs e = 0) :
                                                                                                      ↑(evalQ invs e).fst = ↑(evalQ invs e).snd * denoteF f e ∧ (evalQ invs e).snd ≠ 0 ∧ (evalQ invs e).fst.natAbs ≤ (majQ_k invs e).fst ∧ (evalQ invs e).snd = (majQ_k invs e).snd
                                                                                                      noncomputable def Lean.Grind.CommRing.Expr.toLinQ (invs : InvVars) :

                                                                                                      The terms of the numerator of a linear e, with code i + 1 for the variable i, and its denominator; the variables of invs are constants (only used in proofs).

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        theorem Lean.Grind.CommRing.Expr.toLinQ_spec {α : Type u_1} [Field α] [IsCharP α 0] (f : Nat → α) (K : Nat) (invs : InvVars) (hf : ∀ (x : Var) (c : Nat), invs.lookup_k x = some c → f x = (↑c)⁻¹ ∧ c ≠ 0) (e : Expr) (he : degQL_k invs e ≤ 1) :
                                                                                                        PPoly.denoteG (PPoly.linVal f) (toLinQ invs e).fst = ↑(toLinQ invs e).snd * denoteF f e ∧ (toLinQ invs e).snd ≠ 0 ∧ PPoly.kron (2 ^ K) (toLinQ invs e).fst = (kronQLin_k K invs e).fst ∧ (toLinQ invs e).snd = (kronQLin_k K invs e).snd ∧ (toLinQ invs e).fst.norm1 ≤ (majQ_k invs e).fst ∧ (toLinQ invs e).snd = (majQ_k invs e).snd
                                                                                                        noncomputable def Lean.Grind.CommRing.Expr.linQOk_k (invs : InvVars) (a b : Expr) :

                                                                                                        Checks that a and b are linear, with the variables of invs as constants.

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          noncomputable def Lean.Grind.CommRing.Expr.kronQLinEq_k (K : Nat) (invs : InvVars) (a b : Expr) :

                                                                                                          num_a * den_b = num_b * den_a at the point xᵢ = (2 ^ K) ^ (i + 1).

                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For
                                                                                                            theorem Lean.Grind.CommRing.Expr.eq_of_kronQLin {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (a b : Expr) (hl : linQOk_k invs a b = true) (hK : kronQOk_k K invs a b = true) (h : kronQLinEq_k K invs a b = true) :
                                                                                                            denote ctx a = denote ctx b
                                                                                                            theorem Lean.Grind.CommRing.eq_true_of_kronQLin {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (a b : Expr) (hl : Expr.linQOk_k invs a b = true) (hK : Expr.kronQOk_k K invs a b = true) (h : Expr.kronQLinEq_k K invs a b = true) :
                                                                                                            theorem Lean.Grind.CommRing.Expr.sub_mul_eq_of_kronQ {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (lhs rhs lhs' rhs' : Expr) (hB : degQOk_k B invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) (hK : kronQOk_k K invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) (h : kronQEq_k K B invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (denote ctx lhs - denote ctx rhs) * ↑d = denote ctx lhs' - denote ctx rhs'

                                                                                                            lhs - rhs is lhs' - rhs' divided by d, by Kronecker substitution: the normalization of a relation with inverses of numerals, whose sides lhs' and rhs' have no denominators.

                                                                                                            theorem Lean.Grind.CommRing.eq_of_kronQ_rel {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hB : Expr.degQOk_k B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQEq_k K B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')
                                                                                                            theorem Lean.Grind.CommRing.le_of_kronQ_rel {α : Type u} [Field α] [IsCharP α 0] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hB : Expr.degQOk_k B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQEq_k K B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                            theorem Lean.Grind.CommRing.lt_of_kronQ_rel {α : Type u} [Field α] [IsCharP α 0] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (K B : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hB : Expr.degQOk_k B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQEq_k K B invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')
                                                                                                            theorem Lean.Grind.CommRing.Expr.sub_mul_eq_of_kronQLin {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (lhs rhs lhs' rhs' : Expr) (hl : linQOk_k invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) (hK : kronQOk_k K invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) (h : kronQLinEq_k K invs ((lhs.sub rhs).mul (num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (denote ctx lhs - denote ctx rhs) * ↑d = denote ctx lhs' - denote ctx rhs'

                                                                                                            Expr.sub_mul_eq_of_kronQ for linear terms over many variables (Expr.eq_of_kronQLin).

                                                                                                            theorem Lean.Grind.CommRing.eq_of_kronQLin_rel {α : Type u_1} [Field α] [IsCharP α 0] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hl : Expr.linQOk_k invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQLinEq_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs = Expr.denote ctx rhs) = (Expr.denote ctx lhs' = Expr.denote ctx rhs')
                                                                                                            theorem Lean.Grind.CommRing.le_of_kronQLin_rel {α : Type u} [Field α] [IsCharP α 0] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hl : Expr.linQOk_k invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQLinEq_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs ≤ Expr.denote ctx rhs) = (Expr.denote ctx lhs' ≤ Expr.denote ctx rhs')
                                                                                                            theorem Lean.Grind.CommRing.lt_of_kronQLin_rel {α : Type u} [Field α] [IsCharP α 0] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsLinearOrder α] [OrderedRing α] (ctx : Context α) (K : Nat) (invs : InvVars) (hok : InvVars.ok ctx invs) (hnz : invs.nonzero_k = true) (d : Nat) (hd : Nat.blt 0 d = true) (lhs rhs lhs' rhs' : Expr) (hl : Expr.linQOk_k invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (hK : Expr.kronQOk_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) (h : Expr.kronQLinEq_k K invs ((lhs.sub rhs).mul (Expr.num ↑d)) (lhs'.sub rhs') = true) :
                                                                                                            (Expr.denote ctx lhs < Expr.denote ctx rhs) = (Expr.denote ctx lhs' < Expr.denote ctx rhs')

                                                                                                            Relations lhs ⋈ rhs rewritten to lhs' ⋈ rhs' with lhs - rhs and lhs' - rhs' the same polynomial, checked at a point (le_of_kron_rel, and le_of_kronLin_rel for linear terms over many variables).

                                                                                                            theorem Lean.Grind.CommRing.eq_of_kron_rel {α : Type u_1} [CommRing α] (ctx : Context α) (K B : Nat) (l r l' r' : Expr) (hB : Expr.degOk_k B (l.sub r) (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronEval_k K B (l.sub r) = Expr.kronEval_k K B (l'.sub r')) :
                                                                                                            (Expr.denote ctx l = Expr.denote ctx r) = (Expr.denote ctx l' = Expr.denote ctx r')
                                                                                                            theorem Lean.Grind.CommRing.eq_of_kronLin_rel {α : Type u_1} [CommRing α] (ctx : Context α) (K : Nat) (l r l' r' : Expr) (hl : (l.sub r).linOk_k (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronLinEval_k K (l.sub r) = Expr.kronLinEval_k K (l'.sub r')) :
                                                                                                            (Expr.denote ctx l = Expr.denote ctx r) = (Expr.denote ctx l' = Expr.denote ctx r')
                                                                                                            theorem Lean.Grind.CommRing.le_of_kron_rel {α : Type u} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K B : Nat) (l r l' r' : Expr) (hB : Expr.degOk_k B (l.sub r) (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronEval_k K B (l.sub r) = Expr.kronEval_k K B (l'.sub r')) :
                                                                                                            (Expr.denote ctx l ≤ Expr.denote ctx r) = (Expr.denote ctx l' ≤ Expr.denote ctx r')
                                                                                                            theorem Lean.Grind.CommRing.le_of_kronLin_rel {α : Type u} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K : Nat) (l r l' r' : Expr) (hl : (l.sub r).linOk_k (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronLinEval_k K (l.sub r) = Expr.kronLinEval_k K (l'.sub r')) :
                                                                                                            (Expr.denote ctx l ≤ Expr.denote ctx r) = (Expr.denote ctx l' ≤ Expr.denote ctx r')
                                                                                                            theorem Lean.Grind.CommRing.lt_of_kron_rel {α : Type u} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] [Std.LawfulOrderLT α] (ctx : Context α) (K B : Nat) (l r l' r' : Expr) (hB : Expr.degOk_k B (l.sub r) (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronEval_k K B (l.sub r) = Expr.kronEval_k K B (l'.sub r')) :
                                                                                                            (Expr.denote ctx l < Expr.denote ctx r) = (Expr.denote ctx l' < Expr.denote ctx r')
                                                                                                            theorem Lean.Grind.CommRing.lt_of_kronLin_rel {α : Type u} [CommRing α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] [Std.LawfulOrderLT α] (ctx : Context α) (K : Nat) (l r l' r' : Expr) (hl : (l.sub r).linOk_k (l'.sub r') = true) (hK : Expr.kronOk_k K (l.sub r) (l'.sub r') = true) (h : Expr.kronLinEval_k K (l.sub r) = Expr.kronLinEval_k K (l'.sub r')) :
                                                                                                            (Expr.denote ctx l < Expr.denote ctx r) = (Expr.denote ctx l' < Expr.denote ctx r')

                                                                                                            eq_cancel_of_kronS and its variants for linear terms over many variables.

                                                                                                            theorem Lean.Grind.CommRing.eq_cancel_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] (ctx : Context α) (K : Nat) (a b a' b' c : Expr) (hl₁ : a.linSOk_k (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronLinEval_k K a = Expr.kronLinEval_k K (a'.add c)) (hl₂ : b.linSOk_k (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronLinEval_k K b = Expr.kronLinEval_k K (b'.add c)) :
                                                                                                            (Expr.denoteS ctx a = Expr.denoteS ctx b) = (Expr.denoteS ctx a' = Expr.denoteS ctx b')
                                                                                                            theorem Lean.Grind.CommRing.le_cancel_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K : Nat) (a b a' b' c : Expr) (hl₁ : a.linSOk_k (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronLinEval_k K a = Expr.kronLinEval_k K (a'.add c)) (hl₂ : b.linSOk_k (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronLinEval_k K b = Expr.kronLinEval_k K (b'.add c)) :
                                                                                                            theorem Lean.Grind.CommRing.lt_cancel_of_kronLinS {α : Type u_1} [CommSemiring α] [AddRightCancel α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] [OrderedRing α] (ctx : Context α) (K : Nat) (a b a' b' c : Expr) (hl₁ : a.linSOk_k (a'.add c) = true) (hK₁ : Expr.kronOk_k K a (a'.add c) = true) (h₁ : Expr.kronLinEval_k K a = Expr.kronLinEval_k K (a'.add c)) (hl₂ : b.linSOk_k (b'.add c) = true) (hK₂ : Expr.kronOk_k K b (b'.add c) = true) (h₂ : Expr.kronLinEval_k K b = Expr.kronLinEval_k K (b'.add c)) :
                                                                                                            (Expr.denoteS ctx a < Expr.denoteS ctx b) = (Expr.denoteS ctx a' < Expr.denoteS ctx b')

                                                                                                            Identities in commutative semirings without AddRightCancel, where the ring envelope does not apply (Expr.eq_of_kronSN): the terms of both sides, expanded without merging (Expr.toTL), have nonnegative coefficients; equal values at the point give equal coefficients for each monomial, and terms with the same monomial are regrouped in the semiring.

                                                                                                            All coefficients of p are nonnegative.

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              noncomputable def Lean.Grind.CommRing.PPoly.denoteSN {α : Type u_1} [Semiring α] (f : Nat → α) (B : Nat) :
                                                                                                              PPoly → α

                                                                                                              The denotation of a polynomial with nonnegative coefficients in a semiring.

                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                The product of p and q, without merging.

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.NonNeg.scale {p : PPoly} {k : Int} (hp : p.NonNeg) (hk : 0 ≤ k) :
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.NonNeg.mulTermTL {q : PPoly} {k : Int} {d v : Nat} (hq : q.NonNeg) (hk : 0 ≤ k) :
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.kron_mulTermTL (X k : Int) (d v : Nat) (q : PPoly) :
                                                                                                                  kron X (mulTermTL k d v q) = k * X ^ v * kron X q
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.kron_mulTL (X : Int) (p q : PPoly) :
                                                                                                                  kron X (p.mulTL q) = kron X p * kron X q
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.kron_powTL (X : Int) (p : PPoly) (k : Nat) :
                                                                                                                  kron X (p.powTL k) = kron X p ^ k
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.addConst {B D : Nat} {q : PPoly} (k : Int) (hq : Deg B D q) :
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.append {B D : Nat} {p q : PPoly} (hp : Deg B D p) (hq : Deg B D q) :
                                                                                                                  Deg B D (p.append q)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.scale {B D : Nat} {p : PPoly} (k : Int) (hp : Deg B D p) :
                                                                                                                  Deg B D (PPoly.scale k p)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.mulTermTL {B D₁ D₂ : Nat} (hB : 1 < B) {q : PPoly} (k : Int) (d v : Nat) (hv : dsum B v ≤ D₁) (hq : Deg B D₂ q) (hD : D₁ + D₂ < B) :
                                                                                                                  Deg B (D₁ + D₂) (PPoly.mulTermTL k d v q)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.mulTL {B D₁ D₂ : Nat} (hB : 1 < B) {p q : PPoly} (hp : Deg B D₁ p) (hq : Deg B D₂ q) (hD : D₁ + D₂ < B) :
                                                                                                                  Deg B (D₁ + D₂) (p.mulTL q)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.Deg.powTL {B D : Nat} (hB : 1 < B) {p : PPoly} (hp : Deg B D p) (k : Nat) (hD : D * k < B) :
                                                                                                                  Deg B (D * k) (p.powTL k)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_addConst {α : Type u_1} [Semiring α] (f : Nat → α) (B : Nat) {q : PPoly} {k : Int} (hq : q.NonNeg) (hk : 0 ≤ k) :
                                                                                                                  denoteSN f B (append.addConst q k) = denoteSN f B q + ↑k.toNat
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_append {α : Type u_1} [Semiring α] (f : Nat → α) (B : Nat) {p q : PPoly} (hp : p.NonNeg) (hq : q.NonNeg) :
                                                                                                                  denoteSN f B (p.append q) = denoteSN f B p + denoteSN f B q
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_scale {α : Type u_1} [Semiring α] (f : Nat → α) (B : Nat) {p : PPoly} {k : Int} (hp : p.NonNeg) (hk : 0 ≤ k) :
                                                                                                                  denoteSN f B (scale k p) = ↑k.toNat * denoteSN f B p
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_mulTermTL {α : Type u_1} [CommSemiring α] (f : Nat → α) {B D₁ D₂ : Nat} (hB : 1 < B) {q : PPoly} {k : Int} (d v : Nat) (hq : q.NonNeg) (hk : 0 ≤ k) (hv : dsum B v ≤ D₁) (hd : Deg B D₂ q) (hD : D₁ + D₂ < B) :
                                                                                                                  denoteSN f B (mulTermTL k d v q) = ↑k.toNat * monDenote f B 0 v * denoteSN f B q
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_mulTL {α : Type u_1} [CommSemiring α] (f : Nat → α) {B D₁ D₂ : Nat} (hB : 1 < B) {p q : PPoly} (hp : p.NonNeg) (hq : q.NonNeg) (dp : Deg B D₁ p) (dq : Deg B D₂ q) (hD : D₁ + D₂ < B) :
                                                                                                                  denoteSN f B (p.mulTL q) = denoteSN f B p * denoteSN f B q
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_powTL {α : Type u_1} [CommSemiring α] (f : Nat → α) {B D : Nat} (hB : 1 < B) {p : PPoly} (hp : p.NonNeg) (dp : Deg B D p) (k : Nat) (hD : D * k < B) :
                                                                                                                  denoteSN f B (p.powTL k) = denoteSN f B p ^ k
                                                                                                                  theorem Lean.Grind.CommRing.Expr.toTL_spec {α : Type u_1} [CommSemiring α] (ctx : Context α) (X : Int) {B : Nat} (hB : 1 < B) (e : Expr) (hs : e.semi_k = true) (he : e.degB_k < B) :
                                                                                                                  (toTL B e).NonNeg ∧ PPoly.Deg B e.degB_k (toTL B e) ∧ PPoly.denoteSN (Var.denote ctx) B (toTL B e) = denoteS ctx e ∧ PPoly.kron X (toTL B e) = denoteF (fun (i : Nat) => X ^ B ^ i) e ∧ (toTL B e).norm1 ≤ e.majorant_k
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_removeCode {α : Type u_1} [Semiring α] (f : Nat → α) (B c : Nat) (p : PPoly) (hp : p.NonNeg) :
                                                                                                                  denoteSN f B p = ↑(coeff c p).toNat * monDenote f B 0 c + denoteSN f B (removeCode c p)
                                                                                                                  theorem Lean.Grind.CommRing.PPoly.denoteSN_eq_of_coeff {α : Type u_1} [Semiring α] (f : Nat → α) (B n : Nat) (p q : PPoly) :
                                                                                                                  p.size + q.size ≤ n → p.NonNeg → q.NonNeg → (∀ (c : Nat), coeff c p = coeff c q) → denoteSN f B p = denoteSN f B q
                                                                                                                  theorem Lean.Grind.CommRing.Expr.eq_of_kronSN {α : Type u_1} [CommSemiring α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : degSOk_k B a b = true) (hK : kronOk_k K a b = true) (h : kronEval_k K B a = kronEval_k K B b) :
                                                                                                                  denoteS ctx a = denoteS ctx b

                                                                                                                  Identities in commutative semirings, without cancellation: the terms of both sides have nonnegative coefficients, the same value at the point gives the same coefficient for each monomial, and terms with the same monomial are regrouped (PPoly.denoteSN_eq_of_coeff).

                                                                                                                  theorem Lean.Grind.CommRing.eq_true_of_kronSN {α : Type u_1} [CommSemiring α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                                                                                                                  theorem Lean.Grind.CommRing.le_true_of_kronSN {α : Type u_1} [CommSemiring α] [LE α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :
                                                                                                                  theorem Lean.Grind.CommRing.lt_false_of_kronSN {α : Type u_1} [CommSemiring α] [LE α] [LT α] [Std.LawfulOrderLT α] [Std.IsPreorder α] (ctx : Context α) (K B : Nat) (a b : Expr) (hB : Expr.degSOk_k B a b = true) (hK : Expr.kronOk_k K a b = true) (h : Expr.kronEval_k K B a = Expr.kronEval_k K B b) :