Hacker News new | ask | show | jobs
by adrian_b 1419 days ago
If it is said that "Those are the first, second, and third operations: addition, multiplication, and exponentiation", then one should not forget that according to this numbering there is a "zeroth" operation: adding 1 to a number (incrementation).

Addition is derived from adding 1 to a number in the same way as multiplication is derived from adding a number to zero (if instead of starting with zero the operation is started from an arbitrary number, like in the derivation of addition, then the multiply-add operation is obtained, which is implemented frequently as a single operation in hardware), or exponentiation from the multiplication of 1 with a number.

So the sequence of operations is: adding 1 to a number, addition, multiplication, exponentiation, ..., where any operation but the first in this sequence can be implemented as a loop using the previous operation.

4 comments

> So the sequence of operations is: adding 1 to a number, addition, multiplication, exponentiation,

As I was reading this, I was visualizing it as geometry. - Incrementation as a line, where each "step" moves you along that line - Addition as a 2d graph, where each point along the x axis increments by 1, and each point along the y axis indicates "how many times" - Multiplication as a 3d graph, in the same pattern - Exponentiation - it fell apart because I couldn't visualize it anymore.

Not particularly insightful, I guess, but I found it interesting that it seemed "automatic" to me to view it this way.

I think this is very insightful. Math is designed to tackle problems which are challenging/not possible to visualize. So to get good at symbolic mathematics at some point you need to let go of needing to visualize everything. To get a bit more perspective one could contrast symbolic math with geometry which is built on visualization.
You can visualise incrementation as a single step along a line, addition as a step of any length along the line.

Multiplication: the formula for area of a rectangle is "length times height", so IMHO now this - "a * b" is best visualised as 2d. Or if you like, "m lines of length n", visualised as a stack of lines.

Exponentiation covers "to the power of 2" (area of a 2d object) "to the power of 3" (volume of a 3d cube) and beyond, so now we've run out of graph dimensions.

I think what we can take from this, is that when going from first operation to second, second to third etc, the rate of change is not constant, it is increasing. Since the sequence is "no extra dimensions, one extra dimension, all the extra dimensions"

Actually all operations can be written as loops of their arguments, since the increment operation takes no arguments
Often in math the property (a + b) * c = ac + bc is more useful than the repeated addition[0]

So if you try to find the zeroth operation in this fashion you get (a ? b) * c = ac ? bc which is satisfied[1] by a ? b = max(a,b) or a ? b = min(a,b).

[0] (a + 1) * c = a*c + c

[1] I do not remember whether these are the only two solutions but with min you get tropical geometry[2]

[2] https://en.wikipedia.org/wiki/Tropical_geometry

The article discusses this. It calls it "succession", and raises arguments against it being the zeroth operation.