You are on page 1of 39

Quiz 2

Logical Proofs

Section 1.7
Proofs
• A proof is a valid argument that establishes the
truth of the mathematical statement
• Formal proofs:
– All steps were supplied
– Rules for each step in the argument were given
• Informal proofs:
– One or more rules can be used
– Steps can be skipped
– Rules are not explicitly stated
– Practical for humans
Understanding how theorems are stated

• Many theorems assert that a property holds for all


elements in a domain.
• However, the universal quantifier is often not
explicitly stated.
• The statement:
– “If x > y, where x and y are positive real numbers, then x2
> y2."
• really means:
– “For all positive real numbers x and y, if x > y then x2 > y2."
Methods of proof

6
Methods of Proof
• To understand written mathematics, understand
what makes up a correct mathematical argument,
that is, a proof.
• Requires an understanding of the techniques used to
build proofs.
• The methods for building proofs are also used
throughout computer science, such as the rules
computers used to reason, the techniques used to
verify that programs are correct, making inferences
in artificial intelligence etc.
Terminologies
• Theorem: In mathematical writing, the term
theorem is usually an important
statement/fact/result that can be shown to be
true. Can be universal quantification of a
conditional statement with one or more premises
and a conclusion
• Proposition: Less important theorem
• We demonstrate that a theorem is true with a
proof
Other terminologies
• A proof is a valid argument that establishes the truth of a theorem.
• The statements (we assume to be true) used in a proof are axioms
(or postulates)
• A less important theorem that is helpful in the proof of other
results is called a lemma.
• A corollary is a theorem that can be established directly from a
theorem that has been proved.
• A conjecture is a statement that is being proposed to be a true
statement, usually on the basis of some partial evidence, a heuristic
argument, or the intuition of an expert. When a proof of a
conjecture is found, the conjecture becomes a theorem.
• Many theorems in mathematics are
implications, p→q. The techniques of proving
implications give rise to different methods of
proofs.
Types of proof
• Vacuous proof: when you show premises is
false, so implication pq is true
• Trivial proof: the implication is true if you prove
q is true
• Direct proof: when p is true and prove q is true
• Indirect Proof:
– proof of the contrapositive ¬q ¬ p
– Proof by contradiction (pꓥ~q) c
Proving Theorems
• A vacuous proof of an implication happens when the hypothesis of
the implication is always false.
•  "if taj mahal  is in France, then the Eiffel Tower is in Bolivia".
• Prove that if x is a positive integer and x = -x, then x 2 = x.
• "For any integer x, if x > 5 then x > 3.“
– – This statement is true non-vacuously (since some integers are greater
than 5), but some of its implications are only vacuously true: for example,
when x is the integer 2, the statement implies the vacuous truth that "if 2
> 5 then 2 > 3".
•  vacuously true statements are not generally of interest by
computer scientists , but they frequently arise as the base case of
proofs by mathematical induction
Trivial proof
• Trivial proof:
• the implication is true if you prove q is true
• All Unicorns have 1 horn.
• Proof: By definition, Unicorns have only one horn.
• Vacuous proof:
• All Unicorns have 3 horns.
• Proof: There are no Unicorns which don’t have three
horns.
• Both are valid and correct proofs.
Methods of Informal Proofs
• Direct Proof
• Indirect Proof
– Proof by contraposition
– Proof by contradiction
Direct Proof
• In a (informal) direct proof, we assume that
– p is true, and use axioms, definitions and previous
theorems, together with rules of inference to show
that q must be true
• This proof shows that conditional statement is
true by showing that if p is true, then q must
also be true
Some definitions
Definitions
• An integer n is even if there exists an integer k such that n =
2k.
• An integer n is odd if there exists an integer k such that n = 2k
+ 1.
• An integer n is prime if, and only if, n > 1 and for all positive
integers r and s, if n = r·s, then r = 1 or s = 1.
• An integer n > 1 is composite if, and only if, n = r·s for some
positive integers r and s with r ≠ 1 and s≠1.
• A real number r is rational if, and only if, for some integers a
divides b with b ≠ 0.
• If n and d are integers and d ≠ 0, then d divides n, written d|n
if, and only if, n = d.k for some integers k.
• An integer n is called a perfect square if, and only if, n = k2 for
some integer k.
Example 1
• ∀ integers m and n, if m and n are even then m + n is
even.
Example 2
Tasks
• Prove that the product of an even integer and an odd integer
is even.
• Prove that if n is an odd integer, then n3 + n is even.
• Prove that, if the sum of any two integers is even, then so is
their difference.
• Prove that the sum of any two rational numbers is rational.
• Prove that for all integers a, b and c, if a|b and b|c then a|c.
• Prove that the sum of any three consecutive integers is
divisible by 3. Hint(n, n + 1 and n + 2 be three consecutive
integers.)
Exercise
• If n is odd integer, then n2 is odd.
Indirect Proof—Proof by Contraposition
• Proofs of theorem that do not start with hypothesis
and end with conclusion are indirect proofs
• Proof by contraposition--Based on logical equivalence
between a statement and its contrapositive
• To prove:
1. Take the contrapositive of the statement

