\begin{definition}[Definition:Semiring (Abstract Algebra)]
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:
{{begin-axiom}}
{{axiom | n = \text A 0
        | q = \forall a, b \in S
        | m = a * b \in S
        | c = Closure under $*$
}}
{{axiom | n = \text A 1
        | q = \forall a, b, c \in S
        | m = \paren {a * b} * c = a * \paren {b * c}
        | c = Associativity of $*$
}}
{{axiom | n = \text M 0
        | q = \forall a, b \in S
        | m = a \circ b \in S
        | c = Closure under $\circ$
}}
{{axiom | n = \text M 1
        | q = \forall a, b, c \in S
        | m = \paren {a \circ b} \circ c = a \circ \paren {b \circ c}
        | c = Associativity of $\circ$
}}
{{axiom | n = \text D
        | q = \forall a, b, c \in S
        | m = a \circ \paren {b * c} = \paren {a \circ b} * \paren {a \circ c}
}}
{{axiom | m = \paren {a * b} \circ c = \paren {a \circ c} * \paren {b \circ c}
        | c = $\circ$ is distributive over $*$
}}
{{end-axiom}}
These are called the '''semiring axioms'''.
\end{definition}