Hacker News new | ask | show | jobs
by throwaway31338 1666 days ago
Came here to say the same thing harshly and laced with profanity. I guess I can back off a bit from that now.

I was filled with crushing disappointment when I learned mathematical notation is "shorthand" and there isn't a formal grammar. Same goes for learning writers take "shortcuts" with the expectation the reader will "fill in the gaps". Ostensibly this is so the writer can do "less writing" and the reader can do "less reading".

There's so much "pure" and "universal" about math, but the humans who write about it are too lazy to write about it in a rigorous manner.

I can't write software w/ the expectation the computer "just knows" or that it will "fill in the gaps". Sure-- I can call libraries, write in a higher-level language to let the compiler make machine language for me, etc. I can inspect and understand the underlying implementations if I want to, though. Nothing relies on the machine "just knowing".

It's feels like the same goddamn laziness that plagues every other human endeavor outside of programming. People can't be bothered to be exact about things because being exact is hard and people avoid hard work.

"We'll have a face-to-face to discuss this there's too much here to put in an email."

4 comments

You seem to be complaining that math isn't programming, that it's something different, and you've discovered that you don't like how mathematicians do math.

Math notation is the way it is because it's what mathematicians have found useful for the purpose of doing and communicating math. If you are upset and disappointed that that's how it is then there's not a lot we can do about it. If there was a better way of doing it, people would be jumping on it. If a different way of doing it would let you achieve more, people would be doing it.

It's not laziness, and I think you very much have got the wrong idea of how it works, why it works, and why it is as it is. Your anger comes across very clearly, and I'm saddened that your experience has left you feeling that way.

Maths is very much about communicating what the results are and why they are true, then giving enough guidance to let someone else work through the details should they choose. Simply giving someone absolutely all the details is not really communicating why something is true.

I'm not good at this, but let me try an analogy. A computer doesn't have to understand why a program gives the result it does, it just has to have the exact algorithm to execute. On the other hand, if I want you to understand why when n is an integer greater than 1, { n divides (n-1)!+1 } if and only if { n is prime } then I can sketch the idea and let you work through it. Giving you all and every step of a proof using Peano axioms isn't going to help you understand.

Similarly, I can express in one of the computer proof assistants the proof that when p is an odd prime, { x^2=-1 has a solution mod p } if and only if { p = 4k+1 for some k }, but that doesn't give a sense of why it's true. But I can sketch a reason why it works, and you can then work out the details, and in that way I'm letting you develop a sense of why it works that way.

