## Semiring naturally associated to any monoid?

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

For any monoid $M$, we can naturally construct a semiring $S$ as follows:

1. Let the additive monoid of $S$ be the free commutative monoid on $M$
2. Let the multiplicative monoid of $S$ be $M$

Then, if you make multiplication distribute over addition, you get a semiring.

This has an extremely simple interpretation: the underlying additive monoid can be interpreted as the set of finite multisets over the elements of $M$, with addition being just union of multisets. Then, semiring multiplication between multisets $A$ and $B$ is simply the multiset you get if you apply the original binary operation of $M$ pairwise to all elements in $A \times B$.

This construction is rather natural. Does it have a name, or is it well-known? I've found it interesting because it's arisen organically in music theory, where the semifield associated with a certain free abelian group representing musical intervals has the beautifully clear interpretation of being a semifield of musical chords.

There are a few nice variations on this idea:

1. You can instead force the free commutative monoid to be idempotent, so that it now has a natural interpretation as the set of finite subsets of $M$, rather than the set of finite multisets over it.
2. Given any semiring $S'$, you can use this construction on each of its monoids, giving you an algebraic structure with three operators that are totally ordered with respect to distributivity.

Do any of these things have names, and/or are they well-known?

-

2
But for the mistakes pointed out by Noah below, all of this (and much more) is found, e.g., in the 3rd chapter of Golan's Semirings and their Applications. – Salvo Tringali Feb 21 at 15:32

1
There is a forgetful functor from semirings to monoids given by taking the multiplicative monoid, and this construction is its left adjoint. Similar constructions give the group ring, group algebra, etc. – Qiaochu Yuan Feb 21 at 21:51

## 2 Answers

It is at least sometimes called a "monoid semiring" by analogy with "group ring". As such it would be notated $S = \mathbb{N_0}[M]$ (or $\mathbb{N}[M]$ depending how you define things).

By the way, the ring $\mathbb{Z}[M]$ you define in #1 is a commutative ring, but not a field because the element $2$ (the identity of M plus itself in $S$) has no inverse. Even if you use $\mathbb{Q}[M]$ in place of $\mathbb{Z}[M]$, you still do not necessarily get a field. For example, let $x$ denote a generator of $\mathbb{Z}$. Then $1+x\in \mathbb{Q}[\mathbb{Z}]$ has no multiplicative inverse.

-

2
I think it is more or less always called by this name except for by people who say "rig" instead of semiring. – Benjamin Steinberg Feb 21 at 16:36
Thanks for correcting the error, Noah, I hadn't realized that. Also, aha, never thought this could be viewed as a simple monoid generalization of the group ring! Thanks for that. – Mike Battaglia Feb 21 at 19:30

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

You are describing free constructions between finitary varieties.

A finitary variety is an equationally defined class of algebras for (i) an arbitrary set $\Sigma$ of operation symbols each $\sigma \in \Sigma$ having finite arity, (ii) an arbitrary set of equations $E$ consisting of pairs $(\phi_1,\phi_2)$ where each $\phi_i$ is a term built from the operation symbols and some fixed countable set of variables.

Then the induced finitary variety $\mathcal{V}$ is a category. Its objects are sets equipped with the operations from $\Sigma$ that satisfy the equations $E$. Its morphisms are those functions between the carriers that preserve each operation in $\Sigma$. Composition is the usual composition of functions.

Now, suppose $(\Sigma_1,E_1)$ specify the variety $\mathcal{V}_1$ and $(\Sigma_2,E_2)$ specify the variety $\mathcal{V}_2$.

In the case where $\Sigma_1 \subseteq \Sigma_2$ and $E_1 \subseteq E_2$, then there is a free construction $F : \mathcal{V}_1 \to \mathcal{V}_2$ which is the left adjoint of (i.e. uniquely determined by) the forgetful functor $U : \mathcal{V}_2 \to \mathcal{V}_1$ which merely forgets the additional operations.

Examples:

1. Let $(\Sigma_1,E_1)$ be the usual axiomatisation of monoids, so that $\mathcal{V}_1$ is the variety of monoids. Let $\Sigma_2$ also contain the additional semiring operations (you are adding +,0) and $E_2$ also contain the relevant equations (e.g. that + is a commutative monoid). Then the induced free functor $F : \mathcal{V}_1 \to \mathcal{V}_2$ is what you describe: it constructs a free commutative monoid and forces the original monoid to distribute over it in the 'simplest' way.

2. One can do the analogous thing but now with abelian groups and rings. As the above comment states, the latter are not the same thing as fields (which do not form a variety in the sense above). Or one could view the original abelian group as being a commutative multiplication to get a free construction to commutative rings.

3. Similarly one can go from monoids to idempotent semirings.

4. Your third example again follows: you are extending the signature and operations.

Two more things.

Firstly the free algebra construction $F : \mathsf{Set} \to \mathcal{V}$ is a special case: the category of sets is the finitary variety with no operations and no equations. So for example, the free monoid construction is covered.

Secondly the conditions $\Sigma_1 \subseteq \Sigma_2$ and $E_1 \subseteq E_2$ are a special case of a more general construction: a translation between algebraic theories, which again induces a unique free construction $F$ as above.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 49, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9275080561637878, "perplexity_flag": "head"}