Proofs
Valid Arguments and Inference Rules
In Lesson 1, we built a proof system for propositional equivalences: given axioms such as De Morgan’s Laws and the Conditional axiom, we showed that two expressions can be rewritten as one another through a chain of equivalence steps. But equivalence proofs are symmetric. They establish that , meaning and carry identical truth values under every assignment. Much of mathematics proceeds asymmetrically. We know certain facts and wish to derive new ones, in one direction only. If is known and is true, we may conclude , but not the reverse. The tools for this one-way reasoning are called inference rules, and a proof is a structured chain of such inferences leading from premises to a conclusion.
Arguments and Validity
An argument in propositional logic is a finite sequence of propositions . The propositions are the premises and is the conclusion. The argument is valid if the truth of all premises guarantees the truth of the conclusion:
An argument that is not valid is invalid.
We write a valid argument with the premises above a horizontal line and the conclusion below:
An inference rule is an argument form that remains valid regardless of which particular propositions are substituted for its variables. Just as the axioms of Lesson 1 gave us equivalences that hold universally, inference rules give us one-directional deductions that hold universally.
The notation (read ” entail ”) means that can be derived from the premises using axioms, inference rules, and previously established theorems. When no premises are needed, we write , meaning is derivable from the axioms alone.
Why not simply check validity by truth table? If an argument involves distinct propositional variables, the truth table has rows. An argument with twenty premises could demand over a million rows. Inference rules allow us to verify validity in a handful of steps, regardless of the number of variables.
Modus Ponens
The cornerstone of deductive reasoning is Modus Ponens (from the Latin modus ponendo ponens, “the method of affirming by affirming”):
If we know and , we may conclude . Its validity rests on the tautology
To see why this is a tautology, suppose both and are true. By the truth table of the conditional (Lesson 1), the only circumstance under which is true and is true is when is also true. Hence must hold.
In Lesson 3, we established the universal statement “every prime greater than is odd.” Let denote “7 is prime and greater than 2” and denote “7 is odd.” The universal claim gives , and we can verify directly (7 is prime, and ). Modus Ponens yields : the integer 7 is odd.
Problem 56
Let denote “it is snowing” and denote “the lecture is cancelled.” Suppose we know and . State the conclusion and identify the inference rule. Now suppose instead we know and . Can we conclude ? Justify your answer using the truth table of the conditional.
Modus Tollens
For any propositions and ,
Assume and . By the Contrapositive equivalence (Lesson 1), . Since is true, Modus Ponens applied to and yields .
■The Latin name modus tollendo tollens (“the method of denying by denying”) captures the reasoning: if the consequence of an implication fails, its premise must also fail.
If is even, then is even. We observe that is not even (). By Modus Tollens, 7 is not even.
Hypothetical Syllogism
For any propositions , , ,
Assume and . We wish to show . Assume . From and , Modus Ponens gives . From and , a second application of Modus Ponens gives . Since assuming led to , we conclude .
■This inference is also called the chain rule or the transitivity of implication. Every multi-step mathematical deduction is, at its core, a sequence of hypothetical syllogisms. For instance, suppose we know “if is divisible by , then is even” and “if is even, then is even.” Hypothetical Syllogism yields: “if is divisible by , then is even.”
Implication Elimination
For any propositions and , .
Assume . We must show . Assume . From and , Modus Ponens yields . Thus .
■This gives one direction of the link between a conditional and a derivation: if is known, then from the assumption one may derive . The reverse direction will appear later in Direct Proof, where we show that if assuming leads to , then the conditional is established. Together, the two directions show how the turnstile and the conditional correspond: if and only if .
Further Propositional Inference Rules
Several additional inference rules arise from tautologies. Each is stated with its justifying tautology.
Conjunction. From two established truths, their conjunction follows.
The tautological justification is immediate, but Conjunction can also be derived from Modus Ponens alone via reductio.
Assume and . Suppose for contradiction that . By De Morgan’s Law (Theorem 6, Lesson 1), . By the Conditional axiom (Lesson 1), . Since holds, Modus Ponens yields . But is assumed, a contradiction. Therefore .
■Simplification. From a conjunction, either conjunct may be extracted.
Addition. A known truth may be weakened to a disjunction.
Disjunctive Syllogism. If one disjunct is eliminated, the other must hold.
Resolution. Two clauses sharing a complementary literal may be combined, eliminating the shared variable.
Constructive Dilemma. Two conditionals with a disjunction of their antecedents yield the disjunction of their consequents.
Notice the relationships among these rules. Disjunctive Syllogism is a special case of Resolution (set and apply the Identity axiom). Addition is dual to Conjunction, and Simplification is a special case of Modus Ponens (since is a tautology).
Resolution is remarkably powerful. It can recover Hypothetical Syllogism: rewrite as and as (by the Conditional axiom, Lesson 1), then a single resolution step on yields , which is . It can also recover Modus Ponens: express as and as , and resolution gives by the Identity axiom. This universality makes Resolution the basis of automated theorem proving in computer science.
The following table collects the propositional inference rules for reference.
Problem 57
Identify the inference rule applied in each step of the following argument. Premises: (i) , (ii) , (iii) .
- From (ii) and (iii), conclude .
- From (i) and step 1, conclude .
Building Complex Arguments
The power of inference rules lies in chaining them. A valid argument is a sequence of steps in which each step is either a premise or follows from earlier steps by a single inference rule.
We show the following argument is valid. Premises: (1) , (2) . Conclusion: .
Problem 58
Show that the following argument is valid by listing each step and the inference rule used. Premises: (1) , (2) , (3) , (4) . Conclusion: .
Hint. Apply Hypothetical Syllogism, then Modus Ponens, then Simplification, then Disjunctive Syllogism.
Inference Rules for Quantified Statements
The rules above govern propositional logic. When predicates and quantifiers enter the picture, additional rules are needed to bridge the gap between universal or existential claims and their specific instances.
Universal Instantiation (UI). If a predicate holds for every element of the universe, it holds for any particular element :
Universal Generalisation (UG). If can be established for an arbitrary element (one about which no special assumptions are made), then follows:
The word “arbitrary” is critical. If the proof of exploits any property peculiar to , the generalisation is invalid.
Existential Instantiation (EI). If at least one element satisfies , we may introduce a name for such an element:
The name must be fresh: not previously used in the argument.
Existential Generalisation (EG). If a particular element satisfies , then at least one element does:
Universal Modus Ponens (UMP). Combining Universal Instantiation with Modus Ponens yields perhaps the most frequently used quantifier rule in practice:
Suppose we know (the universe is ) and that . Universal Modus Ponens yields .
Problem 59
Identify the quantifier inference rule used in each step. The universe is the positive integers.
- “Every multiple of is a multiple of .” (Premise)
- ”, so is a multiple of .” (Premise)
- “Therefore, is a multiple of .”
- “Therefore, there exists a positive integer that is a multiple of .”
We show that “a student in this class has not read the book” and “every student in this class passed the first exam” together imply “someone who passed the first exam has not read the book.”
Let denote ” is in this class,” denote ” has read the book,” and denote ” passed the exam.” The premises are and . We derive .
Fallacies
A fallacy is an argument form that appears valid but is not: the premises do not logically guarantee the conclusion, even though the reasoning may seem persuasive.
Two fallacies are especially common. Both arise from misapplying the conditional.
Affirming the Consequent. The argument ”; ; therefore ” is invalid. A counterexample: let and . Then is and is , but is .
Denying the Antecedent. The argument ”; ; therefore ” is equally invalid. With and , both premises are satisfied but is .
Both fallacies confuse an implication with its converse or its inverse (Lesson 1): does not entail , nor does it entail .
“If it rained, the pitch is wet. The pitch is wet. Therefore it rained.” This affirms the consequent. The pitch might be wet because the sprinklers were on. The converse “if the pitch is wet, then it rained” does not follow from the original implication.
Problem 60
Identify the fallacy in each argument and provide a counterexample (an assignment under which the premises are true but the conclusion is false).
(a) “If is divisible by , then is divisible by . The integer is divisible by . Therefore is divisible by .”
(b) “If is prime, then . The integer is not prime. Therefore .”
Proof Techniques
With inference rules in hand, we turn to the practical matter of constructing proofs. A proof is a finite sequence of statements, each of which is an axiom, a premise, or a consequence of earlier statements by an inference rule. The form of the theorem often dictates the most effective strategy.
The building blocks of mathematical exposition have standard names. A theorem is a statement that can be shown to be true using definitions, axioms, other theorems, and rules of inference. An axiom is a statement accepted as true without proof (we met several in Lesson 1). A lemma is a “helping theorem,” proved in order to simplify the proof of a more substantial result. A corollary is a consequence that follows directly from a theorem. The term proposition is used for results considered less central than theorems. A conjecture is a statement proposed as true but not yet proved; Fermat’s Last Theorem was conjectured around 1637 and proved by Wiles in 1995, while Euler’s conjecture (an attempted generalisation) was conjectured in 1769 and disproved by counterexample in 1966.
The most common proof strategies for a conditional are collected below. Each is developed in its own subsection.
The last two strategies are called indirect proofs, since they establish the conditional without directly constructing a chain from to .
Direct Proof
A direct proof of a conditional statement proceeds by assuming and deriving through a sequence of valid inferences. The assumption of is not asserted as fact; it is a hypothesis under which the argument operates.
This strategy reflects the Deduction Rule, a meta-logical principle: if assuming allows us to derive using valid inferences, then the conditional is established. In a sense, the Deduction Rule is the bridge between the turnstile () and the conditional (): the statement (a syntactic derivation) becomes (a logical truth).
If and are rational numbers, then is rational.
Assume and are rational. By Definition 27 (Lesson 2), there exist integers with and such that and . Then
Since and are integers and , the fraction satisfies Definition 27. Therefore .
■If and are odd integers, then is odd.
Assume and are odd. Since is not even, the Division Theorem (Theorem 9, Lesson 2) gives for some integer . Likewise, for some integer . Then
Since is an integer, leaves a remainder of when divided by , so is not divisible by . By Definition 38 (Lesson 2), is odd.
■Problem 61
Prove directly that the product of a rational number and an integer is rational.
Problem 62
Prove directly that for all integers and , if , then .
Hint. By Definition 37 (Lesson 2), means for some integer .
Proof by Cases
When no single line of reasoning covers every possibility, it can be effective to partition the argument into exhaustive cases. If every case leads to the same conclusion, the conclusion holds unconditionally. This strategy corresponds to the disjunction elimination rule: if is known and each implies , then follows.
For every integer , the remainder when is divided by is either or .
By the Division Theorem (Theorem 9, Lesson 2), every integer satisfies exactly one of , , or for some integer .
Case 1. . Then , so has remainder .
Case 2. . Then , so has remainder .
Case 3. . Then , so has remainder .
In all cases, the remainder is or .
■Problem 63
Prove that for every integer , the remainder when is divided by is one of , , or .
In a proof by cases, it sometimes happens that two cases are identical up to a relabelling of variables. We then handle one case and dismiss the other with the phrase “without loss of generality” (abbreviated WLOG). For instance, to prove by contrapositive that “if and both and are even, then and are both even,” we must show that if or is odd then or is odd. Since the hypotheses are symmetric in and , we may assume WLOG that is odd; the remaining case follows by swapping and .
Proof by Contradiction
A proof by contradiction (Latin: reductio ad absurdum) establishes a proposition by assuming and deriving a contradiction, that is, a statement of the form for some proposition . Since a sound proof system cannot derive a false conclusion from true premises, the assumption must be false, so is true.
This technique is especially effective when the desired conclusion is a negation (” is not rational”) or when a direct approach offers no obvious path forward.
Let be a rational number and an irrational number. Then is irrational.
Suppose for contradiction that is rational. By Definition 27 (Lesson 2), there exist integers with and such that and . Then
Since and are integers with , is rational. This contradicts the hypothesis that is irrational. Therefore is irrational.
■In Lesson 2, the interaction between rational and irrational numbers was discussed informally. The result above gives a precise instance: a rational shift can never send an irrational number to a rational one.
Problem 64
Let . Prove by contradiction that if is irrational, then and are both irrational.
There is no least positive real number. That is, there is no positive real number such that for every positive real number .
Suppose for contradiction that a least positive real number exists: and for every positive real number . Consider . Since , we have , so is a positive real number. But , contradicting for all positive .
■If is an integer and is even, then is even.
We prove the logically equivalent contrapositive: if is odd, then is odd. Assume is odd. Since is not even, the Division Theorem (Theorem 9, Lesson 2) gives for some integer . Then
Since is an integer, leaves remainder when divided by , so is odd. The contrapositive is logically equivalent to the original statement (Lesson 1).
■If is an integer and is odd, then is odd.
We prove the contrapositive: if is even, then is even. Suppose for some integer . Then
Since , is even. The contrapositive is equivalent to the original statement.
■The preceding proofs used the contrapositive rather than a direct contradiction. The distinction is worth noting. A proof by contradiction assumes the negation of the entire statement and derives an absurdity. A contrapositive proof assumes the negation of the conclusion and derives the negation of the hypothesis, which is simply a direct proof of the equivalent contrapositive. In practice, mathematicians often label both “proof by contradiction,” but the contrapositive route is frequently cleaner when hypothesis and conclusion are both conditionals.
The proof of the irrationality of is the most celebrated “genuine” contradiction: the assumption leads to a statement that contradicts itself, rather than merely establishing a contrapositive. This fulfils the promise made in Lesson 2, where the irrationality of was stated and its proof deferred.
is irrational.
Suppose for contradiction that is rational. By Definition 27 (Lesson 2), there exist integers and with such that , where and share no common factor. Squaring gives , so is even. By Example 52 above (even square implies even root), is even, say . Then , so , and is even. By the same result, is even. But then and are both divisible by , contradicting the assumption that they share no common factor.
■If more than objects are distributed among containers, then at least one container holds two or more objects.
Suppose for contradiction that every container holds at most one object. Then the total number of objects is at most , contradicting the hypothesis that there are more than .
■Problem 65
Prove by contradiction that there is no integer such that is odd.
Hint. Factor: . Consider the parity of and .
Biconditional Proofs
A biconditional is, by definition (Lesson 1), the conjunction . To prove it, one must establish both directions: the forward implication and its converse. In practice, the two parts are labelled () and ().
An integer is odd if and only if for some integer .
() Suppose is odd. By Definition 38 (Lesson 2), is not even, so . The Division Theorem (Theorem 9) gives unique integers and with and . Since and would give , contradicting our assumption, we have . Hence .
() Suppose for some integer . Then has remainder when divided by . By the Division Theorem, the remainder is unique, so for any integer . Hence , and by Definition 38, is odd.
■A common error is to prove one direction of a biconditional and assume the other follows. Consider the equation . Squaring both sides and simplifying produces as the sole candidate. However, squaring can introduce extraneous solutions, so we must substitute back: . Here the candidate is genuine. Contrast this with : squaring leads to candidates and , but , so only is a true solution.
Problem 66
Prove that an integer is even if and only if is odd.
Let . A complex number is a root of the polynomial if and only if
This was stated without proof in Lesson 2. We now prove it as a biconditional.
() Suppose . By the completing the square identity (Lesson 2),
Since square roots of all complex numbers exist (Lesson 2),
Subtracting gives the two stated values.
() Direct substitution of either value into and expanding yields .
■A natural number is divisible by if and only if the number formed by its last three base- digits is divisible by .
Let be the base- expansion of (Definition 32, Lesson 2). Write for the number formed by the last three digits, and . Then
Since , we have .
() Suppose . Then is the difference of two multiples of , so .
() Suppose . Then is the sum of two multiples of , so .
■Problem 67
Prove that a natural number is divisible by if and only if the sum of its base- digits is divisible by .
Hint. By the Division Theorem (Theorem 9, Lesson 2), , so leaves remainder when divided by for every .
Problem 68
Let with , and let be the distinct roots of . Prove that there exists a real number such that or .
Hint. Apply the quadratic formula and consider the cases and separately.
The Law of Excluded Middle
For any proposition , is a tautology.
By the Complement axiom (Lesson 1), . By the Commutativity axiom (Lesson 1), . Therefore .
■The Law of Excluded Middle (LEM) asserts that every proposition is either true or false; no third possibility exists. In proofs, LEM allows us to split into the exhaustive cases and even without knowing which actually holds. This is sometimes called non-constructive reasoning: the conclusion is established without determining which case obtains.
Let . If is even, then is even or is even (or both).
Suppose is even. By LEM, either is even or is odd.
Case 1. If is even, the conclusion holds immediately.
Case 2. Suppose is odd. If were also odd, then by Example 48 (product of two odd integers), would be odd. But is even, a contradiction. Therefore is even.
In both cases, at least one of or is even.
■Problem 69
Using the Law of Excluded Middle, prove that for all integers , is even.
Hint. By LEM, either is even or is odd. In each case, exhibit a factor of in .
Problem 70
Reflect on the proof of the preceding example (Even Product). Where was the Law of Excluded Middle used? Where was proof by contradiction used? What was the contradiction? Prove the same result twice more: once using contradiction without LEM, and once using LEM without contradiction.
Problem 71
Let and be irrational numbers. By considering the number , prove that it is possible for to be rational.
Hint. By LEM, either is rational or it is irrational. In each case, exhibit irrational numbers such that is rational. For the second case, examine .
Ex Falso Quodlibet
The principle ex falso sequitur quodlibet (“from falsity follows whatever you like”) states that from a contradiction, any proposition may be derived:
Its validity rests on the tautology : since is identically false, the conditional holds for every by vacuous truth.
Suppose we accept the false premise . Adding to both sides gives , a false consequence. Squaring both sides gives , a true consequence. From a single contradiction, both true and false statements follow. Once a contradiction enters, the proof system can no longer distinguish truth from falsehood, and every proposition becomes derivable.
We rarely invoke Ex Falso directly, but it is the logical foundation of proof by contradiction: if assuming produces a contradiction with our true premises, then cannot coexist with those premises, and must hold.
Proving Quantified Statements
The proof techniques developed above apply equally when the statement involves quantifiers. Two patterns arise directly from the quantifier rules (Universal Generalisation and Existential Generalisation).
Universally quantified goals. To prove , fix an arbitrary element , assuming nothing about beyond membership in , and prove . Universal Generalisation then yields the universal claim. Every direct proof, proof by cases, or proof by contradiction of a “for all” statement opens by fixing such an element: “let be an integer”, “fix ”, and so on. All the proofs in the preceding subsections follow this pattern.
Consider the statement . The following is not a valid proof: “Let be an arbitrary integer, say . Then .” The writer has chosen a specific value, not an arbitrary one. This argument proves , not the universal claim. A correct proof proceeds without naming : “Let . If , then since the product of two non-negative numbers is non-negative. If , then since the product of two negative numbers is positive.”
The base- expansion of the square of every natural number ends in one of the digits , or .
Fix and let be its base- expansion (Definition 32, Lesson 2). Write where . Then
The final digit of is therefore the final digit of . Since , we compute:
The final digits are , all belonging to .
■Problem 72
Prove that for all real numbers and , if is irrational, then and are not both rational.
Hint. Suppose for contradiction that both are rational, and compute their sum.
Problem 73
Prove that every integer is rational.
Problem 74
Prove that every linear polynomial over has a rational root.
Hint. A linear polynomial over has the form where and .
Problem 75
Prove that for all , if then there exists with .
Hint. Consider .
Existentially quantified goals. To prove , exhibit a specific element and verify . Existential Generalisation then yields the existential claim. This is called a constructive existence proof: the witness is explicitly produced.
Fix . The cubic polynomial has a real root.
Define . Then
Since , the polynomial has a real root.
■There is a natural number that is simultaneously a perfect square and one more than a perfect cube.
Take . Then and , so is a perfect square and one more than a perfect cube.
■There exists a positive integer expressible as a sum of two cubes in two distinct ways.
Take . Then . (This is the Hardy–Ramanujan number, after a celebrated anecdote between G. H. Hardy and S. Ramanujan.)
■In a non-constructive existence proof, we establish that a witness must exist without identifying it. The exercise earlier is an example: LEM guarantees that one of two candidates works, but the proof does not determine which.
Disproving universal claims. To show is false, it suffices to exhibit a single counterexample: an element with . This is an existence proof of .
The claim “every positive integer is the sum of two perfect squares” is false. The integer is a counterexample: the only sums of two squares not exceeding are , , , and , none of which equal .
Problem 76
Disprove the claim: for every integer , is prime.
Problem 77
Prove that there is an integer that is divisible by zero.
Hint. Recall Definition 37 (Lesson 2): means for some integer .
Uniqueness. To prove (the unique existential quantifier, Lesson 3), first establish existence by producing a witness with , then establish uniqueness by assuming and and deducing .
Every positive real number has a unique positive square root.
Fix .
Existence. The number is positive and satisfies .
Uniqueness. Suppose with and . Then , so . If , then , contradicting . Therefore , i.e., .
■Problem 78
Let . Prove that if is divisible by , then is divisible by .
Hint. Expand and use the hypothesis .
Problem 79
(a) Prove that there is a real number which is irrational but whose square is rational.
(b) Prove that for each real number , the equation has exactly one real solution.
Problem 80
Prove that there is a unique natural number with exactly one positive divisor.
A chain of equalities is only as strong as its weakest step. Consider the “proof” that :
The error is in the third step: the law requires . Similarly, squaring both sides of an equation can introduce extraneous solutions (as noted in the biconditional remark above). Each step in a proof must be a valid inference, not merely a plausible manipulation.
Quantifiers can also conceal errors. The formula is a propositional tautology (verify this by truth table). Substituting predicates = ” is odd” and = ” is prime,” one might reason: “for every , either oddness implies primality or primality implies oddness.” Yet neither nor is true. The resolution is that is not the same as . The universal quantifier does not distribute over disjunction. The first formula is indeed true (for each fixed , one of the two conditionals holds), but the second is false.
It is possible to build a far more economical proof system than the one developed in these notes. Hilbert and Frege showed that all of propositional logic can be axiomatised using only two connectives ( and ), three axiom schemas, and Modus Ponens as the sole rule of inference. The price of such minimalism is longer proofs: what we accomplish in a few lines may require many more steps in a Hilbert system.
Natural Deduction
An alternative framework, called natural deduction (developed independently by Gentzen and Jaśkowski in the 1930s), organises inference rules into introduction rules (which establish a connective) and elimination rules (which extract information from it). The Conjunction rule is the introduction rule for (I), and the two Simplification rules are its elimination rules (E, E). Addition is I, and Modus Ponens is E. Both our current system and natural deduction are sound and complete for propositional logic.
In this framework, rules are combined into proof trees. Each leaf is an assumption, and each internal node applies an introduction or elimination rule. For instance, the tree
shows how to prove : first combine and by I to obtain , then combine that result with by a second application of I.
We derive from the premises , , and .
Reading from the leaves: and yield by E (Modus Ponens); then and yield by a second E; finally, and are combined by I.
Problem 81
Write a proof tree whose conclusion is . Then express “2 is an even prime and 3 is an odd prime” in the form for appropriate propositions , and describe what your proof tree says about proving the statement.