In the following, A, B, and C represent arbitrary boolean expressions satisfying [A ⇒ B] (i.e., in all states, A implies B), and ⊕ represents any one of the operators ∧ (conjunction), ∨ (disjunction), ≡ (equivalence), ⇒ (implication), or ⇐ (consequence). Students often assume, wrongly, that, regardless of what ⊕ is, the following is a valid proof step:
A ⊕ C
⇒ < hint as to why [A ⇒ B] >
B ⊕ C
(You can easily imagine similar scenarios in which the two operands of ⊕
are swapped in each expression and/or in which each occurrence of ⇒ is
replaced by ⇐.)
Do you see anything wrong?
What is wrong is that this step is not valid, unless ⊕ happens to be either ∨ or ∧. In these two cases, the step is justified by the Monotonicity Theorems (4.2) and (4.3), respectively, in Gries and Schneider. Analogous theorems for the other three binary boolean operators do not exist!! Indeed, it is easy to devise counterexamples to demonstrate that, for each of the operators ≡, ⇒, and ⇐, the above proof step is not valid. This is left as an exercise for the reader.
The following theorem indicates for which combinations of operators ⊕ and ∗ a proof step of the form
A ⊕ C
∗ < hint as to why [A ⇒ B] >
B ⊕ C
is valid.
Theorem: (p ⇒ q) ⇒
For example, from (c) it follows that for any boolean expressions A, B, C satisfying [A ⇒ B], the following is valid:
A ⇒ C
⇐ < hint as to why [A ⇒ B] >
B ⇒ C
From (d) it follows that
A ⇐ C
⇒ < hint as to why [A ⇒ B] >
B ⇐ C
is valid.
From (e), it follows that
¬A
⇐ < hint as to why [A ⇒ B] >
¬B
is valid.