The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.Algebra.Polynomial.Mirror

23 declarations. Mathlib docs · Source

"Mirror" of a univariate polynomial

In this file we define Polynomial.mirror, a variant of Polynomial.reverse. The difference between reverse and mirror is that reverse will decrease the degree if the polynomial is divisible by X.

Main definitions

  • Polynomial.mirror

Main results

  • Polynomial.mirror_mul_of_domain: mirror preserves multiplication.
  • Polynomial.irreducible_of_mirror: an irreducibility criterion involving mirror

def Polynomial.mirror E3 #

{R : Type u_1} → [inst : Semiring R] → Polynomial R → Polynomial R

mirror of a polynomial: reverses the coefficients while preserving Polynomial.natDegree

theorem Polynomial.mirror_zero E0 #

∀ {R : Type u_1} [inst : Semiring R], Polynomial.mirror 0 = 0

theorem Polynomial.mirror_monomial E1 #

∀ {R : Type u_1} [inst : Semiring R] (n : ℕ) (a : R), ((Polynomial.monomial n) a).mirror = (Polynomial.monomial n) a

theorem Polynomial.mirror_C E1 #

∀ {R : Type u_1} [inst : Semiring R] (a : R), (Polynomial.C a).mirror = Polynomial.C a

theorem Polynomial.mirror_X E1 #

∀ {R : Type u_1} [inst : Semiring R], Polynomial.X.mirror = Polynomial.X

theorem Polynomial.mirror_natDegree E0 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), p.mirror.natDegree = p.natDegree

theorem Polynomial.mirror_natTrailingDegree E0 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), p.mirror.natTrailingDegree = p.natTrailingDegree

theorem Polynomial.coeff_mirror E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R) (n : ℕ),
  p.mirror.coeff n = p.coeff ((Polynomial.revAt (p.natDegree + p.natTrailingDegree)) n)

theorem Polynomial.mirror_eval_one E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), Polynomial.eval 1 p.mirror = Polynomial.eval 1 p

theorem Polynomial.mirror_mirror E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), p.mirror.mirror = p

theorem Polynomial.mirror_involutive E1 #

∀ {R : Type u_1} [inst : Semiring R], Function.Involutive Polynomial.mirror

theorem Polynomial.mirror_eq_iff E0 #

∀ {R : Type u_1} [inst : Semiring R] {p q : Polynomial R}, p.mirror = q ↔ p = q.mirror

theorem Polynomial.mirror_inj E0 #

∀ {R : Type u_1} [inst : Semiring R] {p q : Polynomial R}, p.mirror = q.mirror ↔ p = q

theorem Polynomial.mirror_eq_zero E0 #

∀ {R : Type u_1} [inst : Semiring R] {p : Polynomial R}, p.mirror = 0 ↔ p = 0

theorem Polynomial.mirror_trailingCoeff E0 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), p.mirror.trailingCoeff = p.leadingCoeff

theorem Polynomial.mirror_leadingCoeff E0 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R), p.mirror.leadingCoeff = p.trailingCoeff

theorem Polynomial.coeff_mul_mirror E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R),
  (p * p.mirror).coeff (p.natDegree + p.natTrailingDegree) = p.sum fun x x_1 ↦ x_1 ^ 2

theorem Polynomial.natDegree_mul_mirror E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R) [NoZeroDivisors R], (p * p.mirror).natDegree = 2 * p.natDegree

theorem Polynomial.natTrailingDegree_mul_mirror E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R) [NoZeroDivisors R],
  (p * p.mirror).natTrailingDegree = 2 * p.natTrailingDegree

theorem Polynomial.mirror_mul_of_domain E3 #

∀ {R : Type u_1} [inst : Semiring R] (p q : Polynomial R) [NoZeroDivisors R], (p * q).mirror = p.mirror * q.mirror

theorem Polynomial.mirror_smul E1 #

∀ {R : Type u_1} [inst : Semiring R] (p : Polynomial R) [NoZeroDivisors R] (a : R), (a • p).mirror = a • p.mirror

theorem Polynomial.mirror_neg E1 #

∀ {R : Type u_1} [inst : Ring R] (p : Polynomial R), (-p).mirror = -p.mirror

theorem Polynomial.irreducible_of_mirror E3 #

∀ {R : Type u_1} [inst : CommRing R] [NoZeroDivisors R] {f : Polynomial R},
  ¬IsUnit f →
    (∀ (k : Polynomial R), f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror) →
      IsRelPrime f f.mirror → Irreducible f