Documentation

CompPoly.Bivariate.Deriv

Partial Derivatives and Multiplicity of Computable Bivariate Polynomials #

This file defines partial derivatives (partialDerivX, partialDerivY, iterated and mixed partials) and the multiplicity condition hasMultiplicity used in the Guruswami–Sudan interpolation step.

Multiplicity of a root at (a, b) is defined through the Taylor shift shiftC a b Q = Q(X + a, Y + b). Q has multiplicity at least r at (a, b) when every coefficient of the shifted polynomial of total degree less than r is zero. This is the Hasse-derivative criterion for root multiplicity over a field of any characteristic: the coefficient of Xⁱ Yʲ in shiftC a b Q is the order-(i, j) Hasse derivative of Q evaluated at (a, b). The zero polynomial has infinite multiplicity. As an aside, ordinary partial derivatives fail to capture this in positive characteristic. The integer factor introduced by differentiation can vanish, so its product with a nonzero coefficient may become zero.

shiftC_toPoly identifies the computable shift with Mathlib's Polynomial.Bivariate.shift, and hasMultiplicity_iff_rootMultiplicity proves that hasMultiplicity agrees with the reference Polynomial.Bivariate.rootMultiplicity.

Partial derivative with respect to X: differentiate each Y-coefficient in X.

Instances For

    Partial derivative with respect to Y: differentiate in the outer variable.

    Instances For
      theorem CompPoly.CBivariate.outerCoeff_support_monomial {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (f : CBivariate R) (g : CPolynomial RCPolynomial R) (hg : g 0 = 0) (j : ) :
      (∑ kCPolynomial.support f, CPolynomial.monomial k (g ((↑f).coeff k))).coeff j = g (CPolynomial.coeff f j)

      Outer coefficient of a support-sum of monomials whose Y-coefficients are mapped by a zero-preserving g: the j-th coefficient is g applied to the j-th Y-coefficient.

      Outer coefficient of the X-partial derivative: differentiate the j-th Y-coefficient.

      theorem CompPoly.CBivariate.coeff_partialDerivX {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (f : CBivariate R) (i j : ) :
      f.partialDerivX.coeff i j = f.coeff (i + 1) j * ↑(i + 1)

      Coefficient formula for the X-partial derivative.

      theorem CompPoly.CBivariate.coeff_partialDerivY {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] (f : CBivariate R) (i j : ) :
      f.partialDerivY.coeff i j = f.coeff i (j + 1) * ↑(j + 1)

      Coefficient formula for the Y-partial derivative.

      The X-partial derivative of zero is zero.

      The Y-partial derivative of zero is zero.

      The X-partial derivative distributes over addition.

      The Y-partial derivative distributes over addition.

      The X-partial derivative differentiates each Y-coefficient under toPoly.

      The Y-partial derivative corresponds to Polynomial.derivative under toPoly.

      The Y-partial derivative satisfies the Leibniz product rule.

      The X-partial derivative satisfies the Leibniz product rule.

      Iterated partial derivative with respect to X.

      Instances For

        Iterated partial derivative with respect to Y.

        Instances For

          Iterated X-partial derivative differentiates each Y-coefficient under toPoly.

          Iterated Y-partial derivative corresponds to Polynomial.derivative^[n] under toPoly.

          Mixed partial derivative: i-fold in X, then j-fold in Y.

          Instances For

            Mixed partial derivatives commute.

            def CompPoly.CBivariate.shiftY {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (b : R) (Q : CBivariate R) :

            Shift the outer Y variable: Q(X, Y + b).

            Instances For
              def CompPoly.CBivariate.shiftX {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (a : R) (Q : CBivariate R) :

              Shift the inner X variable: Q(X + a, Y), Taylor-shifting each Y-coefficient.

              Instances For
                def CompPoly.CBivariate.shiftC {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (a b : R) (Q : CBivariate R) :

                The full shift Q(X + a, Y + b).

                Instances For
                  def CompPoly.CBivariate.hasMultiplicity {R : Type u_1} [CommSemiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (Q : CBivariate R) (r : ) (a b : R) :

                  Q has multiplicity at least r at (a, b): every coefficient of the shifted polynomial Q(X + a, Y + b) of total degree < r vanishes.

                  Instances For

                    Decidable check for multiplicity.

                    Instances For

                      The outer (Y) shift corresponds to Y ↦ Y + b under toPoly.

                      Outer coefficient of the X-shift: Taylor-shift the j-th Y-coefficient.

                      The inner (X) shift corresponds to X ↦ X + a under toPoly.

                      The computable shift agrees with Polynomial.Bivariate.shift under toPoly.

                      Evaluating the outer variable at the constant C b agrees with the Horner evaluator evalY.

                      theorem CompPoly.CBivariate.coeff_shiftC_zero_zero {R : Type u_1} [CommSemiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (a b : R) (Q : CBivariate R) :
                      (shiftC a b Q).coeff 0 0 = evalEval a b Q

                      The (0,0) coefficient of the shift is evaluation at the point.

                      Multiplicity at least 1 is equivalent to vanishing at the point.

                      hasMultiplicity agrees with the reference Polynomial.Bivariate.rootMultiplicity, where none denotes infinite multiplicity (the zero polynomial).

                      Every polynomial has multiplicity at least 0 at any point.

                      theorem CompPoly.CBivariate.hasMultiplicity_succ {R : Type u_1} [CommSemiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (Q : CBivariate R) (r : ) (a b : R) :
                      Q.hasMultiplicity (r + 1) a bQ.hasMultiplicity r a b

                      Multiplicity is monotone: higher multiplicity implies lower.

                      theorem CompPoly.CBivariate.toPoly_injective {R : Type u_1} [Semiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] {P Q : CBivariate R} (h : P.toPoly = Q.toPoly) :
                      P = Q

                      toPoly is injective on canonical bivariate polynomials.

                      theorem CompPoly.CBivariate.shiftC_add {R : Type u_1} [CommSemiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (a b : R) (P Q : CBivariate R) :
                      shiftC a b (P + Q) = shiftC a b P + shiftC a b Q

                      The generic Taylor shift is additive.

                      theorem CompPoly.CBivariate.shiftC_mul {R : Type u_1} [CommSemiring R] [BEq R] [LawfulBEq R] [Nontrivial R] [DecidableEq R] (a b : R) (P Q : CBivariate R) :
                      shiftC a b (P * Q) = shiftC a b P * shiftC a b Q

                      The generic Taylor shift is multiplicative.

                      The decidable check agrees with the propositional multiplicity.