Commuting pairs of elements in monoids

Main definitions

We prove that centralizer and set_centralilzer are submonoid/subgroups/subrings depending on the available structures, and provide operations on commute _ _.

E.g., if a, b, and c are elements of a semiring, and that hb : commute a b and hc : commute a c. Then hb.pow_left 5 proves commute (a ^ 5) b and (hb.pow_right 2).add_right (hb.mul_right hc) proves commute a (b ^ 2 + b * c).

Lean does not immediately recognise these terms as equations, so for rewriting we need syntax like rw [(hb.pow_left 5).eq] rather than just rw [hb.pow_left 5].

Implementation details

Most of the proofs come from the properties of semiconj_by.


commute

Two elements commute, if a * b = b * a.

commute.eq

Equality behind commute a b; useful for rewriting.

commute.refl

Any element commutes with itself.

commute.symm

If a commutes with b, then b commutes with a.

commute.mul_right

If a commutes with both b and c, then it commutes with their product.

commute.mul_left

If both a and b commute with c, then their product commutes with c.

centralizer

Centralizer of an element a : S is the set of elements that commute with a.

set.centralizer

Centralizer of a set T is the set of elements that commute with all a ∈ T.