A Propositional logic formula analysis tool

Truth tables and expression trees are wonderful tools for understanding formulas in propositional logic. However, they are tedious to do by hand. And whenever anything is tedious to do by hand we should ... have a computer do it for us! To that end, check out ...

The SI242 Propositional logic formula analysis tool

ACTIVITY: Use the above tool to explore and discover with a partner
  1. What's the easiest way you can find to determine whether two formulas are equivalent? For example:
    1. Are a⊕b⇒b∧¬c and (a⇔b)∨¬(b⊕c) equivalent?
    2. Are a⊕b⇒b∧¬c and (a⇔b)∨¬(b⇒c) equivalent?
  2. A binary operator $\small\mbox{ op}$ is said to have the commutative property if for all operands $a$ and $b$, it holds that $a {\small\mbox{ op }} b = b {\small\mbox{ op }} a$. Of our propositional operators $\wedge,\vee,\Rightarrow,\Leftrightarrow,\oplus$, which are commutative and which are not? How can you prove that an operator is commutative? How can you prove that an operator is not commutative?
  3. A binary operator $\small\mbox{op}$ is said to have the associative property if for all operands $a$, $b$ and $c$, it holds that $(a {\small\mbox{ op }} b) {\small\mbox{ op }} c = a {\small\mbox{ op }} (b {\small\mbox{ op }} c)$. Of our propositional operators $\wedge,\vee,\Rightarrow,\Leftrightarrow,\oplus$, which are associative and which are not? How can you prove that an operator is associative? How can you prove that an operator is not associative?
  4. What is the simplest formula you can find that is equivalent to ite(a,b,c)? ["Simplest" is not precise, so use your own judgement on what constitutes "simple".] Use the tool to check that the truth table for your formula matches that of the ite function!

Properties of propositional operators

It's worth taking some time to review what we learned from the in-class activity. For more detail, consult your personal notes. In other words, we proved the following two theorems:

In propositional logic, operators ∧, ∨, ⇔ and ⊕ are commutative, and operator ⇒ is not.
Proved in class by checking truth tables. For example, we checked that the truth table for $$ a \Rightarrow b \Leftrightarrow b \Rightarrow a $$ ...does not have all true's in the output column, which shows that "$\Rightarrow$" is not commutative.

In propositional logic, operators ∧, ∨, ⇔ and ⊕ are associative, and operator ⇒ is not.
Proved in class by checking truth tables. For example, we checked that the truth table for $$ (a \vee b) \vee c \Leftrightarrow a \vee (b \vee c) $$ ... has all true's in the output column, which shows that "$\vee$" is associative.

The ite example

The above properties of propositional operators are a start in building an "algebra of true/false values". We can now rewrite formulas to put them in more useful forms just like we rewrite algebraic expressions and equations. In activity (4), we did exactly that. We originally defined ite(a,b,c) by a truth table. Using the algorithm from last class, we constructed a propositional formula for ite(a,b,c): $$ (\neg a \wedge \neg b \wedge c) \vee (\neg a \wedge b \wedge c) \vee (a \wedge b \wedge \neg c) \vee (a \wedge b \wedge c) $$ but this is a big, ugly formula. To simplify it, we needed to do something in the same spirit as algebra - we needed commutativity and other properties of operators. Consider the first two chunks: $(\neg a \wedge \neg b \wedge c) \vee (\neg a \wedge b \wedge c)$. We proved that $\wedge$ is commutative, so this can be rewritten as the equivalent formula $$ (\neg b \wedge \neg a \wedge c) \vee (b \wedge \neg a \wedge c) $$ ... and we see that, whether $b$ is true or false, this is true exactly when $\neg a \vee c$ is true. So the first two chunks simplify to: $\neg a \vee c$. (You can verify this with truth tables if you aren't convinced!) A similar argument shows that the second two chunks simplify to $a \vee b$. So we arrive at ¬a∧c ∨ a∧b as our simple equivalent formula. If you don't believe this is equivalent, use the SI242 tool to produce a truth table for it, and check that it matches the truth table for ite. Please refer to your own notes from class for details.

Christopher W Brown