Cubics and discriminants #
This file defines cubic polynomials over a semiring and their discriminants over a splitting field.
Main definitions #
Cubic
: the structure representing a cubic polynomial.Cubic.disc
: the discriminant of a cubic polynomial.
Main statements #
Cubic.disc_ne_zero_iff_roots_nodup
: the cubic discriminant is not equal to zero if and only if the cubic has no duplicate roots.
References #
Tags #
cubic, discriminant, polynomial, root
Coefficients #
theorem
Cubic.of_c_eq_zero'
{R : Type u_1}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := 0, d := d }.toPoly = Polynomial.C d
theorem
Cubic.of_d_eq_zero'
{R : Type u_1}
[Semiring R]
:
{ a := 0, b := 0, c := 0, d := 0 }.toPoly = 0
theorem
Cubic.leadingCoeff_of_c_eq_zero'
{R : Type u_1}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := 0, d := d }.toPoly.leadingCoeff = d
theorem
Cubic.monic_of_a_eq_one'
{R : Type u_1}
{b : R}
{c : R}
{d : R}
[Semiring R]
:
{ a := 1, b := b, c := c, d := d }.toPoly.Monic
theorem
Cubic.monic_of_b_eq_one'
{R : Type u_1}
{c : R}
{d : R}
[Semiring R]
:
{ a := 0, b := 1, c := c, d := d }.toPoly.Monic
theorem
Cubic.monic_of_c_eq_one'
{R : Type u_1}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := 1, d := d }.toPoly.Monic
Degrees #
@[simp]
theorem
Cubic.equiv_symm_apply_b
{R : Type u_1}
[Semiring R]
(f : { p : Polynomial R // p.degree ≤ 3 })
:
(Cubic.equiv.symm f).b = (↑f).coeff 2
@[simp]
theorem
Cubic.equiv_symm_apply_a
{R : Type u_1}
[Semiring R]
(f : { p : Polynomial R // p.degree ≤ 3 })
:
(Cubic.equiv.symm f).a = (↑f).coeff 3
@[simp]
theorem
Cubic.equiv_symm_apply_c
{R : Type u_1}
[Semiring R]
(f : { p : Polynomial R // p.degree ≤ 3 })
:
(Cubic.equiv.symm f).c = (↑f).coeff 1
@[simp]
theorem
Cubic.equiv_symm_apply_d
{R : Type u_1}
[Semiring R]
(f : { p : Polynomial R // p.degree ≤ 3 })
:
(Cubic.equiv.symm f).d = (↑f).coeff 0
The equivalence between cubic polynomials and polynomials of degree at most three.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Cubic.degree_of_a_eq_zero'
{R : Type u_1}
{b : R}
{c : R}
{d : R}
[Semiring R]
:
{ a := 0, b := b, c := c, d := d }.toPoly.degree ≤ 2
theorem
Cubic.degree_of_b_eq_zero'
{R : Type u_1}
{c : R}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := c, d := d }.toPoly.degree ≤ 1
theorem
Cubic.degree_of_c_eq_zero'
{R : Type u_1}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := 0, d := d }.toPoly.degree ≤ 0
theorem
Cubic.natDegree_of_a_eq_zero'
{R : Type u_1}
{b : R}
{c : R}
{d : R}
[Semiring R]
:
{ a := 0, b := b, c := c, d := d }.toPoly.natDegree ≤ 2
theorem
Cubic.natDegree_of_b_eq_zero'
{R : Type u_1}
{c : R}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := c, d := d }.toPoly.natDegree ≤ 1
theorem
Cubic.natDegree_of_c_eq_zero'
{R : Type u_1}
{d : R}
[Semiring R]
:
{ a := 0, b := 0, c := 0, d := d }.toPoly.natDegree = 0
@[simp]
Map across a homomorphism #
Roots over an extension #
theorem
Cubic.card_roots_le
{R : Type u_1}
{P : Cubic R}
[CommRing R]
[IsDomain R]
[DecidableEq R]
:
P.roots.toFinset.card ≤ 3