Homogenize a univariate polynomial #
In this file we define a function Polynomial.homogenize p n
that takes a polynomial p and a natural number n
and returns a homogeneous bivariate polynomial of degree n.
If n is at least the degree of p, then (homogenize p n).eval ![x, 1] = p.eval x.
We use MvPolynomial (Fin 2) R to represent bivariate polynomials
instead of R[X][Y] (i.e., Polynomial (Polynomial R)),
because Mathlib has a theory about homogeneous multivariate polynomials,
but not about homogeneous bivariate polynomials encoded as R[X][Y].
Given a polynomial p and a number n ≥ natDegree p,
returns a homogeneous bivariate polynomial q of degree n such that q(x, 1) = p(x).
It is defined as ∑ k + l = n, a_k X_0^k X_1^l, where a_k is the kth coefficient of p.
Equations
- p.homogenize n = ∑ kl ∈ Finset.antidiagonal n, (MvPolynomial.monomial fun₀ | 0 => kl.1 | 1 => kl.2) (p.coeff kl.1)
Instances For
homogenize as a bundled linear map.
Equations
- Polynomial.homogenizeLM n = { toFun := fun (p : Polynomial R) => p.homogenize n, map_add' := ⋯, map_smul' := ⋯ }
Instances For
If deg p ≤ n, then homogenize p n (x, 1) = p x.