Here’s a strange way to do arithmetic on the real numbers.
First, we’ll need to include +∞ and -∞ with the reals.
We define the new addition of two elements x and y to be -log (exp(-x) + exp(-y) ).
We define the new multiplication to be ordinary addition. (!)
In this new arithmetic +∞ is the additive identity and 0 is the multiplicative identity.
This new algebraic structure is called the log semiring. It’s called a semiring because it satisfies all the properties of a ring except that elements don’t necessarily have additive inverses. We’ll get into the details of the definition below.
* * *
Let’s put a subscript S on everything associated with our semiring in order to distinguish them from their more familiar counterparts. Then we can summarize the definitions above as
- a +S b = -log (exp(-a) + exp(-b) )
- a *S b = a + b
- 0S = +∞
- 1S = 0
Note that if we define
f(a, b) = a +S b
f(a, b) = –g(-a, –b)
where g(a, b) is the soft maximum of a and b.
* * *
Finally, we list the axioms of a semiring. Note that these equations all hold when we interpret +, *, 0, and 1 in the context of S, i.e. we imagine that each has a subscript S and is as defined above.
- (a + b) + c = a + (b + c)
- 0 + a = a + 0 = a
- a + b = b + a
- (a * b) * c = a * (b * c)
- 1 * a = a * 1 = a
- a * (b + c) = (a * b) + (a * c)
- (a + b) * c = (a * c) + (b * c)
- 0 * a = a * 0 = 0
Each of these follows immediately from writing out the definitions.
* * *
For daily tweets on algebra and other math, follow @AlgebraFact on Twitter.