6

What is an instructive example of a set $X$ equipped with two monoid structures $(X,+,0)$, $(X,\cdot,1)$, such that $+$ is commutative, the distributive laws hold, but $0 \cdot x = 0$ or $x \cdot 0 = 0$ do not hold?

Notice that in case these two absorbing laws hold, one calls $(X,+,0,\cdot,1)$ a semiring. At first sight, it might be surprising that these laws have to be imposed, but this is quite natural from a more general point of view, namely the multiplication $\cdot : X \times X \to X$ should be an additive monoid homomorphism in each variable, and it is known that one has to demand that monoid homomorphisms preserve the neutral element.

2 Answers2

5

Let $S$ be the set of pairs in $\Bbb R^2$ of the form $[a,b]$ where $a\leq 0$ and $b\geq 0$.

Define $$[a,b]+[a',b']=[\min(a,a'),\max(b,b')]$$ and

$$[a,b][a',b']=[a+a',b+b']$$

All it takes for distributivity are the identities $\min(a,a')+c=\min(a+c,a'+c)$ and $\max(b,b')+c=\max(b+c,b'+c)$.

It turns out that $e=[0,0]$ is the neutral element for both operations of $S$, so $a=a+e=ae$, and then it's impossible for $e$ to multiplicatively absorb non $e$ elements.

rschwieb
  • 153,510
2

This is an old question, but I think there are quite a few natural examples of "almost-semirings".

Here are more in which the additive and multiplicative identities are equal:

  • $(\mathbb{N}, \max, 0, +, 0)$, $(\mathbb{Q}_{\geq 0}, \max, 0, +, 0)$, and $(\mathbb{R}_{\geq 0}, \max, 0, +, 0)$
  • $(\Sigma^\star, {}^\frown, \varepsilon, \max, \varepsilon)$, where $\Sigma$ is an alphabet with a fixed total ordering, $\Sigma^\star$ is the set of strings over $\Sigma$, ${}^\frown$ is string concatenation, $\varepsilon$ is the empty string, and $\max$ is the binary maximum of strings ordered under either the lexicographical, co-lexicographical, or shortlex orderings.
  • $(\{B \subseteq A \mid e \in B\}, \ast_\mathcal{P}, \{e\}, \cup, \{e\})$, where $(A, \ast, e)$ is a monoid and $\ast_\mathcal{P}$ is defined by $$B \ast_\mathcal{P} C = \{b \ast c \mid b \in B, c \in C\}.$$
  • $(A, \ast, e, \ast, e)$ where $\ast$ is a idempotent, associative, commutative operation on $A$ with identity $e$ (e.g., $(\mathcal{P}(S), \cup, \emptyset, \cup, \emptyset)$ or $(\mathcal{P}(S), \cap, S, \cap, S)$).

Here's one in which the identities aren't equal:

  • $(\mathbb{R} \cup \{-\infty, \infty\}, \max, -\infty, + , 0)$ in which we define $\infty + (-\infty) = \infty$, making $\infty$ the multiplicative annihilator instead of the additive identity $-\infty$.

It's perhaps worth remarking that an "almost-semiring" $(A, +, 0, \cdot, 1)$ can be augmented to create a semiring by adding a formal additive identity $\hat{0}$ and defining $\hat{0} \cdot a = a \cdot \hat{0} = \hat{0}$ for all $a \in A \cup \{\hat{0}\}$.

Hayden
  • 16,737
  • regarding your comment at the end of the answer, I suppose the original additive identity 0 for {A, +, 0} couldn't still be an additive identity once you include 0-hat, since otherwise 0 and 0-hat would be equal, yes? – Tim Goodman Jan 17 '23 at 01:49
  • 1
    @TimGoodman That's correct, we'd have $\hat{0} + 0 = 0$, for example. – Hayden Jan 17 '23 at 02:31