by amichail · 4y ago · 0 comments
(TeXmacs is not based on TeX nor emacs but is inspired by both.)
A full s-expression based grammar for mathematics is unfortunately not something that you can write on paper and requires white space delineation to be readable. On a screen with something like emacs paredit both of those are a breeze however. The fact that higher order functions don't need a special notation is really freeing.
How would Polish notation help, for instance, with things like describing set membership or logical relations? How is this more readable (using ASCII):
-> a b
Than the current approach: a -> b
Which provides a convention sense of the relationship that the former does not? The second one can be "read" in order: a implies b. The first cannot.The same reason why geometers needed to be told to start using Arabic numerals by algebraists: mathematics is asking new questions and the old tools aren't good enough. That we even need to make a notational distinction between operators like addition and operators like high order partial derivatives should show that clearly enough.
>How would Polish notation help, for instance, with things like describing set membership or logical relations? How is this more readable (using ASCII):
Start working on longer expressions and the lack of parenthesis becomes a godsend.
-> -> a b c and -> a -> b c can be parsed in only one way, by comparison with infix notation you need miscellaneous parenthesis to show the way you want a -> b -> c to be parsed: (a -> b) -> c and a -> (b -> c). Or you need to memorize an arbitrary number of rules which increase exponentially with each new operator you add.
> Which provides a convention sense of the relationship that the former does not? The second one can be "read" in order: a implies b. The first cannot.
In English and only for binary operators, and even then you can just as easily understand "add 5 and 6" as you can "5 plus 6". How would you use infix notation to express a ternary or higher operator? The notation for the definite integral needs a super and sub script as well as a dummy variable for an operator that is fundamentally a ternary one. By comparison in prefix notation it becomes definite_integral upper_limit lower_limit function.
At least those were other mathematicians who could understand the domain and the importance of notations for the work.
Hah, no, "-> -> a b c" is not easy to parse, except for a computer. going are people not to read easily. It's a silly argument that prefix is fundamentally easier for humans when it disrupts the flow even in your example.
Even using the words, "implies implies a b c", does not parse well as a reader, even if it can only be parsed one way. If you go to a higher arity operation, switch to function (which is prefix, like polish) notation if it makes sense. But even then, we have things like the integral which uses physical placement to take (typically) up to 3 arguments:
b
∫ f(x) dx
a
With other similar operations. And if order of operations is not clear from an expression, then yes, use parentheses. That's what they have been used for for quite a while.