MA103 STATEMENTS, PROOF, LOGIC

Similar documents
Introducing Proof 1. hsn.uk.net. Contents

Proofs. Joe Patten August 10, 2018

Foundation of proofs. Jim Hefferon.

Writing Mathematical Proofs

3 The language of proof

Section 3.1: Direct Proof and Counterexample 1

LECTURE 1. Logic and Proofs

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Basic Logic and Proof Techniques

Topic 1: Propositional logic

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Some Review Problems for Exam 1: Solutions

1.1 Statements and Compound Statements

CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:

The statement calculus and logic

PHIL 422 Advanced Logic Inductive Proof

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Logic, Sets, and Proofs

Inference and Proofs (1.6 & 1.7)

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

cis32-ai lecture # 18 mon-3-apr-2006

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Math 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution

Mathematical Logic Part One

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

- 1.2 Implication P. Danziger. Implication

EECS 1028 M: Discrete Mathematics for Engineers

Mathematical Reasoning. The Foundation of Algorithmics

Logic and Proofs. (A brief summary)

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

Math Real Analysis

HOW TO CREATE A PROOF. Writing proofs is typically not a straightforward, algorithmic process such as calculating

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Mathematical Logic Part One

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

Chapter 1: The Logic of Compound Statements. January 7, 2008

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Logic. Propositional Logic: Syntax

Discrete Mathematics and Its Applications

Direct Proof and Counterexample I:Introduction

Manual of Logical Style (fresh version 2018)

More examples of mathematical. Lecture 4 ICOM 4075

Direct Proof and Counterexample I:Introduction. Copyright Cengage Learning. All rights reserved.

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

Proof Techniques (Review of Math 271)

Lecture 02: Propositional Logic

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Foundations of Advanced Mathematics, version 0.8. Jonathan J. White

Truth-Functional Logic

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

Discrete Structures for Computer Science

Today s Topic: Propositional Logic

Chapter 1 Elementary Logic

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

Introduction to Logic and Axiomatic Set Theory

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Proof strategies, or, a manual of logical style

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

For all For every For each For any There exists at least one There exists There is Some

Test of Mathematics for University Admission. Notes on Logic and Proof. October 2018

Supplementary Logic Notes CSE 321 Winter 2009

Logic Overview, I. and T T T T F F F T F F F F

Direct Proofs. the product of two consecutive integers plus the larger of the two integers

MATH CSE20 Homework 5 Due Monday November 4

A Little Deductive Logic

Math 13, Spring 2013, Lecture B: Midterm

One-to-one functions and onto functions

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Note 2

Section 1.3. Let I be a set. When I is used in the following context,

1 Propositional Logic

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Intermediate Logic. Natural Deduction for TFL

MATH10040: Chapter 0 Mathematics, Logic and Reasoning

Logic. Propositional Logic: Syntax. Wffs

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

A Little Deductive Logic

A statement is a sentence that is definitely either true or false but not both.

1.1 Language and Logic

Propositional Logic: Syntax

1 Implication and induction

Logic. Def. A Proposition is a statement that is either true or false.

Chapter III. Basic Proof Techniques. Proving the obvious has never been easy. Marty Rubin

Logic and Mathematics:

Section 1.1: Logical Form and Logical Equivalence

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Logic and Proofs. (A brief summary)

Section 1.1 Propositions

irst we need to know that there are many ways to indicate multiplication; for example the product of 5 and 7 can be written in a variety of ways:

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Mat 243 Exam 1 Review

Transcription:

MA103 STATEMENTS, PROOF, LOGIC

Abstract Mathematics is about making precise mathematical statements and establishing, by proof or disproof, whether these statements are true or false. We start by looking at what this means, concentrating on fairly simple types of mathematical statement, in order to emphasise techniques of proof. Throughout the rest of the course we will use these proof techniques extensively.

Some of the things we ll prove to start with are very obvious, but proving even obvious statements can be quite tricky. Need to start by understanding what we mean by statements, and how to prove them, and we need some basic logic.

Here are some of the example mathematical statements listed in Section 2.2.1 of the notes. (Natural numbers are positive integers). (a) 20 is divisible by 4. (b) 21 is not divisible by 7. (d) 21 is divisible by 3 or 5. (g) For every natural number n, the number n 2 + n is even. (h) There is a natural number n such that 2n = 2 n. (i) If n is even, then n 2 is even. (l) There are no natural numbers m and n such that 2 = m/n. These are all mathematical statements, of different sorts.

