MATH 213 - Introduction, Chapter 1, and Additional Logic ... · Suppose there is an island...
Transcript of MATH 213 - Introduction, Chapter 1, and Additional Logic ... · Suppose there is an island...
Chapter 1 - Foundations
MATH 213Introduction, Chapter 1, and Additional Logic Material
Dr. Eric Bancroft
Fall 2013
Dr. Eric Bancroft MATH 213 Fall 2013 1 / 88
Chapter 1 - Foundations
Chapter 1 - FoundationsIntroduction1.1 - Propositional Logic1.2 - Applications of Propositional Logic1.3 - Propositional Equivalences1.4 - Predicates and Quantifiers1.5 - Nested Quantifiers1.6 - Rules of Inference1.7 - Introduction to Proofs1.8 - Proof Methods and Strategy
Dr. Eric Bancroft MATH 213 Fall 2013 2 / 88
Chapter 1 - Foundations Introduction
Suppose that:
1. Babies are illogical.
2. Nobody is despised who can manage a crocodile.
3. Illogical persons are despised.
What conclusion may be reached using all of these premises?1
Which is better, eternal happiness or a ham sandwich? Itwould appear that eternal happiness is better, but this is reallynot so! After all, nothing is better than eternal happiness, anda ham sandwich is certainly better than nothing. Therefore aham sandwich is better than eternal happiness.2
1Taken from Lewis Carroll2Raymond Smullyan
Dr. Eric Bancroft MATH 213 Fall 2013 3 / 88
Chapter 1 - Foundations Introduction
And one of my favorite Lewis Carroll quotes:
. . . “Seven years and six months!” Humpty Dumpty repeatedthoughtfully. “An uncomfortable sort of age. Now if you’dasked my advice, I’d have said ‘Leave off at seven’ but it’s toolate now.”“I never ask advice about growing,” Alice said indignantly.“Too proud?” the other enquired.Alice felt even more indignant at this suggestion. “I mean,”she said, “that one can’t help growing older.”“One can’t, perhaps,” said Humpty Dumpty; “but two can.With proper assistance, you might have left off at seven.”
Dr. Eric Bancroft MATH 213 Fall 2013 4 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Definitions and Notation
I Logic
I Proposition
I Notation
I Negation
Dr. Eric Bancroft MATH 213 Fall 2013 5 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Truth Tables
p q ¬p ¬q
Dr. Eric Bancroft MATH 213 Fall 2013 6 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Conjunction and Disjunction
Conjunction of p and q:
p q p ∧ q
T T
T F
F T
F F
Disjunction of p and q:
p q p ∨ q
T T
T F
F T
F F
Dr. Eric Bancroft MATH 213 Fall 2013 7 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Other Definitions
I Exclusive Or (notation: ⊕)
I Implication / Conditional (notation: → or =⇒ )
I Biconditional (notation: ↔ or ⇐⇒ )
Dr. Eric Bancroft MATH 213 Fall 2013 8 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Example
p q p⊕ q p→ q p↔ q
T T
T F
F T
F F
Dr. Eric Bancroft MATH 213 Fall 2013 9 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Other Operations on Implications
I Converse
I Contrapositive
I Inverse
Dr. Eric Bancroft MATH 213 Fall 2013 10 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Precedence
Operator Precedence
() 0
¬ 1
∧ 2
∨ 3
→ 4
↔ 5
We will follow the book’s convention and [almost] always useparentheses to group operators in order to avoid confusion. Oneexception to this is when negating a proposition, e.g., ¬p ∧ q isequivalent to (¬p) ∧ q, as opposed to ¬(p ∧ q)
Dr. Eric Bancroft MATH 213 Fall 2013 11 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Compound Propositions in Truth Tables
Example
p q ¬p p→ q ¬p ∧ q (p→ q) ∨ (¬p ∧ q)
T T
T F
F T
F F
Dr. Eric Bancroft MATH 213 Fall 2013 12 / 88
Chapter 1 - Foundations 1.1 - Propositional Logic
Logic and Bit Operators
Dr. Eric Bancroft MATH 213 Fall 2013 13 / 88
Chapter 1 - Foundations 1.2 - Applications of Propositional Logic
Example
Suppose that:
1. Babies are illogical.
2. Nobody is despised who can manage a crocodile.
3. Illogical persons are despised.
What conclusion may be reached using all of these premises?
Dr. Eric Bancroft MATH 213 Fall 2013 14 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Definitions
I Compound Proposition
I Tautology
I Contradiction
I Contingency
Dr. Eric Bancroft MATH 213 Fall 2013 15 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Logical Equivalence
Definition
Notation: ≡
Dr. Eric Bancroft MATH 213 Fall 2013 16 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Truth tables can be used to show that compound propositions arelogically equivalent.
Example
Show that p ≡ p ∨ (p ∧ q):
p q p ∧ q p ∨ (p ∧ q)
T T
T F
F T
F F
Dr. Eric Bancroft MATH 213 Fall 2013 17 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
A Larger Example. . .
Show that (p→ q) ∧ (p→ r) ≡ p→ (q ∧ r):
p q r p→ q p→ r (p→ q) ∧ (p→ r) q ∧ r p→ (q ∧ r)
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Dr. Eric Bancroft MATH 213 Fall 2013 18 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Table of Logical Equivalences I
(The abbreviations are not universal, but you may use them in yourhomework or on tests if you wish.)
Equivalence Name Abbr.
p ∧ T ≡ p Identity / Idempotent(Conjunction)
IdC
p ∨ F ≡ p Identity / Idempotent(Disjunction)
IdD
p ∧ F ≡ F Domination (Conjunction) DomC
p ∨ T ≡ T Domination (Disjunction) DomD
¬(¬p) ≡ p Double Negation DN
p ∧ q ≡ q ∧ p Commutative (Conjunction) CC
Dr. Eric Bancroft MATH 213 Fall 2013 19 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Table of Logical Equivalences II
p ∨ q ≡ q ∨ p Commutative (Disjunction) CD
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r) Associative (Conjunction) AC
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r) Associative (Disjunction) AD
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) Distributive (Conjunction) DC
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) Distributive (Disjunction) DD
¬(p ∧ q) ≡ ¬p ∨ ¬q DeMorgan’s Law(Conjunction)
DMC
¬(p ∨ q) ≡ ¬p ∧ ¬q DeMorgan’s Law(Disjunction)
DMD
p ∧ (p ∨ q) ≡ p Absorption (Conjunction) AbC
p ∨ (p ∧ q) ≡ p Absorption (Disjunction) AbD
Dr. Eric Bancroft MATH 213 Fall 2013 20 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Table of Logical Equivalences III
p ∧ ¬p ≡ F Negation (Conjunction)
p ∨ ¬p ≡ T Negation (Disjunction)
Dr. Eric Bancroft MATH 213 Fall 2013 21 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Logical Equivalences Involving Implications
Equivalence Name Abbr
¬(p→ q) ≡ p ∧ ¬q Negation of Implication NI
p→ q ≡ ¬p ∨ q Implication to Disjunction ID
p→ q ≡ ¬q → ¬p Contrapositive C
p ∨ q ≡ ¬p→ q
p ∧ q ≡ ¬(p→ ¬q)
(p→ q) ∧ (p→ r) ≡ p→ (q ∧ r)
(p→ r) ∧ (q → r) ≡ (p ∨ q)→ r
(p→ q) ∨ (p→ r) ≡ p→ (q ∨ r)
(p→ r) ∨ (q → r) ≡ (p ∧ q)→ r
Dr. Eric Bancroft MATH 213 Fall 2013 22 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Logical Equivalences Involving Biconditionals
Equivalence Name Abbr.
¬(p↔ q) ≡ ¬p↔ q Negation of Biconditional NB
¬(p↔ q) ≡ p↔ ¬q Negation of Biconditional(alternative)
NB
p↔ q ≡ (p→ q) ∧ (q → p) Biconditional B
p↔ q ≡ ¬p↔ ¬qp↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
Dr. Eric Bancroft MATH 213 Fall 2013 23 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Additional Tautologies I
(Remember, ‘tautology’ these will always be true for any values of p, q,r, and s.)
Tautology Name Abbr.
p ∨ ¬p Excluded Middle EM
(p ∧ q)→ p Simplification S
p→ (p ∨ q) Addition A
[p ∧ (p→ q)]→ q Modus Ponens MP
[(p→ q) ∧ (q → r)]→ (p→ r) Hypothetical Syllogism HS
[(p ∨ q) ∧ ¬q]→ p Disjunctive Syllogism DS
[¬q ∧ (p→ q)]→ ¬p Modus Tollens MT
Dr. Eric Bancroft MATH 213 Fall 2013 24 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Additional Tautologies II
[(p ∨ r) ∧ [(p→ q) ∧ (r → s)]]→ (q ∨ s)
Constructive Dilemma CDL
[(¬q ∨ ¬s) ∧ [(p→ q) ∧ (r → s)]]→ (¬p ∨ ¬r)
Destructive Dilemma DDL
(p ∨ p)→ p Idempotent IM
Dr. Eric Bancroft MATH 213 Fall 2013 25 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
De Morgan’s Laws
Example
Suppose there is an island populated solely by knights and knaves, andthat knights always tell the truth but knaves always lie. While on thisisland, we encounter two people, A and B. A says “I am a knave or Bis a knight”, while B says nothing. Determine, if possible, what A andB are.
Dr. Eric Bancroft MATH 213 Fall 2013 26 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Arguments Using Logical Equivalence
Example
Prove that ¬(p→ q)→ ¬q is a tautology.
Dr. Eric Bancroft MATH 213 Fall 2013 27 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Example
Use equivalences from the tables to prove that (p→ q) ∧ (p→ r) andp→ (q ∧ r) are logically equivalent.
Dr. Eric Bancroft MATH 213 Fall 2013 28 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Practicality of Using Tables
How many rows does a truth table need for a compound propositioncontaining 2 variables? 3 variables? 5 variable? 100 variables? ingeneral?
Dr. Eric Bancroft MATH 213 Fall 2013 29 / 88
Chapter 1 - Foundations 1.3 - Propositional Equivalences
Propositional Satisfiability
Definition
Dr. Eric Bancroft MATH 213 Fall 2013 30 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Introduciton
Is “x > 3” a proposition?
Predicates (or ‘Propositional Functions’)
Dr. Eric Bancroft MATH 213 Fall 2013 31 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Note that if x has no meaning, then P (x) is just a form.
DefinitionThe domain of discourse (or the universe of discourse or simplydomain) of x is . . .
There are two ways to give meaning to a predicate P (x):
1.
2.
Dr. Eric Bancroft MATH 213 Fall 2013 32 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
The Universal Quantifier
DefinitionThe universal quantification of the predicate P (x) is the statement . . .
In symbols,
Note
Dr. Eric Bancroft MATH 213 Fall 2013 33 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Example
(Let the domain of discourse be all real numbers.)
Dr. Eric Bancroft MATH 213 Fall 2013 34 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
The Existential Quantifier
DefinitionThe existential quantification of the predicate P (x) is the statement . . .
In symbols,
Note
Dr. Eric Bancroft MATH 213 Fall 2013 35 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Example
(Let the domain of discourse be all Grove City students.)
Dr. Eric Bancroft MATH 213 Fall 2013 36 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Definition (Free and Bound variables)
Definition (Scope)
Dr. Eric Bancroft MATH 213 Fall 2013 37 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Quantifiers with Conjunction and Disjunction
Dr. Eric Bancroft MATH 213 Fall 2013 38 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Negating Quantified Expressions
Dr. Eric Bancroft MATH 213 Fall 2013 39 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Translating Into English
Example
Let P (x) be the statement “x likes to fly kites”, Q(x, y) be thestatement “x knows y”, and L(x, y) the statement “x likes y”.Translate the following logical expressions into English statements:
1. ∀x (Q(Joan, x)→ P (x))
2. ∀x (L(Susie, x)→ ¬L(x,Calvin))
Dr. Eric Bancroft MATH 213 Fall 2013 40 / 88
Chapter 1 - Foundations 1.4 - Predicates and Quantifiers
Translating From English
Example
Translate the following statements into logical expressions
1. “All cats are gray.”
2. “There are pigs which can fly.”
Dr. Eric Bancroft MATH 213 Fall 2013 41 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Example
1. ∀x (x 6= 0→ ∃y(xy = 1))
2. ∀x∀y(x + y = y)
Note: The order of quantification matters!
Example
Let M(x, y) = “x is y’s mother”. Translate the following into English:
I ∀y∃xM(x, y)
I ∃x∀yM(x, y)
Dr. Eric Bancroft MATH 213 Fall 2013 42 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Example
Translated each of the following in to English, where M is as in theprevious example and S(x) = “x is a student”.
1. ∀y (S(y)→ ∃xM(x, y))
2. ∀y∃x (S(y) ∧M(x, y))
Dr. Eric Bancroft MATH 213 Fall 2013 43 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
[Clip]
Dr. Eric Bancroft MATH 213 Fall 2013 44 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Example
Let L(x, y) = “x loves3 y” and S as in the previous example. Translatethe following into logical expressions:
1. Everybody loves somebody.
2. There are people who love everybody.
3. All students love each other.
3In a 1 John 4 sort of way.Dr. Eric Bancroft MATH 213 Fall 2013 44 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Negating Nested Quantifiers
Example
¬(∀x∃y xy = 1)We move the negation through each level of quantification, using DeMorgan’s rules for quantifiers at each step:
Dr. Eric Bancroft MATH 213 Fall 2013 45 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Example
Let I(x) = “x has an internet connection”,F (x, y) = “x and y have Facebook messaged”, and the domain bestudents in this class. Translate the following into logical expressions:
1. Someone in your class has an internet connection but has notFacebook messaged anyone else in the class.
2. There are two students in the class who, between them, havemessaged everyone else in the class.
Dr. Eric Bancroft MATH 213 Fall 2013 46 / 88
Chapter 1 - Foundations 1.5 - Nested Quantifiers
Example
Let C(x, y) = “student x is enrolled in class y” and the domain beGCC students. Translate the following into English sentences:
1. ¬ (∃x∀y C(x, y))
2. ∃x∃y∀z ((x 6= y) ∧ (C(x, z)↔ C(y, z)))
Dr. Eric Bancroft MATH 213 Fall 2013 47 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Definitions
I Argument
I Premises
I Conclusion
I Valid [Argument]
I Fallacy
Dr. Eric Bancroft MATH 213 Fall 2013 48 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Standard Rules of Inference I
Each of the following is based on a tautology.
I Modus Ponenspp→ q
∴ q
I Modus Tollens¬qp→ q
∴ ¬p
I Hypothetical Syllogismp→ qq → r
∴ p→ r
Dr. Eric Bancroft MATH 213 Fall 2013 49 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Standard Rules of Inference II
I Disjunctive Syllogismp ∨ q¬p
∴ q
I Additionp
∴ p ∨ q
I Simplificationp ∧ q
∴ p
Dr. Eric Bancroft MATH 213 Fall 2013 50 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Standard Rules of Inference III
I Conjunctionpq
∴ p ∧ q
I Resolutionp ∨ q¬p ∨ r
∴ q ∨ r
Dr. Eric Bancroft MATH 213 Fall 2013 51 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Examples
Identify the rules of inference used in each of the following arguments.
1. Alice is a math major. Therefore, Alice is either a math major ora c.s. major.
2. If it snows today, the college will close. The college is not closedtoday. Therefore it did not snow today.
3. If I go swimming, then I will stay in the sun too long. If I stay inthe sun too long, then I will sunburn. Therefore, if I go swimming,then I will get sunburn.
Dr. Eric Bancroft MATH 213 Fall 2013 52 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Example
Use rule of inference to show that the premises “Henry works hard”,“If Henry works hard then he is a dull boy”, and “If Henry is a dullboy then he will not get the job” imply the conclusion “Henry will notget the job.”
Dr. Eric Bancroft MATH 213 Fall 2013 53 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Standard Rules of Inference I
Each of the following is based on a tautology.
I Universal Instantiation∀xP (x)
∴ P (c) for any fixed c
I Universal GeneralizationP (c) for an arbitrary c
∴ ∀xP (x)
I Existential Instantiation∃xP (x)
∴ P (c) for some c
Dr. Eric Bancroft MATH 213 Fall 2013 54 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Standard Rules of Inference II
I Existential GeneralizationP (c) for some c
∴ ∃xP (x)
I Universal Modus Ponens∀x (P (x)→ Q(x))P (c)
∴ Q(c)
I Universal Modus Tollens∀x (P (x)→ Q(x))¬Q(c)
∴ ¬P (c)
Dr. Eric Bancroft MATH 213 Fall 2013 55 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Example
What can you conclude about Henry, Jack, and Jill, given the followingpremises?
1. Every c.s. major has an iPad.
2. Henry does not have an iPad.
3. Jill has an iPad.
4. Jack is a c.s. major.
Dr. Eric Bancroft MATH 213 Fall 2013 56 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Fallacies
I Affirming the Conclusionp→ qq
∴ p
I Denying the Hypothesisp→ q¬p
∴ ¬q
I Begging the Questionp
∴ p
Dr. Eric Bancroft MATH 213 Fall 2013 57 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Valid or Fallacy? I
Do the following represent valid arguments, or fallacies?
1. All students in this class understand logic. Pascal is a student inthis class. Therefore, Pascal understands logic. (LetP (x) = “x is in this class” and Q(x) = “x understands logic”.)
2. Every c.s. major takes discrete mathematics. Esther is takingdiscrete mathematics. Therefore, Esther is a c.s. major. (LetP (x) = “x is a c.s. major” and Q(x) = “x takes discrete”.)
Dr. Eric Bancroft MATH 213 Fall 2013 58 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Valid or Fallacy? II
3. All parrots like fruit. My pet bird is not a parrot. Therefore, mypet bird does not like fruit. (Let P (x) = “x is a parrot” andQ(x) = “x like fruit”.)
4. Everyone who eats granola every day is healthy. John is nothealthy. Therefore John does not eat granola every day. (LetP (x) = “x eats granola every day” and Q(x) = “x is healthy”.)
Dr. Eric Bancroft MATH 213 Fall 2013 59 / 88
Chapter 1 - Foundations 1.6 - Rules of Inference
Example
Let
I F (x) =“x’s cable freezes”I I(x) =“x is irritable”I S(x) =“x’s work suffers”I W (x) =“x is wrongly
convicted”
I T (x, y) =“x has time to thinkabout y (a lot)”
I E(x) =“x’s house explodes”
I D(x) =“x has DirecTV R©”
Dr. Eric Bancroft MATH 213 Fall 2013 60 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Terms that arise in Formal Proofs I
I Proof
I Undefined Term
I Theorem
I Proposition
Dr. Eric Bancroft MATH 213 Fall 2013 61 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Terms that arise in Formal Proofs II
I Lemma
I Corollary
I Conjecture
I Axiom / Postulate
Dr. Eric Bancroft MATH 213 Fall 2013 62 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Quantifiers
When no quantifier is given, then a universal quantification is assumed.
Example
If xy > 0, then either x and y are both positive or x and y are bothnegative.
Dr. Eric Bancroft MATH 213 Fall 2013 63 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Basic Facts/Definitions/Postulates
I An integer n is even if there exists an integer k such that n = 2k.
I An integer n is odd if there exists an integer k such that n = 2k+ 1.
I An integer a is a perfect square if there exists an integer b suchthat a = b2.
I If a and b are integers such that a 6= 0, we say that a divides b ifthere exists an integer c such that b = ac.
I A real number r is rational if there exists integers p and q withq 6= 0 such that r = p
q . A real number is irrational if it is notrational.
Dr. Eric Bancroft MATH 213 Fall 2013 64 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Methods of Proving Theorems
Direct ProofTo prove a statement of the form p→ q using a direct proof, weassume that p (the “if”) is true and then show by a direct argument(which may take many steps) that q (the “then”) must also be true.This is the most common form of proof, and we’ll almost always startby trying this approach.
Example
Prove the statement: “If a person likes math, then he is cool.”
Dr. Eric Bancroft MATH 213 Fall 2013 65 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Example
Proposition
If n is a perfect square then n is either odd or divisible by 4.
Proof.
Q.E.D.
Dr. Eric Bancroft MATH 213 Fall 2013 66 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Methods of Proving Theorems
Proof by Contraposition
A proof by contraposition is an indirect proof in which we prove thecontrapositive of the original statement, i.e., we prove that ¬q → ¬p(recall that the contrapositive has the same truth values as the originalimplication).
Example
Prove the statement: “If a person likes math, then he is cool.”
Dr. Eric Bancroft MATH 213 Fall 2013 67 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Example
Proposition
If n and m are integers and mn is even, then either m or n must beeven.
Proof.
Q.E.D.
Dr. Eric Bancroft MATH 213 Fall 2013 68 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Proving a Biconditional Statement
To prove a statement of the form p↔ q we prove both
I p→ q and
I q → p
Example
Prove the statement: “A person likes math if and only if he is cool.”
Dr. Eric Bancroft MATH 213 Fall 2013 69 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Proving Multiple Equivalences
To prove that three or more statements are equivalent (all connectedwith “if and only if”s), it is enough to show that a chain of“if. . . then. . . ” statements are true, as long as we can get from anystatement to any other statement through the chain.
Dr. Eric Bancroft MATH 213 Fall 2013 70 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Example
Prove that the following are equivalent [shorthand abbr. “TFAE”;might also see “TAE” for “these are equivalent”] for any a, b ∈ R:
1. a < b
2.a + b
2> a
3.a + b
2< b
Dr. Eric Bancroft MATH 213 Fall 2013 71 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Other Methods of Proof
Proof by Contradiction
Assume the opposite of what you want to show and then show thatthis leads to a contradiction. Can be useful, but usually does not yielda very ‘enlightening’ proof. As far as it is practical, try to avoid proofby contradiction.
Vacuous ProofShow that p→ q is true by showing that p is false.
Trivial ProofShow that p→ q is true by showing that q is true (without using p).
Dr. Eric Bancroft MATH 213 Fall 2013 72 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Example
Proposition
The product of a non-zero rational number and an irrational number isirrational.
Proof.
Q.E.D.
Dr. Eric Bancroft MATH 213 Fall 2013 73 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Finding Mistakes in Proofs
1. a = b Given.2. a2 = ab Multiply both sides by a.3. a2 − b2 = ab− b2 Subtract b2 from both sides.4. (a− b)(a + b) = b(a− b) Factor.5. a + b = b Cancel a− b on both sides.6. 2b = b Substitute a for b since a = b.7. 2 = 1 Divide both sides by b.
Where is the mistake in this proof?
Dr. Eric Bancroft MATH 213 Fall 2013 74 / 88
Chapter 1 - Foundations 1.7 - Introduction to Proofs
Other Errors in Proofs
Begging the Question
This occurs when the part of the proof is based on the truth of thestatement being proved (we saw this in the previous section).
Circular Reasoning
Occurs when you use a statement to prove itself.
Dr. Eric Bancroft MATH 213 Fall 2013 75 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Proof Methods
Proof by Cases
Logically, it has a form similar to:
p ∨ q ∨ rp→ sq → sr → s
∴ sWe can use this method when there are finitely many possibilities andshow that each possible case leads to the desired result.
Exhaustive ProofSimilar to a proof by cases. Generally used when looking at a relativelysmall number of examples will exhaust all possibilities.
Dr. Eric Bancroft MATH 213 Fall 2013 76 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Something so important it gets its own frame.
NoteNeither a Proof by Cases nor an Exhaustive Proof will constitute avalid proof unless all cases or possibilities have been examined! “Proofby Life Savers Gummies” (a.k.a., “Proof by doing a couple ofexamples”) is not a valid form of proof!
Dr. Eric Bancroft MATH 213 Fall 2013 77 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Example
Theorem (Triangle Inequality)
For any two real numbers x and y, |x + y| ≤ |x|+ |y|.
Dr. Eric Bancroft MATH 213 Fall 2013 78 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Existence Proofs
A proof of a proposition of the form ∃xP (x) is called an existenceproof. There are two types of existence proofs:
1. Constructive:
2. Nonconstructive:
Dr. Eric Bancroft MATH 213 Fall 2013 79 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Examples
Constructive Example
Show that there is a positive integer that can be written as the sum ofcubes in two different ways.
Nonconstructive Example
Show that there exists two irrational numbers x and y such that xy isrational.
Dr. Eric Bancroft MATH 213 Fall 2013 80 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Uniqueness
DefinitionThe Uniqueness Quantifier ∃!xP (x) means
Example
∀y ∈ R (y 6= 0→ ∃!x(xy = 1))
Dr. Eric Bancroft MATH 213 Fall 2013 81 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Counterexamples
To show that ∀xP (x) is false it is sufficient to find one value of x forwhich P (x) is false.
Example
Every positive integer is the sum of three squares.
Dr. Eric Bancroft MATH 213 Fall 2013 82 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Open Problems
The 3x+ 1 Conjecture
Starting with any positive integer and repeatedly applying thetransformation whereby an even integer gets divided by 2, and an oddinteger gets multiplied by 3 and incremented by 1, we will ultimatelygenerate the integer 1.
Goldbach’s Conjecture
Every positive even integer n ≥ 4 can be written as the sum of twoprime numbers.
Dr. Eric Bancroft MATH 213 Fall 2013 83 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Additional Logic Puzzles I
1. Use all of the following premises to reach a conclusion:I The only books in this library, that I do not recommend for
reading, are unhealthy in tone.I The bound books are all well written.I All the romances are healthy in tone.I I do not recommend you to read any of the unbound books.
2. 4Use all of the following premises to reach a conclusion:I All my sons are slim.I No child of mine is healthy who takes no exercise.I All gluttons, who are children of mine, are fat.I No daughter of mine takes any exercise.
Dr. Eric Bancroft MATH 213 Fall 2013 84 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Additional Logic Puzzles II
3. Let us assume that there are five houses of different colors next toeach other on the same road. In each house lives a man of adifferent nationality. Every man has his favorite drink, his favoritebrand of cigarettes, and keeps pets of a particular kind.
I The Englishman lives in the red house.I The Swede keeps dogs.I The Dane drinks tea.I The green house is just to the left of the white one.I The owner of the green house drinks coffee.I The Pall Mall smoker keeps birds.I The owner of the yellow house smokes Dunhills.I The man in the center house drinks milk.I The Norwegian lives in the first house.I The Blend smoker has a neighbor who keeps cats.I The man who smokes Blue Masters drinks bier.I The man who keeps horses lives next to the Dunhill smoker.
Dr. Eric Bancroft MATH 213 Fall 2013 85 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Additional Logic Puzzles III
I The German smokes Prince.I The Norwegian lives next to the blue house.I The Blend smoker has a neighbor who drinks water.
Who keeps fish as his pet?5
Dr. Eric Bancroft MATH 213 Fall 2013 86 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Additional Logic Puzzles IV
4. The Lady or the Tiger.6 A certain king likes to entertainhimself by making his prisoners play a game to decide their fate.The prisoners are presented with two doors. In a room behindeach door is either a lady whom the prisoner may marry, or a tigerwhom may eat the prisoner. A clue is written on each door andthe prisoner decides which door to open based on these clues. Theclues provided to three prisoners brought before the king arebelow. Try to figure out which door each prisoner should open.Prisoner 1 is told that exactly one of the following clues is trueand exactly one is false.
Door 1: There is a lady behind this door and a tiger behindthe other.
Door 2: There is a lady behind one of the doors and a tigerbehind the other.
Dr. Eric Bancroft MATH 213 Fall 2013 87 / 88
Chapter 1 - Foundations 1.8 - Proof Methods and Strategy
Additional Logic Puzzles V
Prisoner 2 is told that either both clues are true or both are false.
Door 1: Either there is a tiger behind this door or a ladybehind the second door.
Door 2: There is a lady behind this door.
Prisoner 3 receives directions which are a bit tricker since the firsttwo escaped. This prisoner is told that if a lady is behind door 1then the clue on door 1 is true, but if a tiger is behind door 1 thenthe clue on that door is false. Door 2 follows the opposite rule: if alady is behind door 2 the clue on door 2 is false, but if a tiger isbehind door 2 the clue on that door is true.
Door 1: A lady is waiting behind at least one of the doors.Door 2: A lady is waiting behind the other door.
4Puzzles 1 and 2 are attributed to Lewis Carroll5Commonly attributed to Albert Einstein.6Commonly attributed to Raymond Smullyan.
Dr. Eric Bancroft MATH 213 Fall 2013 88 / 88