Abbreviating WFFs
“The word “abbreviation” sure is long for what it means.”
—Zach Galifianakis
Earlier, we noted that English language has problems with ambiguities.
Even if there is no disagreement about the meanings of each word
individually, a sentence like
He saw a girl with a telescope
has two different meanings depending on whether we read this as
He saw (a girl with a telescope)
or
He saw (a girl) with a telescope.
Similarly, even if we agreed that ∧ means “and”, ∨ means
“or”, → means “implies”, formulas like
P∧Q∨RP→Q→R¬S∨T
leave open the question of whether the
first formula should be interpreted as “(P and Q) or R” or ”P
and (Q or R)” and whether the second formula should be interpreted
as “(P implies Q) implies R” or ”P implies (Q implies R)”,
or whether the third equation means “(not S) or T” or “not (S or
T)”. The answer matters, because we can use truth tables to verify
that the possibilities are not logically equivalent.
Our official definition of Well-Formed Formulas requires parentheses
around every conjunction, disjunction, and implication. This solves the
problem (for logicians), because the above formulas are simply not
considered well-formed. Instead, we are required to write whichever of
((P∧Q)∨R)(P∧(Q∨R))
((P→Q)→R)(P→(Q→R))
(¬S ∨ T)¬(S∨T)
we intended to say. By
requiring parentheses, every WFF is either unambiguously a propositional
variable (e.g., P), a propositional constant (e.g., ⊥), a
negation, and conjunction, and disjunction, or an implication, and it’s
unambiguous what subformulas are intended.
Example
- The WFF ((P∧Q)∨(R→S)) can only be interpreted as the
disjunction of (P∧Q) and (R→S).
- The WFF ¬(P→Q) can only be interpreted as the negation of
P→Q.
- The WFF (¬P → (Q∨R)) can only be interpreted as
saying that ¬P implies Q∨R.
This lack of ambiguity is incredibly convenient for the study of logical
systems. However, when we humans are working with large formulas one
must admit it is tedious to have to write
(((((P∧Q)∧R)∧S)∧T)→((U∨V)∨W))
instead of just
P∧Q∧R∧S∧T → U∨V∨W.
Therefore, we will make the following compromise.
- Officially, all WFFs remain completely parenthesized. Thus, when
logicians studying the properties of this logical system want prove
something about all WFFs, they can assume they only have to consider
unambiguous, fully-parenthesized formulas.
- However, we allow ourselves to write “abbreviations” for WFFs with
fewer parentheses, by defining a set of rules for how
ambiguous-looking formulas should be unambiguously interpreted.
Definition
When writing WFFs, we can write abbreviated forms, and use the following
rules to figure out which WFF we are referring to:
- Precedence: ¬ groups most tightly, followed in order by
∧, ∨, and →.
- Associativity: ∧ and ∨ are left-associative, but
→ is right-associative.
- Other: we allow ourselves to write A↔B instead
of ((A→B)∧(B→A)) (where A and B here represent
arbitrary WFFs). The ↔ operator has lowest
precedence.
Example
- P∧Q∨R abbreviates ((P∧Q)∨R)
since ∧ groups tighter than ∨.
- P→Q→R abbreviates (P→(Q→R))
since → is right-associative.
- ¬S∨T abbreviates (¬S∨T)
since ¬ groups tighter than ∨.
- P∧Q↔R abbreviates the WFF
(((P∧Q)→R)∧(R→(P∧Q)))
since ∧ binds tighter than ↔.