logoalt Hacker News

agalunaryesterday at 8:19 PM1 replyview on HN

I believe Peano dot notation works the other way ’round;

  A . B : C :. D
would be, as I understand it, equivalent to:

  ((A B) C) D
The “general principle” is that a larger number of dots indicates a larger subformula.¹

What if you need to nest parentheses? Then you use more dots. A double dot (:) is like a single dot, but stronger. For example, we write ((1 + 2) × 3) + 4 as 1 + 2 . × 3 : + 4, and the double dot isolates the entire 1 + 2 . × 3 expression into a single sub-formula to which the + 4 applies.²

A dot can be thought of as a pair of parentheses, “) (”, with implicit parentheses at the beginning and end as needed.

In general the “direction” rule for interpreting a formula ‘A.B’ will be to first indicate that the center dot “works both backwards and forwards” to give first ‘A).(B’, and then the opening and closing parentheses are added to yield ‘(A).(B)’. The extra set of pairs of parentheses is then reduced to the formula (A.B).³

So perhaps one way of thinking about it is that more dots indicates more separation.

¹ https://plato.stanford.edu/entries/pm-notation/dots.html

² https://blog.plover.com/math/PM.html

³ https://plato.stanford.edu/entries/pm-notation/dots.html

See also https://plato.stanford.edu/entries/pm-notation/index.html and https://muse.jhu.edu/article/904086.


Replies

cubefoxyesterday at 11:10 PM

Oh you are right, more dots indicate lower operator precedence (weaker binding), not the other way round. Though the explanations you cited seem confusing to me. Apparently by non-programmers.