Foundation of proofs. Jim Hefferon.

Similar documents
Compound Propositions

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

MA103 STATEMENTS, PROOF, LOGIC

1.1 Language and Logic

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

EECS 1028 M: Discrete Mathematics for Engineers

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

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Math 10850, fall 2017, University of Notre Dame

Basic Logic and Proof Techniques

Introducing Proof 1. hsn.uk.net. Contents

1.1 Language and Logic

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

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

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.

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

THE LOGIC OF QUANTIFIED STATEMENTS

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

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

15414/614 Optional Lecture 1: Propositional Logic

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

CSC Discrete Math I, Spring Propositional Logic

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

Chapter 2: The Logic of Quantified Statements

Chapter 1 Elementary Logic

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

1.1 Statements and Compound Statements

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Logic and Proof. Aiichiro Nakano

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Math 3336: Discrete Mathematics Practice Problems for Exam I

Logic and Proofs. (A brief summary)

The Process of Mathematical Proof

STRATEGIES OF PROBLEM SOLVING

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

Mat 243 Exam 1 Review

Logic and Propositional Calculus

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

UNIT-I: Propositional Logic

Propositional Logic, Predicates, and Equivalence

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Mathematical Reasoning (Part I) 1

Topics in Logic and Proofs

Truth-Functional Logic

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:


LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Math 13, Spring 2013, Lecture B: Midterm

Foundations of Discrete Mathematics

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

III. Elementary Logic

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

Proofs. Joe Patten August 10, 2018

LECTURE 1. Logic and Proofs

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

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

Definition 2. Conjunction of p and q

Packet #1: Logic & Proofs. Applied Discrete Mathematics

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

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

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

A Little Deductive Logic

Chapter 4: Classical Propositional Semantics

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

1.5 MATHEMATICAL LANGUAGE

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

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

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

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

Group 5. Jeremy Gutierrez. Jesus Ochoa Perez. Alvaro Gonzalez. MATH 170: Discrete Mathematics. Dr. Lipika Deka. March 14, 2014.

Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014

THE LOGIC OF COMPOUND STATEMENTS

COT 2104 Homework Assignment 1 (Answers)

A Little Deductive Logic

Learning Goals of CS245 Logic and Computation

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

2.2: Logical Equivalence: The Laws of Logic

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

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

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

AN INTRODUCTION TO MATHEMATICAL PROOFS NOTES FOR MATH Jimmy T. Arnold

Tecniche di Verifica. Introduction to Propositional Logic

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Mathematical Preliminaries. Sipser pages 1-28

ICS141: Discrete Mathematics for Computer Science I

1 Propositional Logic

Logic and Proofs. (A brief summary)


Propositional logic (revision) & semantic entailment. p. 1/34

Solutions to Problem Set 1

We have seen that the symbols,,, and can guide the logical

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

Propositional logic ( ): Review from Mat 1348

Transcription:

Foundation of proofs Jim Hefferon http://joshua.smcvt.edu/proofs

The need to prove

In Mathematics we prove things To a person with a mathematical turn of mind, the base angles of an isoceles triangle are equal seems obvious. b a if a = b then A = B A B Another example that comes naturally to someone with aptitude is, each positive integer factors into a product of primes.

In Mathematics we prove things To a person with a mathematical turn of mind, the base angles of an isoceles triangle are equal seems obvious. b a if a = b then A = B A B Another example that comes naturally to someone with aptitude is, each positive integer factors into a product of primes. But what about: in a right triangle the square of the length of the hypoteneuse is equal to the sum of the squares of the other two sides? Is that obvious, or does it require justification? A characteristic of our subject is that we are completely sure of new results because we show that they follow logically from things we ve already established.

Convincing is not enough These assertions seem convincing but turn out to be false.

Convincing is not enough These assertions seem convincing but turn out to be false. The polynomial n 2 + n + 41 appears to outputs only primes. n 0 1 2 3 4 5 6 7 n 2 + n + 41 41 43 47 53 61 71 83 97

