Idempotent powers in a finite semigroup #
Every element of a finite semigroup has an idempotent positive power. This is the basic structural fact behind the equational description of semigroup pseudovarieties: it is what makes a homomorphic image of a member a member, since a preimage of an idempotent need not itself be idempotent, but an idempotent power of a preimage is one and has the same image.
The monoid case is Monoid.exists_pos_pow_isIdempotent. The semigroup case is obtained from it by
adjoining an identity: WithOne S is a finite monoid, positive powers of a coerced element are
themselves coerced, and WithOne.coe_inj transfers idempotency back.
Main results #
Semigroup.exists_isIdempotentElem: a finite nonempty semigroup contains an idempotent.Semigroup.exists_isIdempotentElem_map_eq: a surjective homomorphism onto a semigroup lifts an idempotent to an idempotent — the form the pseudovariety quotient-closure proof consumes.
WithOne S is Option S, so it inherits finiteness.
Idempotency is detected by the coercion into WithOne.
A positive power of a coerced element of WithOne S is itself coerced.
A finite nonempty semigroup contains an idempotent.
A surjective homomorphism lifts an idempotent to an idempotent: replace a preimage by an idempotent power of it, which the homomorphism still sends to the (idempotent) target.