4 ms·
We really need a better way to represent math in documents. TeX/LaTex is all about putting ink on paper in a pretty way; it doesn't know anything about the math
by Animats 12y ago
We really need a better way to represent math in documents. TeX/LaTex is all about putting ink on paper in a pretty way; it doesn't know anything about the math.
As with programming languages, the first question is what each variable is, and what its type and definition are. You should be able to mouse over variables in textbooks and see that information. You should be able to see formulas fully parenthesized if you want. (The machine learning people are terrible about inventing new operators and not telling the reader what their precedence is.)
Mathematica notebooks come close to this. But books and papers on math are not usually published that way. MathML was a step in the right direction but didn't catch on.
- wtallis 12y agoThe problem is that there are actually several components needed: the semantic markup language, an input method no less efficient than LaTeX, and the math-lint itself. LaTeX is not semantic. MathML is just too verbose to type in the raw. The syntax used by theorem-proving software tends to be both esoteric and a bit too verbose (in addition to requiring the statements themselves to be extremely verbose). I'm not sure that any plaintext markup can be sufficiently compact, semantic, and still resemble the handwritten syntax. That means we'll probably have to come up with a more interactive input method that is a bit more WYSIWYG in nature and has some auto-complete and automatic parenthesizing.
- kibibu 12y agoOne of the reasons is surely that different fields of maths/engineering reuse the same symbols to have different meanings.
- chriswarbo 12y agoWe know how to do type-directed operator overloading in unambiguous cases, eg. static methods in OO, modules and typeclasses in FP. This is often (ab)used to distinguish between alternative definitions. For example, Haskell's Monoid module defines several type synonyms for booleans and numbers, each of which has a different Monoid definition: https://hackage.haskell.org/package/base-4.7.0.2/docs/Data-Monoid.html https://hackage.haskell.org/package/base-4.7.0.2/docs/Data-M... If we trigger an error for ambiguous cases, the path of least resistance is to make things unambiguous.
- Animats 12y agoMathcad has a reasonably good system for that.
- unfamiliar 12y ago> MathML is just too verbose to type in the raw. Tools like mathematica and MS equation editor have solved this at the same time as the input method question: have an input method which converts to a markup in the background. This markup has enough information to produce typeset output.
- taeric 12y agoThey have attempted to solve this. The problem comes as soon as it picks the incorrect markeup for a given input. Which undoubtedly will happen.
- logicallee 12y agoParentheses are also just a typesetting convention. You should be able to mouse over and have them replaced by concentric boxes or something. Even whitespace. Look at how easy this: 4 + [–1(–2 – 1)]2 is to parse this way: 4 + –1 * –2–1 ^2 (especially imagine appropriate light-grey concentric boxes) This is a LISP expression: (LIST 'PLUS (DIFF (CADR EXPR) X) (CADDR EXPR) X)) Here it is with whitespace instead of parantheses: LIST 'PLUS DIFF CADR EXPR X CADDR EXPR X) and as you can see there's an extra parantheses closing something I hadn't quoted. (I have nothing to match it with.) Likewise font size, exact character placement vertically, visual cues, color (more deeply nested = redshift) can all make it super-easy to instantly parse things. Instead the computer gets it instantly (super-easy to parse nested parantheses for the computer) but doesn't convey that to us at a glance at all.
- j2kun 12y agoI'm a mathematics graduate student with (basically) a degree in CS, and I see programmers claim this all the time. They seem to think that if they can make a tool that allows them to read calculus textbooks or machine learning textbooks more easily, this tool will obviously be useful for all mathematicians everywhere. I disagree. If you want to seriously address this issue, you need to make sure it works for the mathematicians who work at the most abstract levels of the hierarchy. Mathematics as a language is primarily about communicating an idea from one human to another. The problem here is that pure mathematicians want and need to bend type rules for the sake of communication. There are implicit equivalences of types all over the place. For example, a homotopy is a smooth map (between more than one kind of space depending on your preference), but it is also a statement of equality between two things, and it is a commutative diagram involving infinite sequences of objects and operators which is defined in contexts where smooth maps do not exist. Whether or not these different things can be used in the same place depends not on the type of the definition but the greater context of the paper. Moreover, not all variables have definitions you can annotate. Sometimes the definitions are assumed to exist for the sake of contradiction, sometimes they are the unique limit of some crazy sequence that takes a page to write down. Sometimes they are defined by properties they have, so they don't represent a single object but a family of objects (or maybe it is a single object, who knows?) I'm not saying better math documents are impossible. I'm saying that most programmers who claim that we need a better way to do it don't appreciate the depth and complexity of the problem. I think probably a better solution is to augment a public repository of papers (such as arXiv) by allowing readers to add inline annotations explaining concepts, fixing bugs, etc. The real tragedy is that once a person figures out what the hell is going on in a poorly written paper, they have no way to bring their insight to anyone reading the same document in the same place.
- jordigh 12y ago> They seem to think that if they can make a tool that allows them to read calculus textbooks or machine learning textbooks more easily, this tool will obviously be useful for all mathematicians everywhere. I disagree. I agree with you times infinity. I get frustrated when programmers are used to looking at source code that has very precise meaning and are expecting to be able to read mathematics as if it were source code too. Or worse, when people think that the hardest part of understanding mathematics is the notation. Or that a capital sigma means a sum in all contexts, or that a lowercase sigma could not possibly mean anything other than a standard deviation or a lowercase pi could not mean anything other than the first positive root of the sine function. Mathematics is written by humans for humans. Trying to automate mathematical writing or reading is about as feasible as trying to automate literary analysis of 19th century romanticism[1]. Or in Weierstrass's words to Kovalevskaya, [...] it is true that a mathematician who is not somewhat of a poet, will never be a perfect mathematician. https://en.wikiquote.org/wiki/Karl_Weierstrass https://en.wikiquote.org/wiki/Karl_Weierstrass [1] When reading Riemann, I particularly feel like I might as well be reading E. T. A. Hoffman sometimes. Some of the moves he makes I cannot describe as anything but poetical. For example, how he describes the contours of integration in a couple of reformulations of the zeta function.
- arikrak 12y agoWhether math papers do this or not, educational material such as textbooks definitely should. They should go beyond that and connect formulas with visual representations too. (I lightly experimented with this for my site https://www.learneroo.com/ https://www.learneroo.com/ )
- deleted 12y ago[deleted]