English
There is a coefficient function coeff that takes a polynomial and returns its coefficient sequence, i.e., coeff(p,n) is the coefficient of X^n in p.
Русский
Существует функция коэффициентов coeff, которая отображает полином в последовательность его коэффициентов: coeff(p,n) — коэффициент при X^n в p.
LaTeX
$$$\mathrm{coeff}(p,n) = [X^{n}]\,p$$$
Lean4
/-- `coeff p n` (often denoted `p.coeff n`) is the coefficient of `X^n` in `p`. -/
def coeff : R[X] → ℕ → R
| ⟨p⟩ => p