5 ms·
What took the longest to click for me is that there is no distinction between a variable and an array in mathematics- if you write x_i = y_i you are equating ea
by fallingfrog 11y ago
What took the longest to click for me is that there is no distinction between a variable and an array in mathematics- if you write x_i = y_i you are equating each element of two potentially infinite sets. There are implicit looping operations everywhere. Also in the equation x=2y x and y are not variables in the programming sense of the word but rather every pair of x and y that are a solution is a member of the solution set. So it's a very different approach.
- contravariant 11y agoWell, if you wanted to be precise you should specify for which indices x_i=y_i should hold. But if it's clear from the context then that might be left out. You're definitely right that mathematics doesn't really have things like variables though. You're only allowed to define a symbol once, but then it doesn't necessarily need to have a specific value (e.g. you're allowed to define 'x' and 'y' implicitly using the equation 'x = 2yx', or less trivially 'x^2 + y^2 = 1').
- fallingfrog 11y agoYeah, the key insight I think is that if you don't put any constraints on some variable then the intent is that the equation is true for any choice of that variable- so since x_i = y_i for any i, then it's logically the same as saying x0 = y0, x1 = y1, ... It was an aha moment when I realized what they were doing there. Very elegant actually.