English
In a cancellative monoid of exponent two, all elements commute.
Русский
В(cancel) cancellative моноиде с экспонентой 2 все элементы коммутируют.
LaTeX
$$$[IsCancelMul G] \land (\operatorname{exponent} G = 2) \Rightarrow \forall a,b \in G,\ ab=ba$$$
Lean4
/-- In a cancellative monoid of exponent two, all elements commute. -/
@[to_additive]
theorem mul_comm_of_exponent_two [IsCancelMul G] (hG : Monoid.exponent G = 2) (a b : G) : a * b = b * a :=
Commute.of_orderOf_dvd_two (fun g => hG ▸ Monoid.order_dvd_exponent g) a b