Documentation

CompPoly.ToMathlib.Polynomial.BivariateDegree

Mathlib-Facing Bivariate Degree Helpers #

This file collects degree- and evaluation-oriented helpers for Mathlib's bivariate polynomial surface R[X][Y] that are useful as a bridge layer between CompPoly and downstream developments such as ArkLib.

The intended split is:

noncomputable def Polynomial.Bivariate.coeff {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) (i j : ) :
F

(i, j)-coefficient of a polynomial, i.e. the coefficient of X^i Y^j.

Instances For

    The polynomial coefficient of the highest power of Y. This is the leading coefficient in the classical sense if the bivariate polynomial is interpreted as a univariate polynomial over F[X].

    Instances For
      @[simp]

      The polynomial coefficient of the highest power of Y is 0 if and only if the bivariate polynomial is the zero polynomial.

      @[simp]

      The polynomial coefficient of the highest power of Y is not 0 if and only if the bivariate polynomial is non-zero.

      noncomputable def Polynomial.Bivariate.natDegreeY {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) :

      The Y-degree of a bivariate polynomial, as a natural number.

      Instances For
        noncomputable def Polynomial.Bivariate.degreeX {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) :

        The X-degree of a bivariate polynomial.

        Instances For
          noncomputable def Polynomial.Bivariate.totalDegree {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) :

          The total degree of a bivariate polynomial.

          Instances For
            noncomputable def Polynomial.Bivariate.weightedDegree {F : Type u_1} [Semiring F] (p : Polynomial (Polynomial F)) (u v : ) :

            (u, v)-weighted degree of a polynomial. The maximal u * i + v * j such that the polynomial p contains a monomial x^i * y^j.

            Instances For
              noncomputable def Polynomial.Bivariate.natWeightedDegree {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) (u v : ) :

              The natural-number-valued (u, v)-weighted degree.

              Instances For

                The weighted degree is always defined (never none).

                The total degree of a bivariate polynomial is equal to the (1, 1)-weighted degree.

                The X-degree of a bivariate polynomial is equal to the (1, 0)-weighted degree.

                The Y-degree of a bivariate polynomial is equal to the (0, 1)-weighted degree.

                theorem Polynomial.Bivariate.mul_ne_zero {F : Type u_1} [Semiring F] [IsDomain F] (f g : Polynomial (Polynomial F)) (hf : f 0) (hg : g 0) :
                f * g 0

                Over an integral domain, the product of two non-zero bivariate polynomials is non-zero.

                @[simp]
                theorem Polynomial.Bivariate.degreeY_mul {F : Type u_1} [Semiring F] [IsDomain F] (f g : Polynomial (Polynomial F)) (hf : f 0) (hg : g 0) :

                Over an integral domain, the Y-degree of the product of two non-zero bivariate polynomials is equal to the sum of their degrees.

                theorem Polynomial.Bivariate.exists_max_index_degreeX {F : Type u_1} [Semiring F] (f : Polynomial (Polynomial F)) (hf : f 0) :
                mmf.support, (f.coeff mm).natDegree = degreeX f ∀ (n : ), mm < n(f.coeff n).natDegree < degreeX f f.coeff n = 0
                theorem Polynomial.Bivariate.natDegree_sum_eq_of_unique {F : Type u_1} [Semiring F] {α : Type u_2} {s : Finset α} {f : αPolynomial F} {deg : } (mx : α) (hmx : mx s) :
                (f mx).natDegree = deg(∀ ys, y mx(f y).natDegree < deg f y = 0)(∑ xs, f x).natDegree = deg
                theorem Polynomial.Bivariate.degreeX_mul_ge {F : Type u_1} [Semiring F] [IsDomain F] (f g : Polynomial (Polynomial F)) (hf : f 0) (hg : g 0) :
                theorem Polynomial.Bivariate.degreeX_mul {F : Type u_1} [Semiring F] [IsDomain F] (f g : Polynomial (Polynomial F)) (hf : f 0) (hg : g 0) :
                noncomputable def Polynomial.Bivariate.evalX {F : Type u_1} [Semiring F] (a : F) (f : Polynomial (Polynomial F)) :

                The evaluation at a point of a bivariate polynomial in the first variable X.

                Instances For
                  noncomputable def Polynomial.Bivariate.evalY {F : Type u_1} [Semiring F] (a : F) (f : Polynomial (Polynomial F)) :

                  The evaluation at a point of a bivariate polynomial in the second variable Y.

                  Instances For
                    theorem Polynomial.Bivariate.card_evalX_eq_zero_le_degreeX {F : Type u_1} [Field F] [DecidableEq F] (A : Polynomial (Polynomial F)) (hA : A 0) (P : Finset F) :
                    {xP | evalX x A = 0}.card degreeX A
                    theorem Polynomial.Bivariate.descend_evalX {F : Type u_1} [Field F] {A B G A1 B1 : Polynomial (Polynomial F)} (hA : A = G * A1) (hB : B = G * B1) (x : F) (hx : evalX x G 0) (q : Polynomial F) (h : evalX x B = q * evalX x A) :
                    evalX x B1 = q * evalX x A1
                    theorem Polynomial.Bivariate.exists_x_preserve_natDegreeY {F : Type u_1} [Field F] [DecidableEq F] (B : Polynomial (Polynomial F)) (hB : B 0) (P : Finset F) (hcard : degreeX B < P.card) :
                    xP, (evalX x B).natDegree = natDegreeY B

                    The computable X-degree agrees with the Mathlib-facing degreeX after toPoly.

                    The computable total degree agrees with the Mathlib-facing total degree after toPoly.