by Garlef · 6y ago · 0 comments
-- 1. Having the same symbol for several things is the mathematicians way of having polymorphism and is a very nice feature.
Take for example the plus sign. Everytime we encounter it, we will most likely be dealing with some kind of abelian group. So just from seing the sign, we can already tell a lot about the context.
Another example would be the sign for the tensor product. I we see it, we are most likely dealing with some symmetric monoidal category . It might be vector spaces, modules over some commutative ring, coherent sheaves, objects in some derived category, etc. But still the important part is that all the stuff we know about this context can be applied.
-- 2. "so the only way to understand a single line is to understand the entire theory at once."
What do you expect out of a single line? Just think of a codebase with 800k lines. Would you expect to understand what the codebase is about by just looking at a single line?
I guess not: You'd rely on the naming of the functions/classes/etc. and how they are composed to understand what the codebase is doing. You'd also need a lot of knowledge about the area the codebase is concerned with to tell what is going on: Is it about a webserver providing a SPA? Is it a database? Is it a compiler?
You also don't expect to understand the whole codebase and it's dependencies (including low level abstractions)in its entirety: If you write a frontend `<div>` tag as part of a frontend do you really need to know the exact way this will end up as instructions on the chip of the computer that is running running a specific version of a specific browser running a certain version using drivers for a specific monitor, graphics card, etc...
All this is also true for mathematics.
-- 3. "A great deal of practical mathematics is not hard. Mathematical notation is hard ..."
Of course mathematics is hard. In fact: If anything related to human thought is hard, it is mathematics.
And more explicit notation will not make it easier. Do you think the twin prime conjecture is still unsolved because a layperson may misinterpret the meaning of a plus sign?
The whole point is not having to understand everything at once. And I would expect to understand what that particular line does to whatever level of detail I want by reading that line and recursively working backwards through the definitions of each operation invoked. Like clicking on each identifier and then doing ‘jump to definition’ in an IDE, instead of reading a book from cover to cover.
With code, I do this on a regular basis. With mathematics, it is plain impossible.
(And yes, this is why literate programming is a silly idea best forgotten.)
> Do you think the twin prime conjecture is still unsolved because a layperson may misinterpret the meaning of a plus sign?
No. But it very much may be because too few people understand the relevant portions of number theory in sufficient depth — from the highest levels of abstraction down to the bits and bolts of set theory — to notice the key insight necessary to solve it.
It's easily possible with systems like Coq [1] plus a nice IDE [2]. There are mathematical libraries for the foundations [3][4].
[1] https://github.com/coq-community/awesome-coq
[2] https://github.com/coq-community/vscoq
I don't expect to solve the twin prime conjecture. I do expect to understand, say, a kalman filter, or a multilayer perceptron. Those are not difficult concepts. And yet... I could not name a single paper that I could say to someone who doesn't already understand them "go read <x>".
How is that anything but damning? What is the point of a means of communication if I cannot impart a novel concept with it, because the reader must already understand all possible and imagined meanings of the plus sign to understand what I'm doing with it?
(side note: who's going to be solving the twin prime conjecture and not providing the proof as code? Why? A computer as an automated theorem checker is revolutionary.)
This! This is exactly my biggest pet peeve in Python. That the plus operator is used, in the base language, for such a notoriously non-abelian operation as string concatenation. As Carlin would say, this is not a pet peeve, this is a major psychiatric hatred of mine. In the (fortunately few) occasions that I have to do string processing in Python, I go to great lengths to avoid any usage of the concatenation operator. I cannot bear myself to use it.
That wasn't what was said. What was said was "A great deal of practical mathematics is not hard.".
The notation "e^(i x pi)"is a crime in 2 languages against countless students. Why E? No good reason. Why pi? Also no good reason. i? When they named it they didn't even know if it was a real thing. They have many faces, and the notation manages to avoid representing a single one of them. Even "self_diff(rotate*half_turn)" would be an improvement; at least some of the meanings are captured.
Naming things is hard, but this is literally 1-letter-naming applied to the 3 most common and important functions humanity has ever defined. The only excuse for it was up until ~2,000AD the mathematicians were working by hand.
No, the real issue is that the circle constant is 6.28319, not 3.14159. That's why a "full turn" is 2π instead of 1.
That's why every time I read an equation involving circles, or spheres, or any similar notion I have to take the constant that is in front of π and mentally divide by two.
And nobody should dare pipe up and claim that these are isomorphic and it "doesn't matter", because it does.
There's a tendency in modern theoretical physics to just ignore random small constant factors in equations, even when using natural units. In that case there ought not to be any unexplained constants! Any numbers in those equations ought to have an essential physical meaning, a real interpretation. Numbers ought to count things. But they don't, because of stupid extra constants like the ones needed next to π. This "2" gets blended into everything else, so you get stupid shit like the "8" in the Einstein field equations. Eight of what is being counted here exactly? Oops.. no wait.. 4 circle constants are actually 8 half-circle-constants.
Skip learning that i := imaginary unit. Write "imaginary_unit" every time you want to refer to it, for maximum clarity.
Choose the latter and now you have to write "pow(euler_constant, mul(imaginary_unit, circle_half_turn))". Does this sound "maintainable"?
I don't even know what "e^i x pi" means. How does that translate into C notation? Is it pow(e, i) * pi, or is it pow(e, i) * x * pi, or is it something else entirely?
In C notation, this would be pow(e, i * π). Or maybe pow(i*π, e), I don't remember and the notation is pretty bad.
And the point about exponentiation is very simple, and I didn't need to do hundreds of exercises to remember: the natural logarithm of e raised to some X is X, whatever that X may be.
The other commenter's note was that raising some constant to an imaginary number is a very obscure way of expressing the geometric operation that this represents (multiplying by e^iπ is equivalent to rotating a complex number by a half circle). I was pointing out that, while that is true, it loses the algebraic interpretation, which also has value.
I'd be surprised, on a tech forum, if people didn't see at least the smallest hint of a problem at single-letter naming. The tech industry moved away from that approach with a certain implicit urgency.
One basic thing is that PI (and even more so E) are pure abstractions. They correspond to certain physical or intuitive concepts in certain contexts, but their identity across contexts is more important. Even in programming, we sometimes use one-letter variable for very abstract things (the loop variables i, j, k; T, U, V as type arguments in C++ and co, or a, b, c in Haskell; and probably others).
Another major difference is the way this is actually done. Programs are written once and then mostly read, tweaked, debugged. Mathematics is all about writing and writing and writing, a lot of times from scratch. You're not as Lilly to be editing a file from 2 years ago, you're more likely to be writing a new attempt from scratch. And, people will likely only read your final version, not your hundreds of attempts before. So efficiency in writing your ideas is all the more important than in coding.
Another aspect is that, a lot of the time, the mathematician will spell out a lot of intermediate steps between a problem and a solution that, in a computer program, actually fall in the execution, since we're not in the habit of proving our code reaches the final state we envision (even informally); and certainly not in-line with the rest of the program. So again, in mathematics you end up writing a lot more the same few symbols, making long words all the more harmful.
Imagine
X + 6 = 5X
X - 5X = -6
-4X = -6
X = 6 / 4
Spelled out as Unkown plus 6 is equal to 5 times Unknown
Unknown minus 5 times Unknown is equal to negative 6
Negative 4 times Unknown is equal to negative 6
Unknown is equal to 4 divided by 6
Which of these is clearer and easier to follow?Edit: I'll also add that function notation works great for unary and maybe binary functions (though operator notation is generally nicer for binary functions), but it becomes horrible for anything past that. For example, the sigma notation for sums is much easier to remember than if I wrote `sum(1, 789, some_value squared)`.