Can the empty set serve as universe of a semigroup (i.e. set equipped with associative binary operation)?

First, I want to reiterate my comment above to the OP - I believe that empty structures should always be allowed, both in universal algebra and in model theory. Nothing goes seriously wrong when you include them.

But let me play the devil's advocate for a moment and point out one thing that could apparently go wrong: ultraproducts (see Sections IV.6 and V.2 in Burris and Sankappanavar). Let $(A_i)_{i\in I}$ be a family of algebras, indexed by the set $I$, and let $U$ be an ultrafilter on $I$. Then the ultraproduct is defined to be the quotient of the product $\prod_{i\in I} A_i$ by the congruence $\theta_U$, defined by $((a_i), (b_i))\in \theta_U$ if and only if $\{i\in I\mid a_i = b_i\}\in U$.

Now we'd really like to have Łoś's theorem, which says (in a special case) that an identity holds in the ultraproduct if and only if the set of factors on which it holds is in $U$. But observe that if any single $A_i$ is empty, the product of the $A_i$ is empty, so the ultraproduct is empty. Now Łoś's theorem can fail: for example, suppse $U$ is a non-principal ultrafilter, one $A_{i^*}$ is empty, and every other $A_i$ has at least $2$ elements. Then the identity $x = y$ holds in the ultraproduct (vacuously), but the set of $i\in I$ such that it holds in $A_i$ is the singleton $\{i^*\}$, which is not in $U$.

But this just means we're using the wrong definition of ultraproduct! The correct definition is: $$\prod_{i\in I} A_i/U = \varinjlim_{X\in U} \prod_{i\in X} A_i.$$ Here we look at each set $X\subseteq I$ in the ultrafilter, and take the $X$-indexed product $\prod_{i\in X} A_i$. Whenever $Y\subseteq X$, we have a projection map $\pi^X_Y$ from the $X$-indexed product to the $Y$-indexed product. The resulting system of products and connecting maps is directed (since $U$ is a filter), and we take the directed colimit.

This definition gives an ultraproduct which is isomorphic to the old one in the case when all of the $A_i$ are nonempty. But it gives a non-empty ultraproduct when the set of non-empty factors is in $U$, and it allows you to prove Łoś's theorem in this context.


There is nothing wrong with allowing the carrier set of an algebra to be empty. Arguably it is a more natural and modern approach to allow for structures to be empty in general. The Wikipedia definitions of algebra and semigroup, for instance, do not exclude this possibility. It's not uncommon though, especially in older texts, to see a requirement that structures be nonempty, which does create some blemishes in the theory, as you've observed.