Multiplication of two numbers can be algorithmically defined like so: 'add the first number to itself a number of times equal to the value of the second number'. Exponentiation of two numbers can be algorithmically defined like so: 'multiply the first number by itself a number of times equal to the value of the second number'. Thinking about those definitions for multiplication and exponentiation raises a few questions...
Firstly, can a class of arithmetic operations be defined by starting with addition as the fundamental operation? I wrote up some haskell code to test that idea:
order1 x y = x + y
order2 x y = foldl (order1) x (replicate (y - 1) x)
order3 x y = foldl (order2) x (replicate (y - 1) x)
order4 x y = foldl (order3) x (replicate (y - 1) x)
order5 x y = foldl (order4) x (replicate (y - 1) x)
Sure enough, the meaning of 'order2' is multiplication and the meaning of 'order3' is exponentiation. The english language, as far as I know, lacks words for 'orderN' where N > 3. Does the mathematical community have anything interesting to say about these operations?
Also, given the recursive appearance of those 'order' functions, how might one write a function like this:
generalArithmetic :: Int -> Int -> Int -> Int
generalArithmetic n x y = --Comment: what to put here?
that means multiplication when n equals 2, means exponentiation when n equals 3 ...?
Also, how might one generalize these arithmetic functions so that they could operate on all real numbers? The type of 'replicate' is, after all, Int -> a -> [a].