English
The minimal polynomial minpoly_A(x) is the monic polynomial in A[X] with coefficients in A of least degree that has x as a root when x is integral over A; otherwise it is defined to be 0.
Русский
Минимальный многочлен minpoly_A(x) — моноiczный многочлен в A[X] с коэффициентами в A и минимальной степенью, для которого x является корнем, если x над A интегрирован; иначе он равен 0.
LaTeX
$$$\\minpoly_{A}(x) = \\begin{cases} p \\in A[X] : p \\text{ моноидный},\\ p(x)=0,\\ \\deg p \\text{ минимально}, \\\\ 0, & \\text{если } x \\text{ не интегрирован над } A. \\end{cases}$$$
Lean4
/-- Suppose `x : B`, where `B` is an `A`-algebra.
The minimal polynomial `minpoly A x` of `x`
is a monic polynomial with coefficients in `A` of smallest degree that has `x` as its root,
if such exists (`IsIntegral A x`) or zero otherwise.
For example, if `V` is a `𝕜`-vector space for some field `𝕜` and `f : V →ₗ[𝕜] V` then
the minimal polynomial of `f` is `minpoly 𝕜 f`.
-/
@[stacks 09GM]
noncomputable def minpoly (x : B) : A[X] :=
if hx : IsIntegral A x then degree_lt_wf.min _ hx else 0