Math isn't computing, and complaining that the notation isn't like a computer program is expressing your disappointment (which I'm not trying to minimise, and is probably very real) but is missing the point.

Math isn't computing, and "Doing Math" is not "Writing Programs".

I really, really appreciate your reply and its tone. Thank you for that. You've given me some things to think about.

I often wish people were more like computers. It probably wouldn't make the world better but it would make it more comprehensible.

Thanks for the pingback ... I appreciate that. And thanks for acknowledging that I'm trying to help.

It might also help to think of "scope" in the computing sense. Often you have a paragraph in a math paper using symbols one way, then somewhere else the same symbols crop up with a different meaning. But the scope has changed, and when you practise, you can recognise the change of scope.

We reuse variable names in different scopes, and when something is introduced exactly here, only here, and only persists for a short time, sometimes it's not worth giving it a long, descriptive name. That's also similar to what happens in math. If I have a loop counting from 1 to 10, sometimes it's not worth doing more than:

    for x in [1..10] {
      /* five lines of code */
    }
If you want to know what "x" means then it's right there, and giving it a long descriptive name might very well hamper reading the code rather than making it clearer. That's a judgement call, but it brings the same issues to mind.

I hope that helps. You may still not like math, or the notation, but maybe if gives you a handle on what's going on.

PS: There are plenty of mathematicians who complain about some traditional notations too, but not generally the big stuff.

> We reuse variable names in different scopes

This example works against you. Scope shadowing is nearly universally considered bad practice, to the point that essentially every linter is pre-configured to warn about it, as are many languages themselves (eg prolog, erlang, c#, etc)

To a programmer, you're saying "see, we do it just like the things you're taught to never ever do"

.

> You may still not like math, or the notation,

The notation is probably fine

What I personally don't like is mathematicians' refusal to provide easy reference material

Programmers want mathematicians to make one of these: https://matela.com.br/pub/cheat-sheets/haskell-cs-1.1.pdf

It doesn't have to be perfect. We don't need every possibility of what y-hat or vertical double bars means. An 85% job would be huge.

> Programmers want mathematicians to make one of these: https://matela.com.br/pub/cheat-sheets/haskell-cs-1.1.pdf

There are lots of maths cheat sheets like that. Maths is big, like all-programming-languages big. Just like in programming, notations are re-used in different areas with different meanings, and different authors sometimes use different notation for the same meaning. A universal cheat sheet is impossible (just like a general programming cheat sheet is), but many cheat sheets or notation reference pages exist for particular contexts, one of which is "the basics", e.g. https://www.pinterest.nz/pin/734016439237543897/. Try searching or image searching for [math cheat sheet], [linear algebra cheat sheet], etc.

> mathematicians' refusal to provide easy reference material

This is an absurd claim. There is no such general refusal. On the contrary, many mathematicians provide their students with relevant easy reference material constantly. We sometimes spend entire semester-long courses providing easy reference material, and there are many books with exactly the kind of cheat-sheet you want inside the cover, or in an appendix or front matter (as well as the ones on the internet mentioned above).

> There are lots of maths cheat sheets like that.

I have never found one that gets me through the average undergraduate CS paper.

If you know one, I would greatly appreciate a tip. Unfortunately, I saw what you offered, and that's not it.

.

> A universal cheat sheet is impossible

I explicitly stated that this was a non-goal.

.

> one of which is "the basics", e.g. https://www.pinterest.nz/pin/734016439237543897/.

That one is far too basic. It doesn't even have things like average, or absolute value. It includes things nobody needs explained, like subtract, and things that aren't math, like logical operators.

This is why I said "yes, people have tried, but nobody has succeeded."

The explicit context was the average software paper. We're talking about programmers.

.

> > mathematicians' refusal to provide easy reference material

> This is an absurd claim.

Lots of people in here seem to agree with me. YMMV.

Feel free to provide me easy reference material.

.

> On the contrary, many mathematicians provide their students with

> We sometimes spend entire semester-long courses

The explicit context is "to people who aren't mathematicians or mathematics students."

Remember, we're talking about programmers who are appealing to the mathematics community for help.

If your response to "you guys won't give programmers a short easy two page PDF at the level we need" is to remind me that you give your own students semester long courses, then you've absolutely failed to understand what's being said.

.

> there are many books with exactly the kind of cheat-sheet you want inside the cover

Every time I ask for one, I get something with symbols meant for children learning arithmetic, like the one you gave. It explains plus and percent.

Again, ๐—ง๐—ต๐—ฒ ๐—ฐ๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜ ๐—ถ๐˜€ ๐—ฝ๐—ฟ๐—ผ๐—ณ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—ฝ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ฒ๐—ฟ๐˜€ ๐˜๐—ฟ๐˜†๐—ถ๐—ป๐—ด ๐˜๐—ผ ๐—ด๐—ฒ๐˜ ๐—ต๐—ฒ๐—น๐—ฝ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—–๐—ฆ ๐—ฝ๐—ฎ๐—ฝ๐—ฒ๐—ฟ๐˜€ ๐˜„๐—ฟ๐—ถ๐˜๐˜๐—ฒ๐—ป ๐—ฏ๐˜† ๐—บ๐—ฎ๐˜๐—ต๐—ฒ๐—บ๐—ฎ๐˜๐—ถ๐—ฐ๐—ถ๐—ฎ๐—ป๐˜€.

If you think we need plus explained to us, and that the next step is an insular semester long lecture course that isn't offered to us, then how can you possibly be surprised that we think you failed us?

.

> as well as the ones on the internet mentioned above

You only mentioned one. The other one is something I gave, from our community, trying to explain to you the kind of thing I want.

It covers topics like monads, pattern matching, infix, operator precedence, typeclasses, infinite lists, codata, higher order functors, special folds, tuples, numerics, modules, tracing, list comprehensions, and dealing with the compiler itself.

You patted me on the head and taught me that * means times.

I continue to feel that the mathematics community refuses to understand the needs of the programming community, or provide appropriate reference material.

It's either "this is arithmetic" or "let's do linear equations in russian"

There's no practical middle ground and you seem resistant to even understanding that such a thing exists

Programmers aren't ignorant like the other mathematicians in here have repeatedly said. You can't do our things any more than we can do yours. We've seen your code.

It's just that when you ask us for appropriately costed reference, we comply, and you do not even grok.

You really put up a thing that explained `less-than`, as if that was what you were being asked for.

It turns out that most programmers know what the equals sign means.

There is nothing of practical value in the actual domain space being talked about, here.

Nothing here is beyond a highschool pre-calculus class. That is not the level that professional programmers need.

I don't mean to seem rude, but it feels a little bit like being talked down to, having it suggested that this is the level of help my occupation is asking for.

The statisticians can do it: http://web.mit.edu/~csvoss/Public/usabo/stats_handout.pdf

This isn't far off: https://en.wikipedia.org/wiki/Glossary_of_mathematical_symbo...

Many textbooks have pages that explain the mathematical notation used. Here's an example from a linear algebra textbook: http://linear.ups.edu/html/notation.html

But it doesn't make sense to put lists of notation everywhere mathematical notation is used like in a journal or because the audience is already expected to know it. If the author does something weird or non-standard it's typically explained, sometimes it's even explained if it's pretty standard.

Different branches of math, physics, statistics,etc. will redefine the same symbols to mean different things but that's not much different from programming languages. & in C++ has a different meaning than & in R. Like the first step of understanding someone else's code is to know what language your looking at it's important to understand the context of what you're looking at. Look at previous cites, relevant textbooks, ask around, reread the paper again. I've read some papers a dozen times easy before it clicked.

> This example works against you. Scope shadowing is nearly universally considered bad practice

So you never used the same variable name in two different scopes ever? Like, if a function takes argument "name", no other function you ever write again in any program can have a variable named "name" unless it is the same exact usage?

Or, as is commonly complained about in math, every programmer in the world then use the variable "name" only for that usecase and otherwise comes up with a new name for it?

Having different scopes doesn't imply shadowing, it just means that you define it and then use it and then scope goes out and it no longer exists. No mathematician knows even close to every domain, so different domains of math uses notation differently. It is like how different programmers programs in different programming languages. It is such a waste to have so many programming languages, but people still do it for legacy reasons.

> So you never used the same variable name in two different scopes ever?

That's not what shadowing is.

.

> Having different scopes doesn't imply shadowing

I didn't say that it did.

.

> No mathematician knows even close to every domain

this is irrelevant to a lightweight two page cheat sheet for simple mathematial symbols

part of the problem is that if we ask you for a simple thing that isn't perfect or exhaustive, you lecture us on how no document could contain every concept

that's very clearly not what's being requested of you. the same is true of haskell. that sheet doesn't contain all of haskell. i doubt anybody knows all of haskell, which of course is far smaller than mathematics.

i'd like to stay in the practical world. it was clearly stated that an exhaustive solution was a non-goal.

let's try to do one thing that doesn't have a limit at infinity. (i'm sorry, i'm a programmer, math jokes are hard)

surely you've made food, right? did you learn the recipe from a cookbook? did it contain every ingredient and recipe that any cook ever knew? did it go over the chemistry of the protein denaturing, the physics of the water boiling, the ethics of importing the burner fuel, allergy responses, cultural backgrounds, molecular weights, how to make things in a duck press?

no?

was that because the cookbook was just good enough? it was just like "use this much chicken and this much onion, two tortillas, some cilantro and lime?"

nobody wants exhaustive anything. if you managed somehow to produce that (ie by just giving the manual page to the wolfram language) it would be rejected as the exact opposite of what was being requested.

the thing you're protesting is the i'm saying is the wrong job.

cool beans. the thing i'm actually asking for is straightforward.

someone already gave me one, but the difficulty level was aimed at children, instead of professional programmers, the space requested, while also calling me ignorant. it's a shame; that one was almost it.

but it should be things like `ลท` and `||x||` and whatever. it should include sum, integral, and product for the juniors. For `|x|` it should say "Absolute value, magnitude, length, or cardinality."

it doesn't need `||x||` because we need someone to teach us what absolute value and cardinality and so on mean. it needs `||x||` because we forgot what double-bar says, and if we have that list of four things, we can figure out which one it is just like you can.

we know what magnitude is. we just don't know what `||foo||` says.

we just need our cracker jack decoder rings. we get the ideas. we don't get your letters.

It's not explaining anything. It's just a cheat sheet. You aren't solving education. C'mon.

This isn't too far off: https://en.wikipedia.org/wiki/Glossary_of_mathematical_symbo...

.

> It is such a waste to have so many programming languages

if you say so. i rather like the several that i created.

things aren't a waste just because you don't know what they're for.

you might as well assert that it's a waste that there are so many tools in the shop.

The statisticians can do it: http://web.mit.edu/~csvoss/Public/usabo/stats_handout.pdf

.

> every programmer in the world then use the variable "name" only for that usecase and otherwise comes up with a new name for it?

this isn't terribly uncommon, primarily because our culture is to use long descriptive names, which have a far lower natural collision rate

i do get that symbols can overlap. that's okay! nobody's complaining about that. it's fine for `||x||` to mean four things. we're just as bad as you are about that. there's half a dozen meanings for stack, another five for heap, seven for map, five for vector, i don't even want to get into what a mess "array" is, et cetera.

but if i was writing a cheat sheet for you, I could write `< > generally means a generic type, a tuple, greater than less than, an HTML/XML/SGML tag, an email inclusion, or an IRC handle`

Is that exhaustive? Naw. I can name another dozen off the top of my head.

But that's generally going to be good enough.

All I want is generally good enough. just please write down what they are?

> Math notation is the way it is because it's what mathematicians have found useful for the purpose of doing and communicating math.

That's only really a good description for the most well trod areas, where people habe bothered to iterate. I think a more realistic statement would be:

"Math notation is the way it is because some mathematician found it sufficient to do and communicate math, and others found it tolerable enough to not bother to change."

Personally, though, my problem has always been where publications use letters and symbols to mean things that are just "known" in some subfield that isn't directly referenced. It's not a problem for direct back and forth communication during development, true, but it dramatically increases the burden on someone who wants to jump in.

I mostly agree with you.

That all said, it would still be quite nice if it was somehow more accessable. A lot of papers containing material that's probably actually quite standardizable remain opaque to me, and the notation invariably falls by the wayside if there's a code or language description available.

Many times, math notatons have been thought to be minimal, or most clear possibly, only to fall by the wayside

Whereas this notation serves domain specialists well, it still leaves people like me somewhat confused

A cheat sheet - even to the practical norms - would go a long way

This is a pretty good defense. Well done.
Here's a take from a mathematician-in-training, and it's biased toward research-level math, or at least math from the last hundred years:

Math is difficult, and a lot of what we have is the result of the sharpest minds doing their best to eke out whatever better understanding of something they can manage. Getting any sort of explanation for something is hard enough, but to get a clear theory with good notation takes an order of magnitude more effort and insight. This can take decades more of collective work.

Imagine complaining about cartographers from a thousand years ago having sketchy maps in "unexplored" regions. Maps are supposed to be precise, you say, there's actual earth there that the map represents! But it takes an extraordinary amount of effort to actually send people to these places to map it out -- it's hardly laziness. Mathematics can be the same way, where areas that are seemingly unrigorous are the sketches of what some explorers have seen (and they check that their accounts line up), then others hopefully come along and map it all in detail.

When reading papers, there's a fine balance of how much detail I want to see. For unfamiliar arguments and notation, it's great to have it explained right there, but I've found having too much detail frustrating sometimes, since after slogging through a page of it you realize "oh, this is the standard argument for such-and-such, I wish they had just said so." You tend to figure that something is being explained because there is some difference that's being pointed out.

I've been doing some formalization in Lean/mathlib, and it is truly an enormous amount of work to make things fully rigorous, even making it so that all notation has a formal grammar. It relies on Lean to fill in unstated details, and figuring out ways to get it to do that properly and efficiently, since otherwise the notation gets completely unworkable.

> There's so much "pure" and "universal" about math, but the humans who write about it are too lazy to write about it in a rigorous manner.

Are you sure it's laziness? Maybe it's a result of there not actually being any universal notation (not even within subfields) or the exactness you refer to really isn't necessary. This doesn't mean that unclear exposition is a good thing. Mathematical writing (as with all writing) should strive towards clarity. But clarity doesn't require some sort of minutely perfectly consistently notation which would be required by a computer because humans are better than computers at handling exactly those kinds of situations.

> People can't be bothered to be exact about things because being exact is hard and people avoid hard work.

I think you have it wrong. People can't be bothered to be as exact because they don't need to. People can understand things even if they are inexact. So can mathematicians. Honestly this is a feature. If computers would just intuitively understand what I tell them to do like a human assistant would, that would be a step up not a step down in human computer interfaces.

> But clarity doesn't require some sort of minutely perfectly consistently notation which would be required by a computer

I made this point in another comment, but I think it bears repeating and elaboration: Consistency isn't required (at least outside any single paper), but explicitness would be a tremendous boon.

Software incorporates outside context all the time, but it pretty much always does it explicitly (though the explicitness may be transitive, ie. dependencies of dependencies). Math papers often assume context that is not explicitly noted in the citations, nor those papers' citations, etc.

Instead, some of the context might only be found in other papers that cite the same papers you are tracking down. You sometimes need to follow citations both backward and forward from every link in the chain. And unlike following citations backward (ie. the ones each author considered most relevant), the forward links aren't curated and many (perhaps most) will be blind alleys (there also may be cycles in the citation graph, but these are relatively rare). But somehow you have to collect knowledge (or at least passing familiarity) with an encyclopedic corpus in order to at least recognize and place the context left implicit in any one paper in order to understand it.

It's maddening.

I totally agree. I think that many mathematical papers aren't explained as well as they can be. My advisor was pretty adamant that papers should not be written in some proof-chasing style like you describe and that the author should clearly include the arguments they need (citing those authors they might have learned it from) unless those arguments are truly standard. No "using a method similar to [author] in Lemma 5 of [some paper]" and instead just including it in your paper and making sure if fits in well.

That is just an example of bad exposition in my opinion. It's also not technically "unclear" in any notational sense so it's a bit of an aside from this argument. But I agree with you 100% that it is bad bad bad. This is a perfect example of why arguments like "does this proof make coq happy" totally misses the point.

> That is just an example of bad exposition in my opinion [and] a perfect example of why arguments like "does this proof make coq happy" totally misses the point..

In theory, some kind of checker could validate the semantics of a paper to just tell you whether the arguments made are complete. Not whether there is a correct formal proof, just pointing out any obscured leaps of faith[0]. A rough analogue to test suite coverage for code (which is also not any sort of guarantee of correctness, just basic reassurance that all (or most of) the code is tested and isn't broken in any obvious way, especially while making changes).

I'm trying to think of an equivalent for prose, and am coming up with examples like detecting conflicting descriptions of locations or named characters, or whether the author lost track of which character said which lines in the dialog.

> It's also not technically "unclear" in any notational sense

Perhaps not necessarily, but unfamiliar/borrowed/idiosyncratic notation is a perfect (and common) place for insufficient exposition to be hiding.

[0] https://imgur.com/gallery/ApzhVFj

People can also understand each other through combinations of obscure slang, garbled audio, thick accents, and drunken slurring. It's still an unpleasant way to communicate.

Shall we be satisfied with the same low standards in a technical field, because it is how it is?

Hands-on users of math notation are complaining that it sucks. I'm not sure why a dismissive "works for me" is so often the default response.

> Hands-on users of math notation are complaining that it sucks. I'm not sure why a dismissive "works for me" is so often the default response.

It is really easy to complain. People also complain about every popular programming language, but it is really hard to make something that is actually better. It is easy to make something that you yourself think is better, but it is hard to make something that is better in practice.

Personally, I stopped complaining about Java, Perl, and PHP when I didn't have to read or write them anymore for work.
> Hands-on users of math notation are complaining that it sucks. I'm not sure why a dismissive "works for me" is so often the default response.

Are you sure this is because the notation is unclear/imprecise or because you just don't like it? I like certain programming languages and certain programming styles and really don't like others. But in none of the cases (those I like nor those I don't) are they not 100% "clear". The code compiles and executes after all so there really isn't much of an argument that somehow it's underspecified.

The same thing exists in mathematics. There are certain fields of math whose traditional notation/style/approach/etc. are totally incomprehensible to me. There are also many mathematicians who would say the same about my preferences as well.

So my point is that all people are _different_. Some people like certain things and some people like others. How can you hope to please everyone simultaneously? In my experience, there is no field at all that is as precise as mathematics. Sure "code" is precise, but (imo) professional programmers are nowhere near as precise in any general design or conversation than mathematicians. So I find the attack on supposedly bad mathematical notation a bit odd.

Mathematicians constantly try to come up with better methods of explaining things. They put more effort into it than basically any field in my experience. The problems are really that we as humans don't all think the same and that mathematics is just plain hard. We've improved mathematical communication immensely throughout history and we will continue to do so. But we'll never reach some sort of perfect communication style because no single such style could ever exist.

There are formal grammars. The formal grammars are really hard to understand in my humble opinion. The best examples I think are COQ (see e.g. https://en.wikipedia.org/wiki/Coq) and Lean (see e.g https://en.wikipedia.org/wiki/Lean_(proof_assistant) ).

Yes, we are too lazy to be 100% formal and many times we are too lazy to be mostly formal. This is mostly because we target our writing to other mathematicians who have no need to see every small step and including every step makes the proofs long. On the other hand, I do feel that generally speaking mathematicians should show more of their work and skip fewer steps.

I find your statement "People can't be bothered to be exact about things because being exact is hard and people avoid hard work." to be very true. Being precise is difficult.