(a) 20 is divisible by 4. (b) 21 is not divisible by 7. (d) 21 is divisible by 3 or 5. These are straightforward propositions about certain numbers, and these are either true or false. Statement (d) is an example of a compound statement. It s true precisely when either one (or both) of the statements 21 is divisible by 3 and 21 is divisible by 5 is true.

(g) For every natural number n, the number n 2 + n is even. This makes an assertion about all natural numbers and is an example of a universal statement.

(h) There is a natural number n such that 2n = 2 n. This asserts the existence of a particular number and is an example of an existential statement.

(i) If n is even, then n 2 is even. This is as an assertion about all even numbers, and so it is a universal statement, where the universe is all even numbers. But it can also be considered as an implication, asserting that if n happens to be even, then n 2 is even.

(l) There are no natural numbers m and n such that 2 = m/n. This asserts the non-existence of a certain pair of numbers (m, n). It says that for all choices of (m, n), it is not the case that m/n = 2. (This is an example of the general rule that a non-existence statement can be thought of as a universal statement, something to be discussed later in more detail.)

Can we prove or disproof (show false) these statements at this stage of the course? Well, all except the last one. Let s look at a few of them.

(a) 20 is divisible by 4. This is true. Yes, it s obvious! But how do you give a proper proof? Need first to understand exactly what divisible means. For natural numbers n and d, to say that n is divisible by d means precisely that there is some natural number m for which n = md. Since 20 = 5 4, we see that 20 is divisible by 4. And that s a proof! Utterly convincing, watertight, and not open to debate (though not especially exciting).

That was easy. But if we didn t know what divisible means, we d have been lost. Definitions are important. We can t prove or disprove statements if we don t know what they mean.

Consider the statement 6 is a nice number. Is it true or false? Daft question, since we have no definition of nice.

(b) 21 is not divisible by 7. This is FALSE, because 21 is divisible by 7, since 21 = 3 7.

(d) 21 is divisible by 3 or 5. Will be true precisely if one (or both) of the following statements is true: (i) 21 is divisible by 3 (ii) 21 is divisible by 5. Statement (i) is true, because 21 = 7 3. Statement (ii) is false. But because at least one of these two statements is true, statement (d) is true.

(g) For every natural number n, the number n 2 + n is even. Bit more interesting, this one. How can we prove this, if it is true, or disprove it, if it is false? Think about that...

If For every natural number n, the number n 2 + n is even is false, then to prove that it s false all you d need to do is somehow find a natural number N for which N 2 + N is odd, not even. That d be the end of it.

But suppose the statement is true. How could you prove it? You could prove it for n = 1, then n = 2, then n = 3, and so on, but at some point we d all be dead and there would still be numbers n that you hadn t yet proved it for. And that simply wouldn t do. So what you need is a more sophisticated, general argument that shows the statement is true for any arbitrary n. That might be difficult.

But, actually, the statement is TRUE and it s not so hard to prove. Lots of ways of doing so. We can note that n 2 + n = n(n + 1). The numbers n and n + 1 are consecutive natural numbers. So one of them is odd and one of them is even. When you multiply any odd number and any even number together, you get an even number, so n 2 + n is even. Convinced?

If not, let s be more explicit. Let n be a natural number. Either it is even or it is odd. Let s consider each of these cases separately.

Suppose n is even. What that means is that, for some integer k, n = 2k. Then n + 1 = 2k + 1 and n(n + 1) = 2k(2k + 1) = 2 (k(2k + 1)). Because k(2k + 1) is an integer, this shows that n 2 + n = n(n + 1) is divisible by 2; that is, it is even.

Suppose n is odd. That means we have n = 2k + 1 for some integer k. Then n(n + 1) = (2k + 1)(2k + 2) = 2 ((2k + 1)(k + 1)), which is, again, even, because (2k + 1)(k + 1) is an integer.

We ve proved something about infinitely many numbers is a finite amount of time.

See the lecture notes for more examples of simple statements and comments on how to prove or disprove them.

One thing should come out very clearly from these examples: To prove a mathematical statement, you need to know precisely what it means. That sounds obvious, but you can see how detailed we had to be about the meanings (that is, the definitions) of the terms divisible, even and odd. Definitions are very important.

Some basic logic Mathematical statements can be true or false Let s denote true by T and false by F. Given statements, it is possible to form other statements. A technique known as the use of truth tables enables us to define logical operations on statements, and to determine when such statements are true.

Negation The negation of a statement P is the statement P (sometimes just denoted not P ), which is defined to be true exactly when P is false. This can be described in the very simple truth table: P P T F F T What does the table signify? Quite simply, it tells us that if P is true then P is false and if P is false then P is true.

Example If P is 20 is divisible by 3 then P is 20 is not divisible by 3. Here, P is false and P is true.

Conjunction and disjunction There are two very basic ways of combining propositions: and (known as conjunction) and or (known as disjunction). Suppose P and Q are two mathematical statements. Then P and Q, also denoted P Q, and called the conjunction of P and Q, is the statement that is true precisely when both P and Q are true.

Example The statement 50 is divisible by 2 and 5 is the conjunction of the two statements 50 is divisible by 2 50 is divisible by 5. It is true because both of these two statements are true.

Truth table for the conjunction of P and Q: P Q P Q T T T T F F F T F F F F

P or Q, also denoted P Q, called the disjunction of P and Q, is the statement that is true precisely when P, or Q, or both, are true.

For example, statement (d) above, which is 21 is divisible by 3 or 5 is the disjunction of the two statements 21 is divisible by 3 21 is divisible by 5. Statement (d) is true because at least one (namely the first) of these two statements is true.

Important thing about the mathematical interpretation of the word or. It is always inclusive-or. So P Q is true in the case when P is true, or Q is true, or both. Contrasts with a common use of or in everyday language, where it is often used to specify a choice between mutually exclusive alternatives. (For example You re either with us or against us.)

Truth table for the disjunction of P and Q: P Q P Q T T T T F T F T T F F F

If-then statements Very important to understand the formal meaning of the word if in mathematics. It is often used sloppily in everyday life, but has a very precise mathematical meaning. Example If it rains, then I wear a raincoat. Suppose this is true. What if it rains? Then you can conclude I will wear a raincoat. What if it does not rain? Well, you can t conclude anything.

An if-then statement only tells you about what follows if something particular happens.

Suppose P and Q are mathematical statements (each of which can therefore be either true or false). Then the statement denoted P Q ( P implies Q or, equivalently, if P, then Q ), has the following truth table.

P Q P Q T T T T F F F T T F F T

(This type of statement is known as an if-then statement or an implication.)

If you re not sure of the meaning of P Q, might be easier to think about when it is false. It s false when P is true and Q isn t, and only then.

The statement P Q can also be written as Q P. There are different ways of describing P Q, such as: if P then Q P implies Q P is sufficient for Q Q if P P only if Q Q whenever P Q is necessary for P.

If P Q and Q P then this means that Q will be true precisely when P is. That is, Q is true if and only if P is. We use the single piece of notation P Q.

There are several phrases for describing what P Q means, such as: P if and only if Q (sometimes abbreviated to P iff Q ) P is equivalent to Q P is necessary and sufficient for Q Q is necessary and sufficient for P.

We have the following truth table for P Q. We ve shown the truth or falsity of P Q and Q P to emphasise that P Q is the same as the conjunction (P Q) (Q P ).

P Q P Q Q P P Q T T T T T T F F T F F T T F F F F T T T

What the table shows is that P Q is true precisely when P and Q are either both true or both false.

Logical equivalence Two statements are logically equivalent if when either one is true, so is the other, and if either one is false, so is the other.

Example (P Q) and P Q are logically equivalent. We can see this from the following truth table which shows that, in all cases, the two statements take the same logical value T or F. P Q P Q (P Q) P Q P Q T T T F F F F T F T F F T F F T T F T F F F F F T T T T

Logical equivalence of (P Q) and P Q is quite easy to understand. P Q is true means at least one of P, Q is true. So it s therefore false precisely when both P and Q are false. This means P and Q are both true. This means P Q is true.

This is common sense! If I tell you I will eat an apple or a banana then this is a false statement (so its negation holds true) when I do not eat an apple and I do not eat a banana.

Now that we know the meaning of, we can see that to say that (P Q) and P Q are logically equivalent is to say that (P Q) P Q.

Example Let p, q and r be statements. Prove, using a truth table, that if S 1 is the statement (p q) (q r) (r p) and if S 2 is the statement (p q) (q r) (r p), then S 1 and S 2 are logically equivalent.

We have the following truth table. p q r p q q r r p S 1 p q q r r p S 2 T T T T T T T T T T T T T F T T T T T F F T T F T T T T T F F T T F T T T T T T F T F T T F F T F T F F F F F F T F T T F F F F F F F F T F T T F F F F F F F F F F F F F F F F As can be seen from the table, the two statements S 1 and S 2 are logically equivalent.

