English
In a commutative monoid M, the square submonoid consists of all squares in M.
Русский
В коммутативном полугруппе M квадратный подпорожок состоит из всех квадратов в M.
LaTeX
$$$\\text{square } M = \\{ x \\in M \\mid \\exists y \\in M, x = y^{2} \\}$$$
Lean4
/-- In a commutative monoid `M`, `Submonoid.square M` is the submonoid of squares in `M`.
-/
@[to_additive /-- In a commutative additive monoid `M`, `AddSubmonoid.even M`
is the submonoid of even elements in `M`. -/
]
def square : Submonoid M where
__ := Subsemigroup.square M
one_mem' := IsSquare.one