In logic, there are a few different ways to get around using parentheses. One style involves writing in dots next to connectives to indicate their relative scope: instead of (P∧Q)∨R, for instance, you'd write P∧Q.∨R. The dots are hard to keep track of, and this style has fortunately fallen into disuse.
Polish prefix notation is another style, invented by mathematician/logician Jan Łukasiewicz in 1920. Its advantage is that it is unambiguous and easy to follow even without parentheses; its disadvantage is that it's pretty disorienting to look at if you're used to infix notation, like what has become conventional notation for logic. Its atomic sentences are all lower case letters to distinguish them from the connectives, which are upper case letters. The connectives are these:
- ¬P — Np
- P∧Q — Kpq
- P|Q — Dpq
- P∨Q — Apq
- P→Q — Cpq
- P↔Q — Epq
- ∃x — Σx
- ∀x — Πx
And operators from modal logic: necessity is denoted by L, and possibility by M.
Because it's a prefix notation, the connectives go at the beginning of a sentence. They are arranged so that the connective with the widest scope is first, followed by its arguments; the order of the connectives indicates which is contained in the scope of which. So, instead of P&Q, we'd write Kpq; instead of ¬(P∨Q), NApq; instead of ¬((P∧(Q∨R))∨S), NAKpAqrs.
Polish prefix notation also requires that each connective have a fixed arity—that is, it can only take a certain number of arguments. Otherwise a sentence like KpNKqrs is ambiguous; we can read it as P∧¬(Q∧R)∧S or P∧¬(Q∧R∧S), and they aren't equivalent.
299