Trailing degree of univariate polynomials #
Main definitions #
trailingDegree p
: the multiplicity ofX
in the polynomialp
natTrailingDegree
: a variant oftrailingDegree
that takes values in the natural numberstrailingCoeff
: the coefficient at indexnatTrailingDegree p
Converts most results about degree
, natDegree
and leadingCoeff
to results about the bottom
end of a polynomial
trailingDegree p
is the multiplicity of x
in the polynomial p
, i.e. the smallest
X
-exponent in p
.
trailingDegree p = some n
when p ≠ 0
and n
is the smallest power of X
that appears
in p
, otherwise
trailingDegree 0 = ⊤
.
Equations
- p.trailingDegree = p.support.min
Instances For
natTrailingDegree p
forces trailingDegree p
to ℕ
, by defining
natTrailingDegree ⊤ = 0
.
Equations
- p.natTrailingDegree = Option.getD p.trailingDegree 0
Instances For
trailingCoeff p
gives the coefficient of the smallest power of X
in p
Equations
- p.trailingCoeff = p.coeff p.natTrailingDegree
Instances For
a polynomial is monic_at
if its trailing coefficient is 1
Instances For
Equations
- Polynomial.TrailingMonic.decidable = inferInstanceAs (Decidable (p.trailingCoeff = 1))
Alias of Polynomial.natTrailingDegree_natCast
.
Alias of Polynomial.natTrailingDegree_intCast
.
The second-lowest coefficient, or 0 for constants
Instances For
Alias of the reverse direction of Polynomial.Monic.eq_X_pow_iff_natTrailingDegree_eq_natDegree
.