English
Let M be a monoid and S a subset of M. The centralizer of S consists of all elements of M that commute with every element of S; it forms a submonoid of M.
Русский
Пусть M — моноид, S ⊆ M. Центральizer(S) состоит из всех элементов M, которые commute с каждым элементом S; образует подмоноид M.
LaTeX
$$$\operatorname{centralizer}(S) = \{ m \in M \mid \forall s \in S,\, m s = s m \}$$$
Lean4
/-- The centralizer of a subset of a monoid `M`. -/
@[to_additive /-- The centralizer of a subset of an additive monoid. -/
]
def centralizer : Submonoid M where
carrier := S.centralizer
one_mem' := S.one_mem_centralizer
mul_mem' := Set.mul_mem_centralizer