Convincing is not enough These assertions seem convincing but turn out to be false. The polynomial n 2 + n + 41 appears to outputs only primes. n 0 1 2 3 4 5 6 7 n 2 + n + 41 41 43 47 53 61 71 83 97 However, that pattern eventually fails: for n = 41 the output 41 2 + 41 + 41 is divisible by 41.

Convincing is not enough These assertions seem convincing but turn out to be false. The polynomial n 2 + n + 41 appears to outputs only primes. n 0 1 2 3 4 5 6 7 n 2 + n + 41 41 43 47 53 61 71 83 97 However, that pattern eventually fails: for n = 41 the output 41 2 + 41 + 41 is divisible by 41. When decomposed, 18 = 2 1 3 2 has an odd number of prime factors (1 + 2 of them), while 24 = 2 3 3 1 has an even number (3 + 1 of them). We say that 18 is of odd type while 24 is of even type. n 1 2 3 4 5 6 7 8 9 type even odd odd even odd even odd odd even Pòlya conjectured that for any n > 1, the even types below it never outnumber the odd types.

Convincing is not enough These assertions seem convincing but turn out to be false. The polynomial n 2 + n + 41 appears to outputs only primes. n 0 1 2 3 4 5 6 7 n 2 + n + 41 41 43 47 53 61 71 83 97 However, that pattern eventually fails: for n = 41 the output 41 2 + 41 + 41 is divisible by 41. When decomposed, 18 = 2 1 3 2 has an odd number of prime factors (1 + 2 of them), while 24 = 2 3 3 1 has an even number (3 + 1 of them). We say that 18 is of odd type while 24 is of even type. n 1 2 3 4 5 6 7 8 9 type even odd odd even odd even odd odd even Pòlya conjectured that for any n > 1, the even types below it never outnumber the odd types. The first counterexample is 906 150 257.

Elements of logic

Propositions A proposition is an assertion that has a truth value, either true or false.

Propositions A proposition is an assertion that has a truth value, either true or false. These are propositions: 2 + 2 = 4 and Two circles in the plane intersect in either zero points, one point, two points, or all of their points.

Propositions A proposition is an assertion that has a truth value, either true or false. These are propositions: 2 + 2 = 4 and Two circles in the plane intersect in either zero points, one point, two points, or all of their points. These are not propositions: 3 + 5 and x is not prime.

Negation Prefixing a proposition with not inverts its truth value. The statement it is not the case that 3 + 3 = 5 is true, while it is not the case that 3 + 3 = 6 is false.

Negation Prefixing a proposition with not inverts its truth value. The statement it is not the case that 3 + 3 = 5 is true, while it is not the case that 3 + 3 = 6 is false. So the truth value of not P depends only on the truth of P.

Conjunction, disjunction A proposition consisting of the word and between two sub-propositions is true if the two halves are true. 3 + 1 = 4 and 3 1 = 2 is true 3 + 1 = 4 and 3 1 = 1 is false 3 + 1 = 5 and 3 1 = 2 is false

Conjunction, disjunction A proposition consisting of the word and between two sub-propositions is true if the two halves are true. 3 + 1 = 4 and 3 1 = 2 is true 3 + 1 = 4 and 3 1 = 1 is false 3 + 1 = 5 and 3 1 = 2 is false A compound proposition constructed with or between two sub-propositions is true if at least one half is true. 2 2 = 4 or 2 2 4 is true 2 2 = 3 or 2 2 4 is false 2 2 = 4 or 3 + 1 = 4 is true

Truth Tables Write P for not P, P Q for P and Q, and P Q for P or Q. We can describe the action of these operators using truth tables. P P F T T F P Q P Q P Q F F F F F T F T T F F T T T T T

Truth Tables Write P for not P, P Q for P and Q, and P Q for P or Q. We can describe the action of these operators using truth tables. P P F T T F P Q P Q P Q F F F F F T F T T F F T T T T T One advantage of this notation is that it allows formulas more complex than you could say in a natural language. For instance, (P Q) (P Q) is hard to express in English. Another advantage is that a natural language such as English has ambiguities but a formal language does not.

