Documentation

Mathlib.Algebra.Polynomial.Homogenize

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].

noncomputable def Polynomial.homogenize {R : Type u_1} [CommSemiring R] (p : Polynomial R) (n : β„•) :

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
    Instances For
      @[simp]
      theorem Polynomial.homogenize_smul {R : Type u_1} [CommSemiring R] {S : Type u_2} [Semiring S] [Module S R] (c : S) (p : Polynomial R) (n : β„•) :

      homogenize as a bundled linear map.

      Equations
        Instances For
          @[simp]
          theorem Polynomial.homogenize_finsetSum {R : Type u_1} [CommSemiring R] {ΞΉ : Type u_2} (s : Finset ΞΉ) (p : ΞΉ β†’ Polynomial R) (n : β„•) :
          (βˆ‘ i ∈ s, p i).homogenize n = βˆ‘ i ∈ s, (p i).homogenize n
          @[simp]
          theorem Polynomial.homogenize_C_mul {R : Type u_1} [CommSemiring R] (c : R) (p : Polynomial R) (n : β„•) :
          @[simp]
          theorem Polynomial.homogenize_monomial {R : Type u_1} [CommSemiring R] {m n : β„•} (h : m ≀ n) (r : R) :
          theorem Polynomial.homogenize_monomial_of_lt {R : Type u_1} [CommSemiring R] {m n : β„•} (h : n < m) (r : R) :
          ((monomial m) r).homogenize n = 0
          @[simp]
          theorem Polynomial.homogenize_X_pow {R : Type u_1} [CommSemiring R] {m n : β„•} (h : m ≀ n) :
          theorem Polynomial.evalβ‚‚_homogenize_of_eq_one {R : Type u_1} [CommSemiring R] {S : Type u_2} [CommSemiring S] {p : Polynomial R} {n : β„•} (hn : p.natDegree ≀ n) (f : R β†’+* S) (g : Fin 2 β†’ S) (hg : g 1 = 1) :
          theorem Polynomial.aeval_homogenize_of_eq_one {R : Type u_1} [CommSemiring R] {A : Type u_2} [CommSemiring A] [Algebra R A] {p : Polynomial R} {n : β„•} (hn : p.natDegree ≀ n) (g : Fin 2 β†’ A) (hg : g 1 = 1) :
          (MvPolynomial.aeval g) (p.homogenize n) = (aeval (g 0)) p
          @[simp]

          If deg p ≀ n, then homogenize p n (x, 1) = p x.

          theorem Polynomial.homogenize_mul {R : Type u_1} [CommSemiring R] (p q : Polynomial R) {m n : β„•} (hm : p.natDegree ≀ m) (hn : q.natDegree ≀ n) :
          (p * q).homogenize (m + n) = p.homogenize m * q.homogenize n
          theorem Polynomial.homogenize_finsetProd {R : Type u_1} [CommSemiring R] {ΞΉ : Type u_2} {s : Finset ΞΉ} {p : ΞΉ β†’ Polynomial R} {n : ΞΉ β†’ β„•} (h : βˆ€ i ∈ s, (p i).natDegree ≀ n i) :
          (∏ i ∈ s, p i).homogenize (βˆ‘ i ∈ s, n i) = ∏ i ∈ s, (p i).homogenize (n i)
          @[simp]
          theorem Polynomial.homogenize_sub {R : Type u_1} [CommRing R] (p q : Polynomial R) (n : β„•) :
          theorem Polynomial.eval_homogenize {K : Type u_1} [Semifield K] {p : Polynomial K} {n : β„•} (hn : p.natDegree ≀ n) (x : Fin 2 β†’ K) (hx : x 1 β‰  0) :
          (MvPolynomial.eval x) (p.homogenize n) = eval (x 0 / x 1) p * x 1 ^ n