unique readability of parenthesized formulas


Given a set V of propositional variables, and a set F of logical connectives, one may form the set V¯ of well-formed formulas, or wffs. The appearance of a wff depends on the formation rule of a well-formed formula. Auxiliary symbols may or may not be used in the construction of a wff. In the parent entry, we proved that every well-formed formula constructed without the aid of auxiliary symbols has a unique appearance. In this entry, we show that, with the aid of auxiliary symbols such as parentheses, specifically, unique readability is achieved as well. The specific formation rule we have in mind is the following: if p1,,pn are existing wffs, and α is n-ary, then so is (αp1pn) a wff.

Theorem 1.

Wffs constructed using the formation rule above have unique readability.

We will only give a partial proof here, since the portion not proved can be easily produced by closely following the proof from the parent entry.

Sketch of Proof.

A wff has one of the following three forms: v, (#), or (αp1pn), where v is atomic (propositional variable), # and α are nullary and n-ary connectives respectively, with n>0, and all pi are existing wffs.

First, it is easy to see that every wff has the same number of left parentheses as right parentheses, and every proper non-trivial initial segment of a wff has more left than right parentheses.

Now, suppose p and q are wffs and p=q. We look at the following cases:

  • If p is atomic, then so must be q, and vice versa.

  • If p=(#), then q is either (@) where @ is nullary, or q=(αp1pn), where α is n-ary with n>0. However, the second choice is not possible, as the length of the word (αp1pn) is longer than (#). So we are left with (@). Canceling the parentheses in the equation (#)=(@), we have #=@.

  • If p=(αp1pn), then q must have the form (βq1qm). Equating the two expressions and canceling the parentheses, we get α=β and thus m=n. By an argument similar to the one given in the parent entry, we see that pn=qn, utilizing the function ϕ* modified so that ϕ(()=ϕ())=0. Continuing this, we see that pi=qi for all i=1,,n.

In all three cases, we have unique readability, the proof is completePlanetmathPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath. ∎

Commas are also often used as auxiliary symbols in forming wffs to improve comprehensibility without violating unique readability.

Theorem 2.

Wffs constructed using the following formulaMathworldPlanetmath formation rule have unique readability: if p1,,pn are existing wffs, and α is n-ary, then so is α(p1,,pn) a wff.

Sketch of Proof.

Like the last proof, a wff also has one of the three forms: v, (#), or α(p1,,pn), where v is atomic (propositional variable), # and α are nullary and n-ary connectives respectively, with n>0, and all pi are existing wffs.

The rest of the proof goes pretty much the same as the last one. The last case deserves a little more attention:

If p=α(p1,,pn), and q has the form β(q1,,qm). We again have α=β and m=n, after equating p and q. Eliminating the parentheses, we get p1,,pn=q1,,qn. So pn is a suffix of q1,,qn, which means that it is either a suffix of qn, or has the form r,qk,,qn, where r is a suffix of qk-1, and kn. In the latter case, if r is the empty wordPlanetmathPlanetmath, then pn=,qk,,qn, which is impossible because no wffs begins with a comma. So r is a non-trivial suffix of qk-1. Using ϕ* (see the parent entry) modified so that ϕ(()=ϕ())=ϕ(,)=0, we again show that pn can not be r,qk,,qn. Therefore, pn is a suffix of qn. We will let the reader finish the rest. ∎

Finally, another common practice is to infix a connective when it is binary. We again have unique readability:

Theorem 3.

Wffs constructed using the following formula formation rule have unique readability: if p1,,pn are existing wffs, and α is n-ary, then so is (αp1pn) a wff if n2, and so is (p1αp2) a wff if n=2.

Sketch of Proof.

The proof is very much the same as before. A wff in this case has four forms: v, (#), (αp1pn), or (q1βq2). We only need to observe the following:

  • if p has the form (αp1pn), and p=q, then q can not have the form (q1βq2), for otherwise q1 begins with α, which is impossible, because a wff never begins with a connective symbol, as it either begins with a left parenthesis (, or is an atom.

  • so p has the form (p1αp2) and q has the form (q1βq2), which means that p1 is a prefix of q1βq2). Then p1 is either a prefix of q1, or has the form q1βr, where r is a prefix of q2). Let us look at the latter case. r can not be the empty word, for otherwise p1=q1β, and no wffs end with a connective symbol. r can not be q2 or q2), for otherwise p1αp2 is longer (in length) than q1βq2. So r is a proper non-trivial prefix of q2, but this is also impossible, for then r has more left than right parentheses, which means q1βr, or p1, a wff, has more left than right parentheses. This shows that p1 is a prefix of q1.

The rest of the proof is now easy. ∎

Title unique readability of parenthesized formulas
Canonical name UniqueReadabilityOfParenthesizedFormulas
Date of creation 2013-03-22 18:52:44
Last modified on 2013-03-22 18:52:44
Owner CWoo (3771)
Last modified by CWoo (3771)
Numerical id 5
Author CWoo (3771)
Entry type Theorem
Classification msc 03B05