Computable Bivariate Polynomials #
This file defines CBivariate R, the computable representation of bivariate polynomials with
coefficients in R. The type is CPolynomial (CPolynomial R), i.e. polynomials in Y with
coefficients that are polynomials in X, matching Mathlib's R[X][Y]
(i.e. Polynomial (Polynomial R)).
The design is intended to be compatible with:
- Mathlib's
Polynomial.Bivariate(seeCompPoly/Bivariate/ToPoly.lean) - ArkLib's
Polynomial.Bivariateinterface (see ArkLib/Data/Polynomial/Bivariate.lean and ArkLib/Data/CodingTheory/PolishchukSpielman/Degrees.lean, BCIKS20.lean, etc.)
Computable bivariate polynomials: F[X][Y] as CPolynomial (CPolynomial R).
Each p : CBivariate R is a polynomial in Y whose coefficients are univariate polynomials
in X. The outer structure is indexed by powers of Y, the inner by powers of X.
Instances For
Extensionality: two bivariate polynomials are equal if their underlying values are.
Coerce to the underlying univariate polynomial (in Y) with polynomial coefficients.
The zero bivariate polynomial is canonical.
Additive structure on CBivariate R
Ring structure on CBivariate R (for ring equiv with Mathlib in ToPoly).
Constant as a bivariate polynomial. Mathlib: Polynomial.Bivariate.CC.
Instances For
The variable X (inner variable). As bivariate: polynomial in Y with single coeff X at Y^0.
Instances For
The variable Y (outer variable). Monomial Y^1 with coefficient 1.
Instances For
Monomial c * X^n * Y^m. ArkLib: Polynomial.Bivariate.monomialXY.
Instances For
Coefficient of X^i Y^j in the bivariate polynomial. Here i is the X-exponent (inner)
and j is the Y-exponent (outer). ArkLib: Polynomial.Bivariate.coeff f i j.
Instances For
The Y-support: indices j such that the coefficient of Y^j is nonzero.
Instances For
The X-support: indices i such that the coefficient of X^i is nonzero (i.e. some monomial X^i Y^j has nonzero coefficient).
Instances For
The Y-degree (degree when viewed as a polynomial in Y).
ArkLib: Polynomial.Bivariate.natDegreeY.
Instances For
The X-degree: maximum over all Y-coefficients of their degree in X.
ArkLib: Polynomial.Bivariate.natDegreeX.
Instances For
Total degree: max over monomials of (deg_X + deg_Y).
ArkLib: Polynomial.Bivariate.totalDegree.
Instances For
The (u, v)-weighted degree: max over monomials of u * deg_X + v * deg_Y.
Instances For
Evaluate in the first variable (X) at a, yielding a univariate polynomial in Y.
ArkLib: Polynomial.Bivariate.evalX.
Instances For
Evaluate in the second variable (Y) at a, yielding a univariate polynomial in X.
ArkLib: Polynomial.Bivariate.evalY.
Instances For
Full evaluation at (x, y): p(x, y). Inner variable X at x, outer variable Y at y.
Equivalently (evalY y f).eval x. Mathlib: Polynomial.evalEval.
Instances For
Swap the roles of X and Y.
ArkLib/Mathlib: Polynomial.Bivariate.swap.
TODO a more efficient implementation
Instances For
Leading coefficient when viewed as a polynomial in Y.
ArkLib: Polynomial.Bivariate.leadingCoeffY.
Instances For
Leading coefficient when viewed as a polynomial in X. The coefficient of X^(degreeX f): a polynomial in Y.
Instances For
The total degree is the (1, 1)-weighted degree.
The X-degree is the (1, 0)-weighted degree.