Implications (CSCI 2824, Spring 2015)

In the previous lectures, we studied implications. This lecture will focus on implications and start chapter 2 on proof techniques.

  • Implications: Converse and Contrapositive. Negation of an implication.

  • Primer on writing proofs (Section 2.1).

Implications: Contrapositive and Converse

In simple terms, if p Rightarrow q is an implication then

  1. (mbox{NOT}  q) Rightarrow (mbox{NOT}  p) is its contra-positive.

  2. q Rightarrow p is its converse.

This is a very common source of confusion.

Examples:

  • For all integers a,b, if a,b are both odd then a+b is even.

    • Contrapositive: For all integers a,b, If a+b is not even then both a,b cannot be odd. (Is this true?)

    • Converse: For all integers a,b, If a+b is even then a,b are both odd. (Is this true?)

  • If n is odd then n^2 is odd.

    • Contrapositive: If n^2 is not odd then n is not odd. (Is this true?)

    • Converse: If n^2 is odd then n is odd. (Is this true?)

Claim: Any implication is logically equivalent to its contra-positive.

Proof: We are asked to prove in effect that p Rightarrow q is logically equivalent to mbox{NOT}  q Rightarrow mbox{NOT}  p. We write down the truth table to verify this fact.

QED.

The Converse Trap

Proving the converse of a statement is often a trap that even experienced researchers can fall into. Note that proving the converse of an implication in no way convinces us of the truth of the implication.

Let us take examples from real life to see how silly it could be:

  • Statement If a person is underage and consumes of alcoholic beverages then he/she is breaking the law.

    • Converse If a person is breaking the law then he/she consumes alcoholic beverages.

Does the converse ring true?

Primer on Proofs and Mathematical Writing

This lecture, we will warm up by practicing some proofs and the right way to express those proofs. A proof is meant to convince people that some mathematical fact is true. It is meant to be read and judged by ones peers. Therefore writing proofs out well is an important skill for discrete mathematics.

Example # 0

Let us prove the following statement.

Claim: If n is even then n^2 is even. In Logical notation: (forall n in mathbb{N})  (n mod 2 ) = 0 Rightarrow (n^2  mod 2) = 0 .

Dear reader letter

Dear reader,

You have expressed criticism to my theorem in the annals of CSCI 2824 that can be written as

(forall n in mathbb{N})  (n mod 2 ) = 0 Rightarrow (n^2  mod 2) = 0

If you were kind enough to provide me with any number that we will call n, then there are two cases:

  • You provided me with an odd number n mod 2 = 1. The antecedent of the implication is false. Therefore, the implication itself holds true. I have nothing else to say to you in this case.

  • If, however, you were clever enough to provide me with an even value of n, we may of course write it in the form 2 * m for some number m. Also, n^2= 4 * m^2 by elementary algebra. As you know 2 divides 4 m^2 which is the same as n^2. Therefore n^2 is even.

Thus, in no case, can you produce a number n that satisfies the antecedent (n mod 2 ) = 0 but violates the consequent (n^2  mod 2 = 0). I remain your faithful prover of claims.

A fond adieu to you, and you and you,

Note to class: Never, ever, write a dear reader letter

Write the proof in more sensible language.

Proof

Proof: Let n be any given number. If n is odd, then the statement holds true vacuously. Otherwise, n = 2m for some number m. Therefore, n^2= 4m^2. We see that 4 m^2 is divisible by 2. Therefore n^2 is even.

QED.

Example# 1

Claim: For n > 1, If n is even n^2+1 is prime. I.e, forall n, (n  mod 2 = 0) Rightarrow (n^2+1) mbox{is prime}.

Proof Attempt 1

Proof Attempt 1: Let us test for n=2, we have n^2+1 is 5. Works. It also works for n=4 since n^2+1 = 17 is prime and 6 since 6^2+1 is prime. Therefore, n^2 +1 is prime if n is prime.

Let us attempt one more proof of this:

Proof Attempt 2

Proof-2: Assume n^2+1 is prime. We will prove that n must be even.

  • Since n^2+1 is prime, and n > 1, n^2+1 must necessarily be odd.

  • Since n^2+1 is odd, it must be the case that n^2 is even.

  • If n^2 is even, we have proved previously that n is also even.

  • Therefore, n is even. QED??

Are there any flaws in either of these proofs? Do they convince you of the truth of our “claim”?

Example #2

Claim If two numbers a and b are odd, then a+b is even.

Write this down in logical notation?

 forall a,b in mathbb{N} ( ( a mod 2 = 0 mbox{AND} b mod 2 = 0) Rightarrow ( a +b mod 2 = 0))

Let us look at a proof:

Proof

Proof Here are our reasoning steps:

  1. Since a is odd, it can be written as 2 n +1 for some n.

  2. Since b is odd, it can be written as 2 n+1 too.

  3. Therefore a+b = 2n +1 + 2n + 1 = 4 n +2 .

  4. But 4n +2 = 2 ( 2 n +1) is an even number.

  5. Therefore, a+b is even. QED.

Is there anything wrong with the proof above?

Now let us look at a related claim:

Claim If two numbers a and b are odd, then a+b mod 4 = 2.

Exercise: Write this statement down in Predicate Logic. Is this a true statement?

Proof

Proof Here are our reasoning steps:

  1. Since a is odd, it can be written as 2 n +1 for some n.

  2. Since b is odd, it can be written as 2 n+1 too.

  3. Therefore a+b = 2n +1 + 2n + 1 = 4 n +2 .

  4. a + b mod 4 = 4n +2 mod 4 = 2.

  5. Therefore, a+b mod 4 = 2. QED.

Can you correct the demonstrations above? What went wrong?

More Complicated Proof

Claim If n is natural number then n^2-1 is a composite number.

Before we dive further, what is a composite number?

Definition: Composite Number

A natural number n is composite if it can be written as n = m times p with m,p not= 1.

The provision that m,p not= 1 is very important. Or else any number n can trivially be written as

n = underset{m}{underbrace{1}} times underset{p}{underbrace{n}},

with m = 1 and p = n.

Now, back to our claim.

Claim If n is natural number then n^2-1 is a composite number.

Proof

Proof: Let n be a natural number.

  1. We can write n^2 -1 as a product of (n+1) (n-1).

  2. Therefore n^2 -1 is a composite number. QED??

Have we really proved the claim above?