A semiring is a mathematical construct that abstracts some notion of "plus" and "times" on mathematical objects.
These objects can be numbers, but may also be other objects such as strings.
More formally, a semiring is a setR equipped
with two binary
operations⊕ and ⊗, called addition and
multiplication, such that: