Definition:Semiring (Abstract Algebra)

A semiring is a ringoid $$\left({S, *, \circ}\right)$$ in which both $$\left({S, *}\right)$$ and $$\left({S, \circ}\right)$$ form semigroups.

That is, $$\left({S, *, \circ}\right)$$ has the following properties:


 * $$\left({S, *, \circ}\right)$$ is closed under both $$*$$ and $$\circ$$;
 * Both $$*$$ and $$\circ$$ associative on $$S$$;
 * $$\circ$$ distributes over $$*$$.