Some arguments look convincing but are wrong. A truth table gives us a sure test of validity. Certain valid forms are used again and again; they are called rules of inference, and every proof in this unit is built from them.
Testing validity with a truth table
Name the simple statements (p p p , q q q , …) and write the premises and the conclusion in symbols.
Build one truth table with a column for each premise and for the conclusion.
Find the critical rows : the rows in which all premises are true.
The argument is valid if the conclusion is true in every critical row. One critical row with a false conclusion makes it invalid.
Example 2.5 An argument that only looks valid
Goal. Is this argument valid? “If the server is down, the website shows an error. The website shows an error. Therefore, the server is down.”
Step. Let p p p : “the server is down”, q q q : “the website shows an error”. Premises: p → q p \to q p → q and q q q . Conclusion: p p p .
Step. Truth table:
p p p q q q p → q p \to q p → q q q q conclusion p p p T T T T T T F F F T F T T T F F F T F F
Step. Critical rows (both premises T): row 1 and row 3.
Step. In row 3 the conclusion is F: the server is up, yet the website shows an error (perhaps a bug in the code).
Result. The argument is invalid. This mistake is called the fallacy of affirming the conclusion .
The four main rules of inference
Intuition
A rule of inference is a “safe move” in a game of reasoning. Like a legal move in chess, it can never take you from true premises to a false conclusion. Each rule below has been checked once and for all with a truth table, so you may use it without checking again.
Definition 2.6 · Rule of inference
A rule of inference is a valid argument form: a pattern of premises and conclusion for which (premises) ⇒ \Rightarrow ⇒ (conclusion) holds for every choice of the statements involved.
Rule Premises Conclusion Form Modus ponens (law of detachment)p → q p \to q p → q , p p p q q q [ ( p → q ) ∧ p ] ⇒ q [(p \to q) \land p] \Rightarrow q [( p → q ) ∧ p ] ⇒ q Modus tollens (law of contraposition)p → q p \to q p → q , ¬ q \neg q ¬ q ¬ p \neg p ¬ p [ ( p → q ) ∧ ¬ q ] ⇒ ¬ p [(p \to q) \land \neg q] \Rightarrow \neg p [( p → q ) ∧ ¬ q ] ⇒ ¬ p Disjunctive syllogism p ∨ q p \lor q p ∨ q , ¬ p \neg p ¬ p q q q [ ( p ∨ q ) ∧ ¬ p ] ⇒ q [(p \lor q) \land \neg p] \Rightarrow q [( p ∨ q ) ∧ ¬ p ] ⇒ q Hypothetical syllogism p → q p \to q p → q , q → r q \to r q → r p → r p \to r p → r [ ( p → q ) ∧ ( q → r ) ] ⇒ ( p → r ) [(p \to q) \land (q \to r)] \Rightarrow (p \to r) [( p → q ) ∧ ( q → r )] ⇒ ( p → r )
“Modus ponens” is Latin for “method of affirming”; “modus tollens” for “method of denying”. Rosen (Section 1.6, Table 1) lists more rules — addition (p ⇒ p ∨ q p \Rightarrow p \lor q p ⇒ p ∨ q ), simplification (p ∧ q ⇒ p p \land q \Rightarrow p p ∧ q ⇒ p ) and conjunction (from p p p and q q q conclude p ∧ q p \land q p ∧ q ) — which you will meet in proofs too.
Valid: modus ponens p → q, p ∴ q
Fallacy: affirming the conclusion p → q, q ∴ p
Valid: modus tollens p → q, ¬q ∴ ¬p
Fallacy: denying the hypothesis p → q, ¬p ∴ ¬q
Two valid rules and two look-alike fallacies
Correction · Column heading in Table 2 (modus ponens)
Study material says: In §2.2, Table 2 for [ ( p → q ) ∧ p ] ⇒ q [(p \to q) \land p] \Rightarrow q [( p → q ) ∧ p ] ⇒ q has the column heading "( p → q ) ∧ q (p \to q) \land q ( p → q ) ∧ q ".
Correct version: The column must be ( p → q ) ∧ p (p \to q) \land p ( p → q ) ∧ p (the conjunction of the two premises). Its values T, F, F, F, which are printed correctly, belong to ( p → q ) ∧ p (p \to q) \land p ( p → q ) ∧ p ; the column ( p → q ) ∧ q (p \to q) \land q ( p → q ) ∧ q would be T, F, T, F.
Why: The premises of modus ponens are p → q p \to q p → q and p p p . Direct truth-table check.
Correction · Hypothetical syllogism named disjunctive syllogism in the summary
Study material says: The summary (§2.5) promises four rules of inference but lists three, and gives “disjunctive syllogism: [ ( p → q ) ∧ ( q → r ) ] ⇒ ( p → r ) [(p \to q) \land (q \to r)] \Rightarrow (p \to r) [( p → q ) ∧ ( q → r )] ⇒ ( p → r ) ”.
Correct version: [ ( p → q ) ∧ ( q → r ) ] ⇒ ( p → r ) [(p \to q) \land (q \to r)] \Rightarrow (p \to r) [( p → q ) ∧ ( q → r )] ⇒ ( p → r ) is the hypothetical syllogism. The disjunctive syllogism is [ ( p ∨ q ) ∧ ¬ p ] ⇒ q [(p \lor q) \land \neg p] \Rightarrow q [( p ∨ q ) ∧ ¬ p ] ⇒ q . The four rules are modus ponens, modus tollens, disjunctive syllogism and hypothetical syllogism.
Why: These are the definitions given in §2.2 of the same unit and in Rosen, Section 1.6, Table 1.
Correction · Answers in §2.6 are numbered one step off
Study material says: In §2.6 the answers are numbered E1, E2, …, E18, but the exercises run from E1 to E19.
Correct version: From E5 onwards the labels are shifted: the answer printed as “E5” belongs to E6, “E6” to E7, …, and “E18” to E19. E5 (examples of modus ponens and modus tollens) has no printed answer; a model answer is given in the exam box below. Also, E9 has only a part (ii) in the question, although the answer mentions a part (i).
Why: Comparison of each printed answer with the exercise it actually solves (e.g. the answer “E5” proves x 2 = 9 ⇒ x = ± 3 x^2 = 9 \Rightarrow x = \pm 3 x 2 = 9 ⇒ x = ± 3 , which is E6).
Example 2.7 Checking a three-premise argument
Goal. Is this valid? “Either Ravi will code or Simran will test. If Simran tests, then the build passes. The build does not pass. Therefore, Simran will test.”
Step. Let p p p : “Ravi will code”, q q q : “Simran will test”, r r r : “the build passes”. Premises: p ∨ q p \lor q p ∨ q , q → r q \to r q → r , ¬ r \neg r ¬ r . Conclusion: q q q .
Step. From q → r q \to r q → r and ¬ r \neg r ¬ r , modus tollens gives ¬ q \neg q ¬ q . So whenever all premises are true, q q q is false .
Step. Confirm with a critical row: p p p = T, q q q = F, r r r = F makes all three premises true (T ∨ F T \lor F T ∨ F = T, F → F F \to F F → F = T, ¬ F \neg F ¬ F = T) but the conclusion q q q is F.
Step. What does follow? From p ∨ q p \lor q p ∨ q and ¬ q \neg q ¬ q , disjunctive syllogism gives p p p : “Ravi will code”.
Result. The argument is invalid (counterexample row p p p = T, q q q = F, r r r = F); the valid conclusion is “Ravi will code”.
Common mistake
Affirming the conclusion. From p → q p \to q p → q and q q q you cannot conclude p p p . “If it rains, the road is wet; the road is wet” does not prove it rained.
Common mistake
Denying the hypothesis. From p → q p \to q p → q and ¬ p \neg p ¬ p you cannot conclude ¬ q \neg q ¬ q . “If you study, you pass; you did not study” does not prove you fail.
Key idea
An argument is valid exactly when the conclusion is true in every row where all premises are true. Modus ponens, modus tollens and the two syllogisms are valid forms that may be used in any proof; affirming the conclusion and denying the hypothesis are not.
TEE Exam note
Typical question: “Check whether the argument … is valid.” Write it in symbols, draw the truth table, mark the critical rows, and give a one-line verdict. Correct answers to the Check Your Progress questions: E3, [ ( p → q ∨ ¬ r ) ∧ ( q → p ) ] ⇒ ( p → r ) [(p \to q \lor \neg r) \land (q \to p)] \Rightarrow (p \to r) [( p → q ∨ ¬ r ) ∧ ( q → p )] ⇒ ( p → r ) : the premises are true in rows 1, 2, 4, 7, 8, and in row 2 (p p p = T, q q q = T, r r r = F) the conclusion is F, so it is invalid . E4(i) is valid (disjunctive syllogism), E4(ii) is valid (hypothetical syllogism), E4(iii) is invalid (row p p p = T, q q q = F, r r r = F). E5: modus ponens — “If a number ends in 0, it is divisible by 5; 40 ends in 0; so 40 is divisible by 5.” Modus tollens — “If a file exists, open succeeds; open did not succeed; so the file does not exist.”
Key takeaways
Valid argument: the conclusion is true in every critical row (all premises true).
Modus ponens: p → q p \to q p → q , p p p ∴ q q q . Modus tollens: p → q p \to q p → q , ¬ q \neg q ¬ q ∴ ¬ p \neg p ¬ p .
Disjunctive syllogism: p ∨ q p \lor q p ∨ q , ¬ p \neg p ¬ p ∴ q q q . Hypothetical syllogism: p → q p \to q p → q , q → r q \to r q → r ∴ p → r p \to r p → r .
Affirming the conclusion and denying the hypothesis are fallacies.
Practice questions Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 1 · multiple choice Which rule of inference is this? “If the password is correct, access is granted. Access was not granted. Therefore, the password was not correct.”
A Modus ponens B Modus tollens C Disjunctive syllogism D Hypothetical syllogism
Check answer
Show answer Answer: B. Modus tollens
The premises are p → q p \to q p → q and ¬ q \neg q ¬ q , and the conclusion is ¬ p \neg p ¬ p : modus tollens. Modus ponens is tempting, but it needs p p p as a premise and concludes q q q .
Question 2 · multiple choice Which argument form is a fallacy (not valid)?
Check answer
Show answer Answer: D. p → q p \to q p → q , q q q ∴ p p p
With p p p = F and q q q = T both premises are true but the conclusion is false (affirming the conclusion). Options 1–3 are modus ponens and the two syllogisms, which are valid.
Question 3 · multiple choice “Either the bug is in the frontend or in the backend. It is not in the frontend.” What follows by disjunctive syllogism?
A The bug is in the backend. B The bug is in both. C The bug is in neither. D Nothing follows.
Check answer
Show answer Answer: A. The bug is in the backend.
p ∨ q p \lor q p ∨ q and ¬ p \neg p ¬ p give q q q . Option 4 is tempting if you forget the rule, but this form is valid.
Question 4 · multiple choice Check Your Progress E3: is [ ( p → q ∨ ¬ r ) ∧ ( q → p ) ] ⇒ ( p → r ) [(p \to q \lor \neg r) \land (q \to p)] \Rightarrow (p \to r) [( p → q ∨ ¬ r ) ∧ ( q → p )] ⇒ ( p → r ) correct?
Check answer
Show answer Answer: C. No; for p p p = T, q q q = T, r r r = F the premises are true and the conclusion is false
In row p p p = T, q q q = T, r r r = F: q ∨ ¬ r q \lor \neg r q ∨ ¬ r = T so p → ( q ∨ ¬ r ) p \to (q \lor \neg r) p → ( q ∨ ¬ r ) = T; q → p q \to p q → p = T; but p → r p \to r p → r = F. Option 4 is wrong: with p p p = F, p → r p \to r p → r is T.
Question 5 · multiple choice From the premises a → b a \to b a → b and b → c b \to c b → c , which conclusion is valid?
Check answer
Show answer Answer: C. a → c a \to c a → c
This is the hypothetical syllogism. Option 4 is tempting, but it is the inverse of a → c a \to c a → c , which is not equivalent to it.
Question 6 · short answer
Use a truth table to show that modus tollens, [ ( p → q ) ∧ ¬ q ] ⇒ ¬ p [(p \to q) \land \neg q] \Rightarrow \neg p [( p → q ) ∧ ¬ q ] ⇒ ¬ p , is valid.
Show worked answer Rows ( p , q ) (p, q) ( p , q ) = (T, T), (T, F), (F, T), (F, F). p → q p \to q p → q : T, F, T, T. ¬ q \neg q ¬ q : F, T, F, T. Both premises are true only in row 4 (p p p = F, q q q = F). In that row ¬ p \neg p ¬ p = T. The conclusion is true in the only critical row, so the argument is valid.