Exclusive or Disjunction models sentences meaning and/or such as sweep the floor or do the laundry. We would say that someone who has done both has satisfied the admonition. In contrast, Eat your dinner or no dessert, and Give me the money or the hostage gets it, and Live free or die, all mean one or the other, but not both. P Q P XOR Q F F F F T T T F T T T F

Implication We model if P then Q this way. P Q P Q F F T F T T T F F T T T (We will speak to some subtle aspects of this definition below.) Here, P is the antecedent while Q is the consequent.

Bi-implication We take P if and only if Q to mean the two have the same values, a number n is divisible by 5 if and only if the number n ends in 0 or 5. Mathematicians often write iff. P Q P Q F F T F T F T F F T T T

All binary operators We can list all of the binary logical functions. P Q P α 0 Q F F F F T F T F F T T F P Q P α 1 Q F F F F T F T F F T T T... P Q P α 15 Q F F T F T T T F T T T T

All binary operators We can list all of the binary logical functions. P Q P α 0 Q F F F F T F T F F T T F P Q P α 1 Q F F F F T F T F F T T T... P Q P α 15 Q F F T F T T T F T T T T These are the unary ones. P F T β 0 P F F P F T β 1 P F T P F T β 2 P T F P F T β 3 P T T

All binary operators We can list all of the binary logical functions. P Q P α 0 Q F F F F T F T F F T T F P Q P α 1 Q F F F F T F T F F T T T... P Q P α 15 Q F F T F T T T F T T T T These are the unary ones. P F T β 0 P F F P F T β 1 P F T P F T β 2 P T F P F T β 3 P T T A zero-ary operator is constant so there are two: T and F.

Evaluating complex statements No matter how intricate the propositional logic sentence, with patience we can calculate how the output truth values depend on the inputs. Here is the work for (P Q) (P R). P Q R P Q P R (P Q) (P R) F F F T T T F F T T T T F T F T T T F T T T T T T F F F F F T F T F T F T T F T F F T T T T T T The calculation decomposes the statement into its components P Q, etc., and then builds the truth table up from the simpler components.

Tautology, Satisfiability, Equivalence A formula is a tautology if it evaluates to T for every value of the variables. A formula is satisfiable if it evaluates to T for at least one value of the variables.

Tautology, Satisfiability, Equivalence A formula is a tautology if it evaluates to T for every value of the variables. A formula is satisfiable if it evaluates to T for at least one value of the variables. Two propositional expressions are logically equivalent if they have the same final column in their truth tables. For instance, P Q and Q P are equivalent.

Tautology, Satisfiability, Equivalence A formula is a tautology if it evaluates to T for every value of the variables. A formula is satisfiable if it evaluates to T for at least one value of the variables. Two propositional expressions are logically equivalent if they have the same final column in their truth tables. For instance, P Q and Q P are equivalent. An important example is that P Q and Q P are equivalent. P Q P Q Q P Q P F F T T T T F T T F T T T F F T F F T T T F F T

Discussion: our definition of implies For P Q everyone expects when P is true then Q will follow, so that if P is T but Q is F then the statement as a whole is F. What about the other cases? P Q P Q F F F T T F F T T Standard mathematical practice defines implication so that, for instance, this statement is true for all real numbers: (because x = p/q gives x 2 = p 2 /q 2 ). if x is rational then x 2 is rational

Discussion: our definition of implies For P Q everyone expects when P is true then Q will follow, so that if P is T but Q is F then the statement as a whole is F. What about the other cases? P Q P Q F F F T T T F F T T Standard mathematical practice defines implication so that, for instance, this statement is true for all real numbers: if x is rational then x 2 is rational (because x = p/q gives x 2 = p 2 /q 2 ). Taking x = 2 shows that we need F T to evaluate to T.

