Propositions and Truth Tables

Switch the connective and watch the new column fill in while the PP, QQ columns stay fixed. Compare the shaded P→QP \to Q column with its contrapositive ¬Q→¬P\lnot Q \to \lnot P row by row — identical in all four rows. The converse Q→PQ \to P, though, splits off in the (T,F)(T, F) row.

(P→Q)≡(¬Q→¬P)(P \to Q) \equiv (\lnot Q \to \lnot P)
¬(P∧Q)≡(¬P)∨(¬Q)\lnot(P \land Q) \equiv (\lnot P) \lor (\lnot Q)
(P→Q)≡(¬P∨Q)(P \to Q) \equiv (\lnot P \lor Q)

Examples & Exercises

Use a truth table to prove completely that P→QP \to Q is logically equivalent to its contrapositive ¬Q→¬P\lnot Q \to \lnot P. Compute all four rows explicitly and explain why matching truth values in every row means logical equivalence.

(P→Q)  ≡  (¬Q→¬P)(P \to Q) \;\equiv\; (\lnot Q \to \lnot P)
Connective: implication, contrapositive column shown: the P→QP \to Q and ¬Q→¬P\lnot Q \to \lnot P columns agree in all 4 rows, while the converse Q→PQ \to P column differs in the (T,F)(T, F) row.
Show proof
  1. By definition P→QP \to Q is ¬P∨Q\lnot P \lor Q. Compute the four rows explicitly. (P,Q)=(T,T)(P, Q) = (T, T): P→Q=TP \to Q = T, contrapositive (¬Q)→(¬P)=F→F=T(\lnot Q) \to (\lnot P) = F \to F = T. (T,F)(T, F): P→Q=T→F=FP \to Q = T \to F = F, contrapositive T→F=FT \to F = F.
  2. (P,Q)=(F,T)(P, Q) = (F, T): P→Q=F→T=TP \to Q = F \to T = T (an implication with a false antecedent is true), contrapositive F→T=TF \to T = T. (F,F)(F, F): P→Q=F→F=TP \to Q = F \to F = T, contrapositive T→T=TT \to T = T. So the row-by-row truth pairs are (T,T),(F,F),(T,T),(T,T)(T,T), (F,F), (T,T), (T,T) — the two columns match in every row.
  3. Matching truth values in every row means the two propositions take the same value under every assignment of truth values to PP and QQ. Their "when is this true" answers coincide in every possible case, so the two propositions are logically equivalent. This justifies proof by contrapositive: instead of P→QP \to Q we may prove the equivalent ¬Q→¬P\lnot Q \to \lnot P.

Prove De Morgan's law ¬(P∧Q)  ⟺  (¬P)∨(¬Q)\lnot(P \land Q) \iff (\lnot P) \lor (\lnot Q) with a truth table. Compute both sides in all four rows, and observe in which rows the ∧\land column is FF.

¬(P∧Q)    ⟺    (¬P)∨(¬Q)\lnot(P \land Q) \;\iff\; (\lnot P) \lor (\lnot Q)
Connective: conjunction, contrapositive column shown: the P∧QP \land Q column is TT only in the (T,T)(T, T) row, and only in that row are ¬(P∧Q)\lnot(P \land Q) and (¬P)∨(¬Q)(\lnot P) \lor (\lnot Q) both FF.
Show proof
  1. First the P∧QP \land Q column: (T,T)→T(T,T) \to T, (T,F)→F(T,F) \to F, (F,T)→F(F,T) \to F, (F,F)→F(F,F) \to F — TT occurs only in the (T,T)(T, T) row. Hence the left side ¬(P∧Q)\lnot(P \land Q) has the column (F,T,T,T)(F, T, T, T) in row order.
  2. Now compute the right side (¬P)∨(¬Q)(\lnot P) \lor (\lnot Q) row by row. (T,T)(T,T): F∨F=FF \lor F = F. (T,F)(T,F): F∨T=TF \lor T = T. (F,T)(F,T): T∨F=TT \lor F = T. (F,F)(F,F): T∨T=TT \lor T = T. So the right side also has column (F,T,T,T)(F, T, T, T) — matching the left side row by row.
  3. Since the two columns agree in every row, ¬(P∧Q)\lnot(P \land Q) and (¬P)∨(¬Q)(\lnot P) \lor (\lnot Q) are logically equivalent. Observe: in exactly the three rows where P∧QP \land Q is FF — i.e. where at least one of P,QP, Q is false — the right side is TT. "Not both are true" says the same thing as "at least one is false".

Show that P→QP \to Q is NOT equivalent to its converse Q→PQ \to P. Exhibit the row (P,Q)=(T,F)(P, Q) = (T, F) where they split, and instead prove the true equivalence P→Q  ⟺  ¬P∨QP \to Q \iff \lnot P \lor Q with a truth table.

(P→Q)  ≢  (Q→P),(P→Q)  ≡  (¬P∨Q)(P \to Q) \;\not\equiv\; (Q \to P), \qquad (P \to Q) \;\equiv\; (\lnot P \lor Q)
Connective: implication, contrapositive column hidden: the P→QP \to Q column (T,F,T,T)(T, F, T, T) and the converse Q→PQ \to P column (T,T,F,T)(T, T, F, T) split FF vs TT in the (T,F)(T, F) row.
Show proof
  1. Look at the row (P,Q)=(T,F)(P, Q) = (T, F). There P→Q=T→F=FP \to Q = T \to F = F, while the converse Q→P=F→T=TQ \to P = F \to T = T. A single row with different truth values rules out logical equivalence, so P→QP \to Q and Q→PQ \to P are not equivalent. Intuitively: "if xx is prime then xx is odd or equal to 22" is true, but its converse is false.
  2. Instead we prove P→Q  ⟺  ¬P∨QP \to Q \iff \lnot P \lor Q — which is also the definition of implication. Computing the ¬P∨Q\lnot P \lor Q column: (T,T)(T,T): F∨T=TF \lor T = T; (T,F)(T,F): F∨F=FF \lor F = F; (F,T)(F,T): T∨T=TT \lor T = T; (F,F)(F,F): T∨F=TT \lor F = T. That is (T,F,T,T)(T, F, T, T) — matching the P→QP \to Q column row by row.
  3. Hence P→QP \to Q is equivalent to ¬P∨Q\lnot P \lor Q. This form makes negations easy to push inward: ¬(P→Q)≡¬(¬P∨Q)≡P∧¬Q\lnot(P \to Q) \equiv \lnot(\lnot P \lor Q) \equiv P \land \lnot Q (by De Morgan). So there is exactly one way an implication can be false — the row (T,F)(T, F): true antecedent, false consequent.

1. Foundations of Proof