11 ms·
The real problem here is that x^y is a single shorthand which refers to a few fundamentally different mathematical concepts (which happen to have significant ov
by stephencanon 13y ago
The real problem here is that x^y is a single shorthand which refers to a few fundamentally different mathematical concepts (which happen to have significant overlap with each other).
First, it refers to a function f:C x N --> C, defined in terms of repeated multiplication. f(x,0) is 1 for all x != 0, and so we adopt the convention that f(0,0) is also 1.
But it also refers to a function g:C x C --> C, defined as g(x,y) = exp(y log(x)), which has a branch cut on the negative real axis of the first argument and an essential singularity at (0,0), and so g(0,0) is necessarily undefined.
The value of 0^0 depends entirely on what sort of mathematics one is doing at the time, and therefore which function one is referring to.
- Sniffnoy 13y agoBut if you define 0^0=1 in general, it doesn't cause a problem here -- that definition never disagrees with x^y=exp(ylog(x)), it just defines it at the point 0^0, while the latter leaves it undefined. In other words, it's possible to make a common extension of the two; they don't actually give different values in any case. Of course, doing this makes exponentiation discontinuous at (0,0), but seeing as it already had an essential singularity there, this isn't really a loss.
- stephencanon 13y agoRight, but when you're working with the function on C x C, it doesn't really add anything either to arbitrarily pick 0^0 = 1, except for consistency with that other function that happens to be written the same way. I'm not really opposed to saying 0^0 = 1; it's the only reasonable choice if we're going to insist on using the same notation for these two functions, and I don't expect that's going to change.
- brandonhsiao 13y agoI'm not a mathematician, but this seems the most reasonable/believable answer I've heard. The last sentence especially.
- rntz 13y agoIn fact, exponentiation f : C x N -> C has a natural generalization to any monoid C, where f(x,n) is x "multiplied" by itself using the monoid operator n times. In this setting, the only sensible choice is that x^0 = 1 for any x, where 1 is the unit of the monoid in question. In particular, that is the only definition of exponentiation which is parametric in our choice of monoid. Naive Haskell example code (using Int for Nat): f :: Monoid m => (m,Int) -> m f (x,0) = mempty f (x,n) = x `mappend` f (x,n-1) -- or equivalently f (x,n) = msum (replicate n x)
- deleted 13y ago[deleted]
- sold 13y agoI'd like to add x^y is also used other contexts - e.g. for cardinal numbers and ordinal numbers.
- stephencanon 13y agoAbsolutely; I certainly didn't intend that anyone take my list as exhaustive.