(From http://mathworld.wolfram.com/Semiring.html)

A semiring is a set together with two binary operators S(+, *) satisfying the following conditions:

1. Additive associativity: For all a, b, c in S, (a + b) + c = a + (b + c),
2. Additive commutativity: For all a, b in S, a + b = b + a,
3. Multiplicative associativity: For all a, b, c in S, (a * b) * c = a * (b * c),
4. Left and right distributivity: For all a, b, c in S, a * (b + c) = (a * b) + (a * c) and (b + c) * a = (b * a) + (c * a).

A semiring is therefore a commutative semigroup under addition and a semigroup under multiplication. A semiring can be empty.

References:

  • Rosenfeld, A. An Introduction to Algebraic Structures. New York: Holden-Day, 1968.