Tropical arithmetic replaces addition with minimization and multiplication with addition.
Tropical arithmetic is just like regular arithmetic but with two operations swapped out. Instead of addition you use min or max, and instead of multiplication you use addition. See also Lunar Arithmetic.
- tropical_add(a, b) = min(a, b) or max(a, b)
- tropical_mul(a, b) = a + b
+ 123 × 153 260 61 --- --- 263 1b4
This positional encoding does not allow for doing this kind of representation very well as numbers do not carry over. I could write digits beyond 9 as hex: a=10, b=11 .. but the trick of representing arithmetic like that does not scale, for that reason I'll use a linear postfix notation where bags are within brackets and b^11 is simply eleven instances of b, requiring no alphabet beyond the token names themselves.
Tropical Arithmetic as Multisets
If you have a bag of items and track how many times each item appears, then all the operations you'd want to do on those bags correspond exactly to max, min, and addition. So manipulating multisets in tropical arithmetic reduces to manipulating plain integers.
a ∪ b is max
You can think of max as the smallest bag that covers both bags:
a^2 b^6 ( a b -- a b max ) [max^a a^b]/a^b [max^b b^a]/b^a
a^2 b^6 max^6
a ∩ b is min
To check if a set contains a specific item, it comes down to looking up whether the min of an item is greater than zero:
a^2 b^6 ( a b -- a b min ) [min^b a^b]/a^b [min^a b^a]/b^a
a^2 b^6 min^2
a + b is mul
To combine two multisets together:
a^2 b^6 ( a b -- a b sum ) sum^a sum^b
a^2 b^6 sum^8
To dive deeper, see Fractran and Rejoice.
incoming: lunar arithmetic 2026