A proof is a chain of statements, each of which follows from earlier ones by a valid rule. Rules of inference are these valid steps.

Arguments and Validity

An argument is a list of statements called premises, followed by a conclusion. It is valid if the conclusion must be true whenever all the premises are true, that is, if (p1 ∧ p2 ∧ … ∧ pn) → q is a tautology. Validity depends on the form of the argument, not on whether the premises are actually true. An argument with a false premise may be valid, and an argument with true premises may be invalid.

Definition: Rule of inference. A valid argument form that allows a conclusion to be drawn from given premises, used as a step in a proof.

Main Rules of Inference

Modus ponens: from p and p → q, infer q. Modus tollens: from ¬q and p → q, infer ¬p. Hypothetical syllogism: from p → q and q → r, infer p → r. Disjunctive syllogism: from p ∨ q and ¬p, infer q. Addition: from p, infer p ∨ q. Simplification: from p ∧ q, infer p. Conjunction: from p and q, infer p ∧ q. Resolution: from p ∨ q and ¬p ∨ r, infer q ∨ r. Each rule can be checked with a truth table.

Fallacies

Some argument forms look valid but are not. Affirming the conclusion: from q and p → q, infer p. This is wrong, since q can be true for another reason. Denying the hypothesis: from ¬p and p → q, infer ¬q. This is also wrong. Recognising these fallacies is as important as using the valid rules.

Building a Proof

To prove a conclusion from premises, write the premises, then apply rules one step at a time, giving the reason for each step, until the conclusion is reached. This step-by-step form is used in mathematics, in program verification and in automated reasoning.

Table 1.4: Rules of inference

Rule Premises Conclusion
Modus ponens p, p → q q
Modus tollens ¬q, p → q ¬p
Hypothetical syllogism p → q, q → r p → r
Disjunctive syllogism p ∨ q, ¬p q
Resolution p ∨ q, ¬p ∨ r q ∨ r

Example 1.4: A proof by rules of inference

Problem: Premises: "If it rains, the match is cancelled" (r → c). "If the match is cancelled, we stay home" (c → h). "We did not stay home" (¬h). Prove "It did not rain" (¬r).

Solution:

  1. r → c (premise)
  2. c → h (premise)
  3. r → h (hypothetical syllogism, from 1 and 2)
  4. ¬h (premise)
  5. ¬r (modus tollens, from 3 and 4)

Result: It did not rain.

from itertools import product
valid = all(not ((not r or c) and (not c or h) and not h) or (not r)
            for r, c, h in product([True, False], repeat=3))
print("argument valid:", valid)

Output

argument valid: True

Common mistakes

  • Affirming the conclusion: inferring p from q and p → q.
  • Denying the hypothesis: inferring ¬q from ¬p and p → q.
  • Skipping steps or not giving the rule used at each step.

Key takeaways

  • An argument is valid if true premises force a true conclusion.
  • Modus ponens: p, p → q gives q. Modus tollens: ¬q, p → q gives ¬p.
  • Hypothetical syllogism chains two conditionals.
  • Affirming the conclusion and denying the hypothesis are fallacies.

Practice questions

  1. State modus tollens.
  2. When is an argument valid?
  3. What is the fallacy of affirming the conclusion?

Answers to the practice questions

  1. From ¬q and p → q, infer ¬p.
  2. When the conclusion is true in every case in which all the premises are true.
  3. Inferring p from q and p → q.

Sources

  • Official BCA syllabus Mathematics Foundations to Computer Science II, course code 25BCA402DS01, Unit I