2. Prove it by direct proof


3. Conclude the original statement is true
Example
• Prove that if 3n + 2 is odd, then n is odd.
• The contrapositive of the given conditional
statement is “ if n is even then 3n + 2 is even”
• Suppose n is even, then n = 2k for some k ∈ Z
• Now 3n + 2 = 3 (2k) + 2
= 2. (3k + 1) = 2.r where r = (3k + 1) ∈ Z Hence
3n + 2 is even. We conclude that the given
statement is true since its contrapositive is true.
Exercise
• Prove the statement by contraposition: For all integers m and n, if m + n is
even then m and n are both even or m and n are both odd.
• PROOF: The contrapositive statement is: “For all integers m and n, if m
and n are not both even and m and n are not both odd, then m + n is not
even. Or more simply, “For all integers m and n, if one of m and n is even
and the other is odd, then m + n is odd”
• Suppose m is even and n is odd. Then m = 2p for some integer p and
n = 2q + 1 for some integer q
• Now m + n = (2p) + (2q + 1) = 2·(p+q) + 1 = 2·r + 1 where r = p+q is an
integer
• Hence m + n is odd. Similarly, taking m as odd and n even, we again arrive
at the result that m + n is odd.
• Thus, the contrapositive statement is true. Since an implication is logically
equivalent to its contrapositive so the given implication is true
EXERCISE:
Prove that if |x| > 1 then x > 1 or x < -1 for all x ∈ R.
Excersise
• Let x ∈ Z. Then 5x + 3 is even if and only if x is odd.
• Proof: Assume that x is even. Then x = 2k, ∃k ∈ Z.
Thus 5x + 3 = 5(2k) + 3 = 10k + 3 = 2(5k + 1) + 1. Since
5k + 1 ∈ Z, it follows that 5x + 3 is even.
• For the converse, let x be odd. So x = 2k + 1, ∃k ∈ Z.
• Hence, 5x + 3 = 5(2k + 1) + 3 = 10k + 8 = 2(5k + 4).
• There are two implications to prove here:
– If 5x + 3 is even, then x is odd.
– If x is odd, then 5x + 3.
Tasks
• Theorem: Let x ∈ Z. Then x 2 is even if and
only x is even.
• Let x ∈ Z. If 3x − 15 is even, then x is odd.
If have Multiple proposition variables

• (P1ꓥ P2ꓥP3ꓥ…… ꓥ Pn ) q

• (P1 vP2vP3v…… v Pn ) q
Proof by cases
• Let n ∈ Z. Then n 2 + 3n + 5 is an odd integer.
• Proof: We proceed by cases, according to
whether n is even or odd.
 Case 1. n is even. Then n = 2x, ∃x ∈ Z. So
n2 + 3n + 5 = 4x2 + 6x + 5 = 2(2x2 + 3x + 2) + 1.
 Case 2. n is odd. Then n = 2x + 1, ∃x ∈ Z.
So n2 + 3n + 5 = 4x2 + 4x + 1 + 6x + 3 + 5
= 2(2x2 + 5x + 4) + 1.
Indirect Proof—Proof by Contradiction

• We want to prove a statement p is true:


– Assume is true
– Find some contradiction
– Claim that (original assumption) is false which
means that p is true
Indirect Proofs (2)
Example
• “If n2 is an even integer then n is an even
integer.”
• PROOF: Suppose n2 is an even integer and n is
not even, so that n is odd. Hence n = 2k + 1 for
some integer k.
Now n 2 = (2k + 1) 2
= 4k2 + 4k + 1 = 2·(2k2 + 2k) + 1
Example
• If n and m are odd integers, then n + m is an even
integer.
• SOLUTION: Suppose n and m are odd and n + m
is not even (odd i.e by taking contradiction). Now
n = 2p + 1 for some integer p and m = 2q + 1 for
some integer q
Hence n + m = (2p + 1) + (2q + 1)
= 2p + 2q + 2 = 2· (p + q + 1) which is even,
contradicting the assumption that n + m is odd.
Tasks
1. Dsdsdc

2. Prove the following statements about an


integer x are equivalent.
(i) 3x+2 is even
(ii) x+5 is odd
(iii) x2 is even
3. Let x, y ∈ Z. Prove that if xy and x + y are even,
then both x and y are even.
• The sum of any rational number and any
irrational number is irrational.
• Prove that √2 is irrational
Exercise
• Prove by contradiction that 6 -7 2 is irrational.
Tasks
• Prove by contradiction that 2 + 3 is irrational.
Section 1.7 (book 7 edition) th

• Example 1,2,3,4,7,8,10,11,12

You might also like