English
For a polynomial P over a semiring R, coeffList is the list of its coefficients from the leading term down to the constant term.
Русский
Для полинома P над полупрямым кольцом R, coeffList — список коэффициентов, начиная с старшего члена и заканчиваться постоянным коэффициентом.
LaTeX
$$$ \\text{coeffList}(P) = [ \\text{coeff}(P, \\text{deg}(P) ), \\dots, \\text{coeff}(P, 0) ] $$$
Lean4
/-- The list of coefficients starting from the leading term down to the constant term. -/
def coeffList (P : R[X]) : List R :=
(List.range P.degree.succ).reverse.map P.coeff