"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 #
Main results #
Polynomial.mirror_mul_of_domain
:mirror
preserves multiplication.Polynomial.irreducible_of_mirror
: an irreducibility criterion involvingmirror
mirror of a polynomial: reverses the coefficients while preserving Polynomial.natDegree
Equations
- Polynomial.mirror p = Polynomial.reverse p * Polynomial.X ^ Polynomial.natTrailingDegree p
Instances For
theorem
Polynomial.mirror_monomial
{R : Type u_1}
[Semiring R]
(n : ℕ)
(a : R)
:
Polynomial.mirror ((Polynomial.monomial n) a) = (Polynomial.monomial n) a
theorem
Polynomial.mirror_C
{R : Type u_1}
[Semiring R]
(a : R)
:
Polynomial.mirror (Polynomial.C a) = Polynomial.C a
theorem
Polynomial.mirror_X
{R : Type u_1}
[Semiring R]
:
Polynomial.mirror Polynomial.X = Polynomial.X
theorem
Polynomial.mirror_eval_one
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
Polynomial.eval 1 (Polynomial.mirror p) = Polynomial.eval 1 p
theorem
Polynomial.mirror_involutive
{R : Type u_1}
[Semiring R]
:
Function.Involutive Polynomial.mirror
theorem
Polynomial.mirror_eq_iff
{R : Type u_1}
[Semiring R]
{p : Polynomial R}
{q : Polynomial R}
:
Polynomial.mirror p = q ↔ p = Polynomial.mirror q
@[simp]
theorem
Polynomial.mirror_inj
{R : Type u_1}
[Semiring R]
{p : Polynomial R}
{q : Polynomial R}
:
Polynomial.mirror p = Polynomial.mirror q ↔ p = q
@[simp]
theorem
Polynomial.mirror_eq_zero
{R : Type u_1}
[Semiring R]
{p : Polynomial R}
:
Polynomial.mirror p = 0 ↔ p = 0
@[simp]
@[simp]
theorem
Polynomial.coeff_mul_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
Polynomial.coeff (p * Polynomial.mirror p) (Polynomial.natDegree p + Polynomial.natTrailingDegree p) = Polynomial.sum p fun (n : ℕ) (x : R) => x ^ 2
theorem
Polynomial.natDegree_mul_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
[NoZeroDivisors R]
:
Polynomial.natDegree (p * Polynomial.mirror p) = 2 * Polynomial.natDegree p
theorem
Polynomial.natTrailingDegree_mul_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
[NoZeroDivisors R]
:
theorem
Polynomial.mirror_mul_of_domain
{R : Type u_1}
[Ring R]
(p : Polynomial R)
(q : Polynomial R)
[NoZeroDivisors R]
:
Polynomial.mirror (p * q) = Polynomial.mirror p * Polynomial.mirror q
theorem
Polynomial.mirror_smul
{R : Type u_1}
[Ring R]
(p : Polynomial R)
[NoZeroDivisors R]
(a : R)
:
Polynomial.mirror (a • p) = a • Polynomial.mirror p
theorem
Polynomial.irreducible_of_mirror
{R : Type u_1}
[CommRing R]
[NoZeroDivisors R]
{f : Polynomial R}
(h1 : ¬IsUnit f)
(h2 : ∀ (k : Polynomial R),
f * Polynomial.mirror f = k * Polynomial.mirror k →
k = f ∨ k = -f ∨ k = Polynomial.mirror f ∨ k = -Polynomial.mirror f)
(h3 : ∀ (g : Polynomial R), g ∣ f → g ∣ Polynomial.mirror f → IsUnit g)
: