By a classical result of Birkhoff (that is, Theorem 2 in [G. Birkhoff, _Subdirect unions in universal algebra_, Bull. AMS, 1944]) and the trivial fact that the class of semigroups is closed under the taking of homomorphic images within the category of magmas, every semigroup is (isomorphic to) a subdirect product of subdirectly irreducible semigroups. What about _cancellative_ semigroups? More precisely: > **Q.** Is every cancellative semigroup a subdirect product of subdirectly irreducible, cancellative semigroups? If a semigroup $T$ is the homomorphic image of a cancellative semigroup $S$, then $T$ need not be cancellative (otherwise we would be done). However, I am hoping that there is a generalization of Birkhoff's theorem that applies not only to (finitary) algebras in the sense of Birkhoff's paper, but also to algebras (such as cancellative semigroups) that satisfy certain equational implications. UPDATE 1. [Below][1], Keith Kearnes proves that the answer is yes in the commutative setting. [1]: https://mathoverflow.net/a/480207/16537