"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
- p.mirror = p.reverse * Polynomial.X ^ p.natTrailingDegree
Instances For
theorem
Polynomial.mirror_natDegree
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.natDegree = p.natDegree
theorem
Polynomial.mirror_natTrailingDegree
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.natTrailingDegree = p.natTrailingDegree
theorem
Polynomial.mirror_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.mirror = p
@[simp]
@[simp]
@[simp]
theorem
Polynomial.mirror_trailingCoeff
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.trailingCoeff = p.leadingCoeff
@[simp]
theorem
Polynomial.mirror_leadingCoeff
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.leadingCoeff = p.trailingCoeff
theorem
Polynomial.natDegree_mul_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
[NoZeroDivisors R]
:
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 q : Polynomial R)
[NoZeroDivisors R]
:
theorem
Polynomial.mirror_smul
{R : Type u_1}
[Ring R]
(p : Polynomial R)
[NoZeroDivisors R]
(a : R)
:
theorem
Polynomial.irreducible_of_mirror
{R : Type u_1}
[CommRing R]
[NoZeroDivisors R]
{f : Polynomial R}
(h1 : ¬IsUnit f)
(h2 : ∀ (k : Polynomial R), f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror)
(h3 : IsRelPrime f f.mirror)
: