Proofs of Correctness for CPolynomial Operations, wrt Mathlib Specs #
Proofs that operations defined on CPolynomial and CPolynomial.Raw are correct wrt the mathlib specs, using the ring equivalence
theorem
CompPoly.CPolynomial.monomial_toPoly
{R : Type u_1}
[Semiring R]
[DecidableEq R]
[LawfulBEq R]
(n : ℕ)
(c : R)
:
CPolynomial.monomial is correct wrt the Mathlib spec.
CPolynomial.C is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.X_toPoly
{R : Type u_1}
[Semiring R]
[BEq R]
[LawfulBEq R]
[Nontrivial R]
:
CPolynomial.X is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.eval_toPoly
{R : Type u_1}
[Semiring R]
[BEq R]
[LawfulBEq R]
(x : R)
(p : CPolynomial R)
:
CPolynomial.eval is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.eval₂_toPoly
{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
(f : R →+* S)
(x : S)
(p : CPolynomial R)
:
CPolynomial.eval₂ is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.leadingCoeff_toPoly
{R : Type u_1}
[Semiring R]
[BEq R]
[LawfulBEq R]
(p : CPolynomial R)
:
CPolynomial.leadingCoeff is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.erase_toPoly
{R : Type u_2}
[Ring R]
[BEq R]
[LawfulBEq R]
[DecidableEq R]
(n : ℕ)
(p : CPolynomial R)
:
CPolynomial.erase is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.C_mul_X_pow_toPoly
{R : Type u_1}
[Semiring R]
[BEq R]
[LawfulBEq R]
[DecidableEq R]
[Nontrivial R]
(r : R)
(n : ℕ)
:
CPolynomial.C r mul CPolynomial.X ^ n is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.lcoeff_toPoly
{R : Type u_1}
[Semiring R]
[BEq R]
[LawfulBEq R]
(n : ℕ)
(p : CPolynomial R)
:
CPolynomial.lcoeff is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.degreeLE_toPoly
{R : Type u_1}
[Semiring R]
{n : WithBot ℕ}
[BEq R]
[LawfulBEq R]
{p : CPolynomial R}
:
CPolynomial.degreeLE is correct wrt the Mathlib spec.
theorem
CompPoly.CPolynomial.degreeLT_toPoly
{R : Type u_1}
[Semiring R]
{n : ℕ}
[BEq R]
[LawfulBEq R]
{p : CPolynomial R}
:
CPolynomial.degreeLT is correct wrt the Mathlib spec.