English
The nilpotency class nilpotencyClass(x) of an element x is the least natural number k with x^k = 0 when such k exists; otherwise it is the least upper bound (infimum) of those k with x^k = 0.
Русский
Нилпотентность класса элемента x есть наименьшее целое k с x^k = 0, если таковое существует; иначе это касается инфимума множеств k, удовлетворяющих x^k = 0.
LaTeX
$$$ \\text{nilpotencyClass}(x) = \\inf\\{k \\in \\mathbb{N} : x^k = 0\\} $$$
Lean4
@[simp]
theorem nilpotencyClass_eq_zero_of_subsingleton [Subsingleton R] : nilpotencyClass x = 0 :=
by
let s : Set ℕ := {k | x ^ k = 0}
suffices s = univ by change sInf _ = 0; simp [s] at this; simp [this]
exact eq_univ_iff_forall.mpr fun k ↦ Subsingleton.elim _ _