# Definition:Semiring (Abstract Algebra)

## Definition

A semiring is a ringoid $\struct {S, *, \circ}$ in which:

$(1): \quad \struct {S, *}$ forms a semigroup
$(2): \quad \struct {S, \circ}$ forms a semigroup.

That is, such that $\struct {S, *, \circ}$ has the following properties:

 $(\text A 0)$ $:$ $\displaystyle \forall a, b \in S:$ $\displaystyle a * b \in S$ $(\text A 1)$ $:$ $\displaystyle \forall a, b, c \in S:$ $\displaystyle \paren {a * b} * c = a * \paren {b * c}$ $(\text M 0)$ $:$ $\displaystyle \forall a, b \in S:$ $\displaystyle a \circ b \in S$ $(\text M 1)$ $:$ $\displaystyle \forall a, b, c \in S:$ $\displaystyle \paren {a \circ b} \circ c = a \circ \paren {b \circ c}$ $(\text D)$ $:$ $\displaystyle \forall a, b, c \in S:$ $\displaystyle a \circ \paren {b * c} = \paren {a \circ b} * \paren {a \circ c}$ $\displaystyle \paren {a * b} \circ c = \paren {a \circ c} * \paren {b \circ c}$

These are called the semiring axioms.

## Also defined as

There are various other conventions on what constitutes a semiring.

Some of these have a distinguished, different name on $\mathsf{Pr} \infty \mathsf{fWiki}$:

Still, some sources impose further that there be a identity element for the distributor, that is, that $\struct {S, \circ}$ be a monoid.

Such a structure could be referred to as a rig with unity, consistent with the definition of ring with unity.

This website thus specifically defines a semiring as one fulfilling axioms $\text A 0, \text A 1, \text M 0, \text M 1, \text D$ only (that is, as two semigroups bound by distributivity).