Semiring
In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse.
The term rig is also used occasionally — this originated as a joke, suggesting that rigs are rings without negative elements, similar to using rng to mean a ring without a multiplicative identity.
Definition
A semiring is a set R equipped with two binary operations + and ·, called addition and multiplication, such that:
(R, +) is a commutative monoid with identity element 0:
- (a + b) + c = a + (b + c)
- 0 + a = a + 0 = a
- a + b = b + a
(a + b) + c = a + (b + c)
0 + a = a + 0 = a
a + b = b + a
(R, ·) is a monoid with identity element 1:
- (a·b)·c = a·(b·c)
- 1·a = a·1 = a
(a·b)·c = a·(b·c)
1·a = a·1 = a
Multiplication left and right distributes over addition:
- a·(b + c) = (a·b) + (a·c)
- (a + b)·c = (a·c) + (b·c)
a·(b + c) = (a·b) + (a·c)
(a + b)·c = (a·c) + (b·c)
Multiplication by 0 annihilates R:
- 0·a = a·0 = 0
0·a = a·0 = 0
This last axiom is omitted from the definition of a ring: it follows from the other ring axioms. Here it does not, and it is necessary to state it in the definition.