Discussion: our definition of implies For P Q everyone expects when P is true then Q will follow, so that if P is T but Q is F then the statement as a whole is F. What about the other cases? P Q P Q F F T F T T T F F T T Standard mathematical practice defines implication so that, for instance, this statement is true for all real numbers: if x is rational then x 2 is rational (because x = p/q gives x 2 = p 2 /q 2 ). Taking x = 2 shows that we need F T to evaluate to T. Take x = π to see that we need F F to yield T.

Discussion: our definition of implies For P Q everyone expects when P is true then Q will follow, so that if P is T but Q is F then the statement as a whole is F. What about the other cases? P Q P Q F F T F T T T F F T T T Standard mathematical practice defines implication so that, for instance, this statement is true for all real numbers: if x is rational then x 2 is rational (because x = p/q gives x 2 = p 2 /q 2 ). Taking x = 2 shows that we need F T to evaluate to T. Take x = π to see that we need F F to yield T. For T T take x = 1/2.

Discussion: our definition of implies For P Q everyone expects when P is true then Q will follow, so that if P is T but Q is F then the statement as a whole is F. What about the other cases? P Q P Q F F T F T T T F F T T T Standard mathematical practice defines implication so that, for instance, this statement is true for all real numbers: if x is rational then x 2 is rational (because x = p/q gives x 2 = p 2 /q 2 ). Taking x = 2 shows that we need F T to evaluate to T. Take x = π to see that we need F F to yield T. For T T take x = 1/2. The intuition is that P Q is a promise that if P holds then Q must hold also. If P doesn t hold, that is not a counterexample to the promise. If Q does hold, that is also not a counterexample.

Points about implication P Q P Q F F T F T T T F F T T T If the antecedent P is false then the statement as a whole is true, said to be vacuously true. If the consequent Q is true then the statement as a whole is true.

Points about implication P Q P Q F F T F T T T F F T T T If the antecedent P is false then the statement as a whole is true, said to be vacuously true. If the consequent Q is true then the statement as a whole is true. Thus, we take if Babe Ruth was president then 1 + 2 = 4 to be true, vacuously true. Similarly, we take if Mallory reached the summit of Everest then 1 + 2 = 3 to be true.

Points about implication P Q P Q F F T F T T T F F T T T If the antecedent P is false then the statement as a whole is true, said to be vacuously true. If the consequent Q is true then the statement as a whole is true. Thus, we take if Babe Ruth was president then 1 + 2 = 4 to be true, vacuously true. Similarly, we take if Mallory reached the summit of Everest then 1 + 2 = 3 to be true. In particular, our definition does not require that the antecedent P causes, or is in any way connected to, the consequent Q.

Points about implication P Q P Q F F T F T T T F F T T T If the antecedent P is false then the statement as a whole is true, said to be vacuously true. If the consequent Q is true then the statement as a whole is true. Thus, we take if Babe Ruth was president then 1 + 2 = 4 to be true, vacuously true. Similarly, we take if Mallory reached the summit of Everest then 1 + 2 = 3 to be true. In particular, our definition does not require that the antecedent P causes, or is in any way connected to, the consequent Q.

Points about implication P Q P Q F F T F T T T F F T T T If the antecedent P is false then the statement as a whole is true, said to be vacuously true. If the consequent Q is true then the statement as a whole is true. Thus, we take if Babe Ruth was president then 1 + 2 = 4 to be true, vacuously true. Similarly, we take if Mallory reached the summit of Everest then 1 + 2 = 3 to be true. In particular, our definition does not require that the antecedent P causes, or is in any way connected to, the consequent Q. Truth tables show that P Q is logically equivalent to (P Q), to P Q, and also to the contrapositive Q P.

Predicates, Quantifiers; complete statements Here is a typical mathematical statement (it happens to be false). If n is odd then n is a perfect square. ( ) It involves two clauses, n is odd and n is square. For each, the truth value depend on the variable n.

Predicates, Quantifiers; complete statements Here is a typical mathematical statement (it happens to be false). If n is odd then n is a perfect square. ( ) It involves two clauses, n is odd and n is square. For each, the truth value depend on the variable n. A predicate is a truth-valued function. An example is the function Odd that takes an integer as input and yields either T or F, as in Odd(5) = T. Another example is Square, as in Square(5) = F, that tells if the input is a perfect square.

