1. Consider the set of Boolean expressions defined in
Example 5.9.1. Give derivations showing that each
of the following is a Boolean expression over the
English alphabet {$a, b, c, ..., x, y, z$}.
a. $\sim p \vee (q \wedge (r \vee \sim s))$
b. $(p \vee q) \vee \sim ((p \wedge \sim s) \wedge r)$
Recursive Definition of Boolean Expressions
The set of Boolean expressions was introduced in Section 2.4 as "legal" expressions involving letters from the English alphabet such as $p, q,$ and $r$, and the symbols $\wedge, \vee, \sim$, and (). To make precise which expressions are legal, the set of Boolean expressions over a general alphabet is defined recursively.
I. Base: Each symbol of the alphabet is a Boolean expression.
II. Recursion: If $P$ and $Q$ are Boolean expressions, then the following are also Boolean expressions:
II(a) $P \wedge Q$ II(b) $P \vee Q$ II(c) $\sim P$ II(d) $(P)$
III. Restriction: There are no Boolean expressions over the alphabet other than those obtained from the base and the recursion.
Derive the fact that the following is a Boolean expression over the English alphabet {$a, b, c, ..., x, y, z$}:
$\sim (p \wedge q) \vee (\sim r \wedge p)$.
Solution (1) By I, $p, q,$ and $r$ are Boolean expressions.
(2) By (1), II(a), and II(c), $p \wedge q$ and $\sim r$ are Boolean expressions.
(3) By (2), II(d), and II(a), $(p \wedge q)$ and $(\sim r \wedge p)$ are Boolean expressions.
(4) By (3), II(c), and II(d), $\sim (p \wedge q)$ and $(\sim r \wedge p)$ are Boolean expressions.
(5) By (4) and II(b), $\sim (p \wedge q) \vee (\sim r \wedge p)$ is a Boolean expression.