"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
Instances For
theorem
Polynomial.mirror_monomial
{R : Type u_1}
[Semiring R]
(n : ℕ)
(a : R)
:
((Polynomial.monomial n) a).mirror = (Polynomial.monomial n) a
theorem
Polynomial.mirror_C
{R : Type u_1}
[Semiring R]
(a : R)
:
(Polynomial.C a).mirror = Polynomial.C a
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.coeff_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(n : ℕ)
:
p.mirror.coeff n = p.coeff ((Polynomial.revAt (p.natDegree + p.natTrailingDegree)) n)
theorem
Polynomial.mirror_eval_one
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
Polynomial.eval 1 p.mirror = Polynomial.eval 1 p
theorem
Polynomial.mirror_mirror
{R : Type u_1}
[Semiring R]
(p : Polynomial R)
:
p.mirror.mirror = 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}
:
@[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 : Polynomial R)
(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)
: