JK_Ravenclaw comments on Dense Math Notation - Less Wrong

24 Post author: JK_Ravenclaw 01 April 2011 03:37AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (23)

You are viewing a single comment's thread. Show more comments above.

Comment author: Risto_Saarelma 01 April 2011 06:18:00AM *  9 points [-]

I do get the feeling that mathematics is made somewhat hard to approach for people who grew up programming computers by both the notation that's optimized for writing on blackboards and some unspoken cultural assumptions made by people who worked their way up to the stuff without the notion that a lot of the things might get programmed into computers or be analogous to computer programs.

There might also be a bias in math for excessively clever analytical solutions for things for which a more verbose and straightforward algorithmic approach would do as well. A recent blog post compared an inscrutable closed-form formula for calculating the weekday of a date into a much more readable programming language function.

I wouldn't take that as a very solid example though, in a mathematical sense, the calender system is a massively complex way to represent what is basically the number line. A lot of interesting math is about working with entirely new structures, instead of dealing with accidental complexity in established structures. The programming analogy starts to have trouble on two fronts here.

One problem is that new structures involve new formalisms, and programming languages are more about operating within an existing formalism. Diving into metamathematics by trying to keep things within one formal system when discussing another sounds much more headache-inducing than just doing the informal discussion of the new formal system that mathematicians do now.

The other problem is that the verbose variable names programming languages use, that are helpful when working with somewhat real-world phenomena, become much less useful once you dive sufficiently deep into abstraction. There might not be a better term for the operands of a suitably uncommon and abstract structure X than "things X operates on", so the single-letter names are as good as any. (You don't even have to go into strange theory for this, just see the higher-order functions from any functional language, like map or foldl, which operate on sequences of any values of the same type. Haskell calls the sequences x:xs for "current x" and "the rest of the exes", which is pretty much all you can say about them from the context of the higher-order function.)

If someone wants to experiment with this, I'd like to see how programmers who know little math get along with The Haskell Road to Logic, Maths and Programming and maybe what programming-savvy physics students with some advanced math skills get out of Structure and Interpretation of Classical Mechanics.

Comment author: JK_Ravenclaw 01 April 2011 12:58:57PM 4 points [-]

There might not be a better term for the operands of a suitably uncommon and abstract structure X than "things X operates on", so the single-letter names are as good as any.

No, they aren't! You can't search to jump between the usages and definitions of a single-letter name, but you can jump between the usages and definitions of a full-word name, even if that name is blarghle.

Haskell calls the sequences x:xs for "current x" and "the rest of the exes", which is pretty much all you can say about them from the context of the higher-order function.

Haskell can get away with this because it has strict, well-defined scoping rules which ensure that the names x and xs never appear too far from their definitions, and there is an algorithm which text editors can implement to find those definitions. Math books do not have either of those benefits.

Comment author: LeibnizBasher 24 July 2011 08:57:01PM *  4 points [-]

Even worse than trying to search for single-letter variables that are defined somewhere in a mathematical text is trying to find the definitions of operators, if all you know is the squiggle used to denote that operator. For example, integrals are denoted by a slide-looking squiggle, so if you see one and don't know it's called an "integral", you can't look up what it means. If you do find a definition, the Wikipedia page you'll get describes integrals as "the signed area of region bound by (the function parameter's) graph", with a full-page of explanation and links to 5 or 6 pages of supplementary explanation. Good luck translating that into code!

What you won't find is the 5-line program that shows you how to actually calculate an integral (for that, see this page from SICP). Mathematicians descend into maddening vaguery when trying to describe concepts that could easily be described by a very short computer program, because math notation (and therefore mathematical study itself) lacks an equivalent of the for loop. So instead, mathematicians think they're describing something so fundamental that it's ineffable-- Integrals, man! Integrals! Either you grok it, or you don't.

Comment author: bogus 01 April 2011 01:22:04PM *  2 points [-]

Haskell can get away with this because it has strict, well-defined scoping rules which ensure that the names x and xs never appear too far from their definitions, and there is an algorithm which text editors can implement to find those definitions. Math books do not have either of those benefits.

Actually, they do, since x and xs are bound variables. Now, variable binding in mathematics is more complicated than it needs to be, but "forall x ", "exists x ", "f(x) =", "d / d x", "int ... d x", "sum_( i = 0 .. k)" ... are variable binding operators, which are quite comparable to the Haskell syntax binding x and xs in the definition of foldr.

Haskell also has support for free variables bound by a closure, where the scoping rules are not so strict and well-defined. But I would expect Haskell programmers to use more readable names for these.

Comment author: Dan_Moore 01 April 2011 01:52:36PM 5 points [-]

Some reasons that mathematicians use compact variable names are discussed here.