2.1.4: Unique Readability
The way we defined formulas guarantees that every formula has a unique reading , i.e., there is essentially only one way of constructing it according to our formation rules for formulas and only one way of “interpreting” it. If this were not so, we would have ambiguous formulas, i.e., formulas that have more than one reading or intepretation—and that is clearly something we want to avoid. But more importantly, without this property, most of the definitions and proofs we are going to give will not go through.
Perhaps the best way to make this clear is to see what would happen if we had given bad rules for forming formulas that would not guarantee unique readability. For instance, we could have forgotten the parentheses in the formation rules for connectives, e.g., we might have allowed this:
If \(A\) and \(B\) are formulas, then so is \(A \lif B\) .
Starting from an atomic formula \(D\) , this would allow us to form \(D \lif D\) . From this, together with \(D\) , we would get \(D \lif D \lif D\) . But there are two ways to do this:
- We take \(D\) to be \(A\) and \(D \lif D\) to be \(B\) .
- We take \(A\) to be \(D \lif D\) and \(B\) is \(D\) .
Correspondingly, there are two ways to “read” the formula \(D \lif D \lif D\) . It is of the form \(B \lif C\) where \(B\) is \(D\) and \(C\) is \(D \lif D\) , but it is also of the form \(B \lif C\) with \(B\) being \(D \lif D\) and \(C\) being \(D\) .
If this happens, our definitions will not always work. For instance, when we define the main operator of a formula, we say: in a formula of the form \(B \lif C\) , the main operator is the indicated occurrence of \(\lif\) . But if we can match the formula \(D \lif D \lif D\) with \(B \lif C\) in the two different ways mentioned above, then in one case we get the first occurrence of \(\lif\) as the main operator, and in the second case the second occurrence. But we intend the main operator to be a function of the formula, i.e., every formula must have exactly one main operator occurrence.
The number of left and right parentheses in a formula \(A\) are equal.
Proof. We prove this by induction on the way \(A\) is constructed. This requires two things: (a) We have to prove first that all atomic formulas have the property in question (the induction basis). (b) Then we have to prove that when we construct new formulas out of given formulas, the new formulas have the property provided the old ones do.
Let \(l(A)\) be the number of left parentheses, and \(r(A)\) the number of right parentheses in \(A\) , and \(l(t)\) and \(r(t)\) similarly the number of left and right parentheses in a term \(t\) . We leave the proof that for any term \(t\) , \(l(t) = r(t)\) as an exercise.
- \(\indcase{A}{\lfalse}\) \(\indfrm\) has 0 left and 0 right parentheses.
- \(\indcase{A}{\Atom{R}{t_1,\dots,t_n}}\) \(l(\indfrm) = 1 + l(t_1) + \dots + l(t_n) = 1 + r(t_1) + \dots + r(t_n) = r(\indfrm)\) . Here we make use of the fact, left as an exercise, that \(l(t) = r(t)\) for any term \(t\) .
- \(\indcase{A}{\eq[t_1][t_2]}\) \(l(\indfrm) = l(t_1) + l(t_2) = r(t_1) + r(t_2) = r(\indfrm)\) .
- \(\indcase{A}{\lnot B}\) By induction hypothesis, \(l(B) = r(B)\) . Thus \(l(\indfrm) = l(B) = r(B) = r(\indfrm)\) .
- \(\indcase{A}{(B \ast C)}\) By induction hypothesis, \(l(B) = r(B)\) and \(l(C) = r(C)\) . Thus \(l(\indfrm) = 1 + l(B) + l(C) = 1 + r(B) + r(C) = r(\indfrm)\) .
- \(\indcase{A}{\lforall{x}{B}}\) By induction hypothesis, \(l(B) = r(B)\) . Thus, \(l(\indfrm) = l(B) = r(B) = r(\indfrm)\) .
- \(\indcase{A}{\lexists{x}{B}}\) Similarly.
◻
A string of symbols \(B\) is a proper prefix of a string of symbols \(A\) if concatenating \(B\) and a non-empty string of symbols yields \(A\) .
If \(A\) is a formula, and \(B\) is a proper prefix of \(A\) , then \(B\) is not a formula.
Proof. Exercise. ◻
Prove Lemma \(\PageIndex{2}\) .
If \(A\) is an atomic formula, then it satisfies one, and only one of the following conditions.
- \(A \ident \lfalse\) .
- \(A \ident \Atom{R}{t_1,\dots,t_n}\) where \(R\) is an \(n\) -place predicate symbol, \(t_1\) , …, \(t_n\) are terms, and each of \(R\) , \(t_1\) , …, \(t_n\) is uniquely determined.
- \(A \ident \eq[t_1][t_2]\) where \(t_1\) and \(t_2\) are uniquely determined terms.
Proof. Exercise. ◻
Prove Proposition \(\PageIndex{1}\) (Hint: Formulate and prove a version of Lemma \(\PageIndex{2}\) for terms.)
Every formula satisfies one, and only one of the following conditions.
- \(A\) is atomic.
- \(A\) is of the form \(\lnot B\) .
- \(A\) is of the form \((B \land C)\) .
- \(A\) is of the form \((B \lor C)\) .
- \(A\) is of the form \((B \lif C)\) .
- \(A\) is of the form \(\lforall{x}{B}\) .
- \(A\) is of the form \(\lexists{x}{B}\) .
Moreover, in each case \(B\) , or \(B\) and \(C\) , are uniquely determined. This means that, e.g., there are no different pairs \(B\) , \(C\) and \(B'\) , \(C'\) so that \(A\) is both of the form \((B \lif C)\) and \((B' \lif C')\) .
Proof. The formation rules require that if a formula is not atomic, it must start with an opening parenthesis (, \(\lnot\) , or with a quantifier. On the other hand, every formula that start with one of the following symbols must be atomic: a predicate symbol, a function symbol, a constant symbol , \(\lfalse\) .
So we really only have to show that if \(A\) is of the form \((B \ast C)\) and also of the form \((B' \mathbin{\ast'} C')\) , then \(B \ident B'\) , \(C \ident C'\) , and \(\ast = {\ast'}\) .
So suppose both \(A \ident (B \ast C)\) and \(A \ident (B' \mathbin{\ast'} C')\) . Then either \(B \ident B'\) or not. If it is, clearly \(\ast = {\ast'}\) and \(C \ident C'\) , since they then are substrings of \(A\) that begin in the same place and are of the same length. The other case is \(B \not\ident B'\) . Since \(B\) and \(B'\) are both substrings of \(A\) that begin at the same place, one must be a proper prefix of the other. But this is impossible by Lemma \(\PageIndex{2}\) . ◻