Predicates, Quantifiers; complete statements Here is a typical mathematical statement (it happens to be false). If n is odd then n is a perfect square. ( ) It involves two clauses, n is odd and n is square. For each, the truth value depend on the variable n. A predicate is a truth-valued function. An example is the function Odd that takes an integer as input and yields either T or F, as in Odd(5) = T. Another example is Square, as in Square(5) = F, that tells if the input is a perfect square. A mathematician saying ( ) would mean that it holds for all n. We denote for all by the symbol, so the statement is written formally n N [ Odd(n) Square(n) ].

Predicates, Quantifiers; complete statements Here is a typical mathematical statement (it happens to be false). If n is odd then n is a perfect square. ( ) It involves two clauses, n is odd and n is square. For each, the truth value depend on the variable n. A predicate is a truth-valued function. An example is the function Odd that takes an integer as input and yields either T or F, as in Odd(5) = T. Another example is Square, as in Square(5) = F, that tells if the input is a perfect square. A mathematician saying ( ) would mean that it holds for all n. We denote for all by the symbol, so the statement is written formally n N [ Odd(n) Square(n) ]. A quantifier delimits for how many values of the variable the clause must be true, in order for the statement as a whole to be true. Besides for all we will also use there exists, denoted. The statement n N [ Odd(n) Square(n) ] is true.

Examples of statements written formally, with explicit quantifiers. Every number is divisible by 1. n N [ 1 n ]

Examples of statements written formally, with explicit quantifiers. Every number is divisible by 1. n N [ 1 n ] There are five different powers n where 2 n 7 is a perfect square. n 0,..., n 4 N [ (n 0 n 1) (n 0 n 2) (n 3 n 4) a 0 N(2 n 0 7 = a 2 0) a 4 N(2 n 4 7 = a 2 4) ]

Examples of statements written formally, with explicit quantifiers. Every number is divisible by 1. n N [ 1 n ] There are five different powers n where 2 n 7 is a perfect square. n 0,..., n 4 N [ (n 0 n 1) (n 0 n 2) (n 3 n 4) a 0 N(2 n 0 7 = a 2 0) a 4 N(2 n 4 7 = a 2 4) ] Any two integers have a common multiple. n 0, n 1 N m N [ (n 0 m) (n 1 m) ]

Examples of statements written formally, with explicit quantifiers. Every number is divisible by 1. n N [ 1 n ] There are five different powers n where 2 n 7 is a perfect square. n 0,..., n 4 N [ (n 0 n 1) (n 0 n 2) (n 3 n 4) a 0 N(2 n 0 7 = a 2 0) a 4 N(2 n 4 7 = a 2 4) ] Any two integers have a common multiple. n 0, n 1 N m N [ (n 0 m) (n 1 m) ] The function f : R R is continuous at a R. ε > 0 δ > 0 x R [ ( x a < δ) ( f(x) f(a) < ε) ]

Relation between and The negation of a statement is a statement. For instance, the negation of every raven is black is there is a raven that is not black.

Relation between and The negation of a statement is a statement. For instance, the negation of every raven is black is there is a raven that is not black. A mathematical example is that the negation of every odd number is a perfect square n N [ Odd(n) Square(n) ] is which is equivalent to this. n N [ Odd(n) Square(n) ] n N [ Odd(n) Square(n) ] Thus a person could show that every odd number is a perfect square is false by finding a number that is both odd and not a square.

Relation between and The negation of a statement is a statement. For instance, the negation of every raven is black is there is a raven that is not black. A mathematical example is that the negation of every odd number is a perfect square n N [ Odd(n) Square(n) ] is which is equivalent to this. n N [ Odd(n) Square(n) ] n N [ Odd(n) Square(n) ] Thus a person could show that every odd number is a perfect square is false by finding a number that is both odd and not a square. Similarly the negation of a statement is a statement.