Converse statements Given an implication P Q, the reverse implication Q P is known as its converse. Generally, there is no reason why the converse should be true just because the implication is.

Example Consider If it is Tuesday, then I buy the Guardian newspaper. The converse is If I buy the Guardian newspaper, then it is Tuesday. Well, I might buy that newspaper on other days too, in which case the implication can be true but the converse false. Or maybe the converse is true. We don t know. It doesn t follow from the initial statement.

The truth or falsity of the converse Q P has to be determined separately from that of the implication P Q.

Example What s the converse of the statement if the natural number n divides 4 then n divides 12? Is the converse true? Is the original statement true? Here, the statement is P Q where P is n divides 4 and Q is n divides 12. Converse is Q P : if n divides 12 then n divides 4. This is false. The original statement is true, however.

Contrapositive statements The contrapositive of P Q is the statement Q P. The contrapositive is logically equivalent to the implication, as the following truth table shows.

P Q P Q P Q Q P T T T F F T T F F F T F F T T T F T F F T T T T

This is common sense! For, Q P says that if Q is false, P is false also. So, we cannot have Q false and P true. That s exactly the same information as P Q.

What s the point of this? Well, sometimes you might want to prove P Q and it will, in fact, be easier to prove instead the equivalent (contrapositive) statement Q P.

Example (from Biggs) We ll prove: if n 4 and n is a prime number, then n + 1 is not a perfect square. (A perfect square is a number of the form m 2 for some positive integer m.)

Statement is P Q, where P is n 4 and n is prime Q is n + 1 is not a perfect square We prove the statement by proving its contrapositive Q P (which, remember, is logically equivalent). Q: (n + 1 is not a perfect square), which is n + 1 is a perfect square. P : (n 4 and n is prime), which is n < 4 or n is not prime.

So we prove: If n + 1 is a perfect square, then n < 4 or n is not prime. Suppose n + 1 is a perfect square. Then n + 1 = m 2 for some positive integer m. So n = m 2 1 = (m 1)(m + 1). If m 1 > 1, this shows that n has factors other than 1 and itself. So it is not prime. If m 1 = 1 then m = 2 and n = 2 2 1 = 3, so n < 4. We re done!

Example Is the following statement about natural numbers n true or false? Justify your answer by giving a proof or a counterexample: If n is divisible by 6 then n is divisible by 3. What are the converse and contrapositive of this statement? Is the converse true? Is the contrapositive true?

If n is divisible by 6 then n is divisible by 3. Statement is true. For, suppose n is divisible by 6. Then for some m N, n = 6m, so n = 3(2m) and since 2m N, n is divisible by 3. The converse is If n is divisible by 3 then n is divisible by 6. This is false. For example, n = 3 is a counterexample: it is divisible by 3, but not by 6. The contrapositive is If n is not divisible by 3 then n is not divisible by 6. This is true, because it is logically equivalent to the initial statement, which we have proved to be true. (No need to do any more.)

Note, by the way, that these proofs were written in English.

Working backwards to obtain a proof Some statements are difficult to prove directly. It is sometimes easier to work backwards. Example Prove: if a, b are real numbers and a b, then ab < (a 2 + b 2 )/2. Let s start with what we want to prove. This is ab < (a 2 + b 2 )/2, which can be rewritten as a 2 + b 2 2ab > 0. Now, this is (a b) 2 > 0 and now you can see why it is true: a b means a b 0 and so (a b) 2 > 0

A nice proof is a reverse of this argument, as follows: Proof Since a b, a b 0 and, hence, (a b) 2 > 0. But (a b) 2 = a 2 + b 2 2ab. So we have a 2 + b 2 > 2ab and, therefore, ab < (a 2 + b 2 )/2, as required. But you might have wondered where on earth this had come from if I hadn t shown you how we get it by working backwards.

Trade secret: Behind many lovely, succinct, proofs lies hours of agony, frustration and disappointment, followed by a Eureka moment and a sense of elation and accomplishment. (And there will also be lots of scrap paper.)

Writing Mathematics Mathematics is a language and what you write has to make good sense. The words used in proofs, and the punctuation, should make it easy to read and give it a structure and an argument. Don t overuse symbols. You should be using words like so, hence, therefore, since, because, and so on.

Don t over-use notation. Use words. Don t start sentences with symbols Write in sentences, and grammatically Be clear. Tell the reader what you re doing. If you can find a shorter, snappier, proof, then do

I m sorry this letter is so long; I didn t have time to make it shorter. George Bernard Shaw (or Mark Twain or Blaise Pascal??)