TITLE: Are all "numbers" just one unit value transformed by a function?
QUESTION [45 upvotes]: I'm a programmer, and I've been thinking about this for some time. I have a saying:

There are only three specific numbers: 0, 1, and ∞. ∞ is just a special case of 1.

Our base function really just converts a unary value into a string (example: "101") that we can parse in a given base.
Tonight, I've been putting some thought towards this, and I realize - I believe that the entire set of natural numbers can be represented by a recursive function that only works on a unit value, as follows (I apologize in advance for the terrible notation, this is not my forte):
// Please ignore the fact that this is invalid code for various, various reasons
N (the set of natural numbers) = add(1) where add(x) = return x + add(x);

Following this, I believe that the set of integers can be found as a union of the natural number function and a similar function using subtract instead of add (resulting in the full set of negative numbers).
Going further, I applied more thought - perhaps the set of real numbers can be applied through division functions for the set of all integers divided by the set of all integers (which we've already established via the functions above).
I suppose my question is this - as strange as it may seem, is there only one unit value? (Or, possibly, a very small subset of seed numbers - perhaps 0 and 1 (and maybe -1 for the complex plane?)) Is our number system just a system of transforms on top of one unit value?
If this is a really stupid question, I apologize. It's just that the more I think about this, the more I really wonder about it. There's a good chance that I'm missing something or that this has already been derived, but I'd love to know. I'm sure this community knows much more than I do about this. I hope that this interests all of you as much as it does me.

REPLY [4 votes]: You might want to check out Church numerals, where each natural number $n$ is defined as the function $f \mapsto f^n$; so

$0 = f \mapsto id$
$1 = f \mapsto f$
$2 = f \mapsto f \circ f$
$3 = f \mapsto f \circ f \circ f$

etc.  It's easy to define a successor function, addition, multiplication, etc. using this style (omitting un-necessary parentheses in function applications by convention):
$$Sn = f \mapsto f \circ nf$$
$$n + m = mS\;n$$
$$n * m = m (k\mapsto n+k)\;0$$
$$n^m = m(k \mapsto n * k)\; 1$$
etc.
While this is mostly used today in a programming / programming languages context, I believe it was originally intended in a foundations of math context (so in math, the natural numbers would be taken to 'mean' the above functions).  Of course, programming and programming languages as we know them today grew directly out of the work in foundations of mathematics during the 1920s and 1930s.