The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a...

84
The Foundations: Logic and Proofs

Transcript of The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a...

Page 1: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

The Foundations: Logic and Proofs

Page 2: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.1 Propositional Logic

• Introduction• A proposition is a declarative sentence that is

either true or false, but not both.• Example 1: 1. Washington DC is the capital of the United

State.2. Toronto is the capital of Canada.3. 1+1=24. 2+2=4

Page 3: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example 2.1. What time is it?2. Read this carefully.3. x+1=24. x+y=z

Page 4: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• We use letters to denote propositional variables. The truth table of a proposition is true, denoted by T, if it is a true proposition and false, denoted by F, if it is a false proposition.

• The area of logic that deals with propositions is called propositional calculus or propositional logic.

Page 5: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• New propositions, called compound propositions, are formed from existing propositions using logical operators.

• Let p be a proposition. The negation of p, denoted by p (also denoted by ). Is the statement “It is not that case that p.”

• The proposition p is read “not p”. • The truth value of the negation of p, p , is the

opposite of the truth value of p.

p

p p

T F

F T

Page 6: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• The negation of a proposition can also be considered the result of the operation of the negation operator on a proposition. We will now introduce the logical operators that are used to form new propositions from two or more propositions. These logical operators are called connectives.

Page 7: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Let p and q be propositions. The conjunction of p and q, denoted by pq, is the proposition “p and q”. The conjunction pq is true when both p and q are true and is false otherwise.

p q pq

T T T

T F F

F T F

F F F

Page 8: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Let p and q be propositions. The disjunction of p and q, denoted by pq, is the proposition “p or q”. The disjunction p q is false when both p and q are false and is true otherwise.

p q pvq

T T T

T F T

F T T

F F F

Page 9: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Find the conjunction and the disjunction of the propositions p and q where p is the proposition “Today is Friday” and q is the proposition “It is raining today”.

Page 10: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition that is true when exactly one of p and q is true and is false otherwise.

p q pq

T T F

T F T

F T T

F F F

Page 11: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Conditional Statements

• Let p and q be propositions. The conditional statement pq is the proposition “if p, then q”. The conditional statement pq is false when p is true and q is false, and true otherwise.

• In the conditional statement pq, p is called hypothesis (or antecedent or premise) and q is called conclusion (or consequence).

Page 12: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• A conditional statement is also called an implication.

p q pq

T T T

T F F

F T T

F F T

Page 13: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

pq• “if p, then q”• “if p, q”• “p is sufficient for q”• “q if p”• “q when p”• “a necessary condition for p is q”• “q unless p”• “p implies q”• “p only if q”• “a sufficient condition for q is p”• “q whenever p”• “q is necessary for p”• “q follows from p”

Page 14: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Let p be the statement “Maria learns discrete mathematics” and q the statement “Maria find a good job.” Express the statement pq.

• If Maria learns discrete mathematics, then she will find a good job.

Page 15: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• pq.• The proposition qp is called the converse of

pq.• The contrapositive of pq is the proposition

q p.• The proposition p q is called the inverse of

pq.

Page 16: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Let p and q be propositions. The biconditional statement pq is the proposition “p if and only if q”. The biconditional statement p q is true when p and q have the same truth values, and is false otherwise.

• Biconditional statements are also called bi-implications.

p q pq

T T T

T F F

F T F

F F T

Page 17: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• “p is necessary and sufficient condition for q”• “if p then q, and conversely”• “p iff q”

• pq has the same truth value as (pq) (qp)

Page 18: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Truth Tables of Compounds Propositions

• Construct the truth table of the compound proposition (pq) (pq).

P q q pq p q (pq) (p q) T T F T T T

T F T T F F

F T F F F T

F F T T F F

Page 19: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Precedence of logical operatorsOperator Precedence

1

2

3

4

5

Page 20: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

•Applications

Page 21: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Translating English Sentences

• You can access the Internet from campus only if you are a computer science major or you are not a freshman.

• A: You can access the Internet from campus.• C: you are a computer science major .• F: you are a freshman.• A(CF)

Page 22: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

System Specifications

• Example: The automated reply cannot be send when the file system is full.

• p: the automated reply can be send• q: the file system is full• qp

Page 23: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• System specifications should be consistent, that is, they should not contain conflicting requirements that could be used to derived a contradiction.

Page 24: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Determine whether the system specifications are consistent:

1. The diagnosis message is stored in the buffer or it is retransmitted.

2. The diagnosis message is not stored in the buffer.3. If the diagnosis message is stored in the buffer, then it is

retransmitted. p: the diagnosis message is stored. q: the diagnosis message is retransmitted. pq, p, pq p is false and q is true

Page 25: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Can we add one more specification: The diagnosis message is not retransmitted.

• No

Page 26: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Boolean Searches

• Web page searching

Page 27: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Logic Puzzles

• Smullyan posed many puzzles about an island that has two kinds of inhabitants, knights, who always tell the truth, and the opposites, knaves, who always lie. You encounter two people A and B. What are A and B if A says “B is a knight” and B says “The two of us are opposite types”?

• Both A and B are knaves.• Try more?

Page 28: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Logic and Bit OperationsTruth value Bit

T 1

F 0

x y xy xy xy

0 0 0 0 0

0 1 1 0 1

1 0 1 0 1

1 1 1 1 0

Page 29: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings

01 1011 0110 and 11 0001 1101

Page 30: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.2 Propositional Equivalences

• A compound proposition that is always true is called a tautology. A compound proposition that is always false is called a contradiction. A compound proposition that is neither a tautology nor a contradiction is called a contingency.

• Example: pp is a tautology and pp is a contradiction.

Page 31: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• The compound propositions p and q are called logical equivalent if pq is a tautology. The notation pq denotes that p and q are logical equivalent.

• The symbol is sometimes used instead of to denote logical equivalence.

Page 32: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Show that (pq) and pq are logical equivalent

P q pq (pq) p q pq

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

Page 33: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Show that pq and pq are logical equivalent. • Show that p(qr) and (pq)(pr) are logical

equivalent.

Page 34: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Some important equivalences• Identity laws pTp pFp• Domination laws p TT p FF• Identity laws ppp ppp• Double negation law (p)p• Commutative laws pq qp pq qp

Page 35: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Associative laws p(qr) p(qr) p (qr) p (q r)• Distributive laws p(qr) (pq)(pr) p(qr) (pq)(pr)• De Morgan’s laws (pq) pq (p q) pq• Absorption laws p(p q) p p (pq) p• Negation laws pp T p p F

Page 36: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.3 Predicates and Qualifiers

• Predicate• Example: Let P(x) denote the statement “x>3”.

What are the truth values of P(4) and P(2)?• Example: Let A(x) denote the statement

“Computer x is under attack by and intruder.” Suppose that of the computers on campus, only CS2 and MATH1 are currently under attack by intruders. What are the truth values of A(CS1), A(CS2), and A(MATH1)?

Page 37: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• A statement of the form P(x1,x2,…,xn) is the value of the propositional function P at the n-tuple (x1,x2,…,xn), and P is also called a n-place predicate or a n-ary predicate.

• Propositional functions occur in computer programs. For example: “if x>0 then x:=x+1”. P(x) is “x>0”.

Page 38: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Quantifiers

• Many mathematical statements assert that a property is true for all values of a variable in a particular domain, caller the domain of discourse (or the universe of discourse), often just referred to as the domain.

Page 39: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• The universal quantification of P(x) is the statement “P(x) for all values of x in the domain”.

• The notation x P(x) denote the universal quantification of P(x).

• Here is called universal quantifier. • We read x P(x) as “for all x P(x)” or “for every x

P(x).” • An element for which P(x) is false is called a

counterexample of x P(x).

Page 40: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Let P(x) be the statement “x+1>x.” What is the truth value of the quantification x P(x), where the domain consists of all real numbers.

• Example: Let Q(x) be the statement “x<2.” What is the truth value of the quantification x Q(x), where the domain consists of all real numbers.

• Example: Suppose that P(x) is “ >0.” Show that P(x) is false by finding an counterexample.

2x

Page 41: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• The existential quantification of P(x) is the proposition “there exists an element x in the domain such that P(x)”. We use the notation x P(x) for the existential quantifier of P(x).

• Here is called existential quantifier.• The existential quantifier x P(x) is read as

“there is an x such that P(x),” “There is at least one x such that P(x)”. Or “For some x P(x).

Page 42: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Let P(x) denote the statement “x>3”. What is the truth value of the quantification x P(x), where the domain consists of all real numbers?

• Example: Let Q(x) denote the statement “x=x+1”. What is the truth value of the quantification x Q(x), where the domain consists of all real numbers?

• Example: What is the truth value of x P(x), where P(x) is the statement “ > 10” and the universe of discourse consists of positive integer not exceeding 4?

2x

Page 43: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Uniqueness quantifier

• The notation x P(x) [or 1x P(x)] states “There exists a unique x such that P(x) is true.”

Page 44: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Statements involving predicates and quantifiers are logical equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. We use the notation ST to indicate that two statements S and T involving predicates and quantifiers are equivalent.

Page 45: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• x (P(x) Q(x))x P(x) x Q(x).• De Morgan’s Laws for Quantifiers• x P(x)x P(x).• x P(x)x P(x).

Page 46: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Applications

Page 47: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.4 Nested Quantifiers

• Example: Assume that the domain for the variables x,y, and z consists of all real nembers. x y (x+y=y+x) (commutative law)

• x y (x+y =0) (additive inverse)• x y z (x+(y+z))=((x+y)+z) (associative law)

Page 48: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Translate into English the statement xy ((x> 0) (y<0)(xy<0)) where the domain for both variables consists

of all real numbers.

Page 49: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

The order of Quantifiers

Let the domain for x, y, and z are real numbers.xy (x+y=0) (True) xy (x+y=0) (False)x y (x+y=y+x)y x (x+y=y+x) x y z (x+y=z) (True)z x y (x+y=z) (False)

Page 50: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Negating Nested Quantifiers

• Example: Express the negation of the statement xy (xy=1) so that no negation precedes a quantifier.

• ( xy (xy=1))• x y(xy1)

Page 51: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.5 Rules of Inference

• An argument in propositional logic is a sequence of proposition. All but the final proposition in the argument are called premises and the final proposition is called conclusion. An argument is valid if the truth of all its premises implies that the conclusion is true.

• An argument form in propositional logic is a sequence of compound propositions involving propositional variables. An argument form is valid if no matter which particular propositions are substituted for the propositional variables in its premises, the conclusion is true if the premises are all true.

Page 52: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• p pq addition rule• Example. It is below freezing now.Therefore, it is either below freezing or raining

now.

Page 53: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• pq p simplification• Example. It is below freezing and rainng now.Therefore, it is either below freezing.

Page 54: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• [q(p q)] p modus tollens• [(p q) (q r)] (p r) Hypothetical syllogism• [(p q) p ] q Disjunctive syllogism• [(p ) (q)] (p q) Conjunction• [(p q) (p r)] (q r) Resolution

Page 55: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• x P(x) P( c ) (Universal instantiation)• P( c) for an arbitrary c x P(x) (Universal generalization)• x P(x) (Existential instantiation) P( c) for some arbitrary c• P( c) for some arbitrary c x P(x) ) (Existential generalization)

Page 56: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.6 Introduction to Proofs

• Some terminology• Theorem• Propositions• Axioms• Lemma• Corollary• conjecture

Page 57: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Understand How Theorems are stated

Page 58: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Methods of Proving Theorems• Direct proof• Proof by contraposition• Proof by contradiction

Mistakes in proofs

Page 59: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Direct Proofs

• Example. Given a direct proof of the theorem “If n is an odd integer then n2 is odd.”

• Example: Given a direct proof that if m and n are both perfect squares, then mn is also a perfect square.

Page 60: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Proof by Contraposition

• Example: Prove that n is an integer and 3n+2 is odd, then n is odd.

• Example: Prove that if n=ab, where a and b are positive integers, then an1/2 or bn1/2

Page 61: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Vacuous and trivial proofs

• Example: Show that the position P(0) is “If n>1, then n2>n” and the domain consists of all integers.

• Example: Let P(n) by “If a and b are positive integers with ab, then anbn,” where the domain consists of all integers. Show that P(0) is true.

Page 62: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

A little proof strategy

• Example: Proof that the sum of two rational numbers is rational.

Proof. Let r=p/q with q0 and s=t/u with u0. Then r+s=(pu+qt)/(qu).

• Example: Proof that if n is an integer and n2 is odd, then n is odd.

Page 63: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Proof by Contradiction

• Example: Show That at least four of any 22 days must fall on the same day of the week.

• Example: Prove that is irrational.• Example: Give a proof by contradiction of the

theorem “If 3n+2 is odd, then n is odd.”

2

Page 64: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Proofs of Equivalence

• Example: Proof the theorem “If n is a positive integer, then n is odd if and only if n2 is odd.

• Example: Show that these statements about integer n are equivalent

P1: n is even

P2: n-1 is odd

P3: n2 is even

Page 65: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Counterexamples

• Show that the statement “Every positive integer is the sum of the squares of two integers” is false.

3 is not the sum of the squares of two integers.

Page 66: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Mistakes in Proofs

Page 67: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

1.7 Proof Methods and Strategy

• Exhaustive Proof• Example: Prove that if n is a

positive integer with n4.• Example: Prove that the only consecutive

positive integers not exceeding 100 that are perfect powers are 8 and 9.

nn 3)1( 2

Page 68: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Proof by Cases

• Example: Prove that n is an integer, then n.• Example: Use the proof by cases to show that

|xy|=|x||y| where x and y are real numbers.

2n

Page 69: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Leveraging Proof by Cases

• Example: Formulate a conjecture about decimal digits that occur as the final digit of the square of an integer and prove this result.

• Example: Show that there is no solutions in integers x and y of . 83 22 yx

Page 70: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Existence Proof

• Example: A constructive existence proof. Show that there is a positive integer that can be written as the sum of cubes of positive integers in two ways.

3333 1129101729

Page 71: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Non constructive Existence Proof

• Example: Show that there exist irrational number x and y such that xy is rational.

• 21/2 is irrational• x=y=21/2

• If xy is rational, done• If xy is irrational, let X=xy.• Then Xy =2 is rational

Page 72: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Chomp is a game played by two player. In this game, cookies are laid out on a rectangular grid. The cookie in the top left is poisoned. The two players take turns making moves; at each move, a player is required to eat a remaining cookie, together with all cookies to the right and/or below it. The loser is the player who has no cookie but to eat the poisoned cookie. We ask whether one of the two players has the winning strategy.

Page 73: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.
Page 74: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.
Page 75: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.
Page 76: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Uniqueness Proofs

• Example. Show that if a and b are real numbers and a0, then there is a unique real number r such that ar+b=0.

• Existence• Uniqueness

Page 77: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Proof Strategies

• Forward and backward reasoning

• Example: Given two positive real numbers x and y, prove that the arithmetic means is greater than or equal to the geometric mean; i.e., .

2xy

yx

Page 78: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

.0)(

.02

.42

.4)(

.4)(

.2

2

22

22

2

2

yx

yxyx

xyyxyx

xyyx

xyyx

xyyx

Page 79: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Suppose that two people play a game taking turns moving one, two, or three stones at a time from a pile that begins with 15 stones. The person who removes the last stone wins the game. Show that the first player win the game no matter what the second player does.

Page 80: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Adapting Existing Proofs

• Example: Prove that is irrational. 3

Page 81: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

Looking for Counterexamples

• Example: The statement that “Every positive integer is the sum of two squares of integers” is not true by finding counterexamples. Yet, it is proved that “Every positive integer is the sum of three squares of integers”.

Page 82: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Exercise:• 1.1 27(f)• 1.2 28, 29• 1.3 12, 31, 35• 1.4 26, 27, 31

Page 83: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

• Example: Can we tile the standard chessboard using dominos?

• Example: Can we tile a board obtained by removing one of the corner squares of a standard chess board?

• Example: Can we tile a board obtained by deleting the upper left and the left lower corner squares of the corner squares of a standard chess board?

• Example: Can we use straight triominoes to a standard chess board?

• Example: Can we use straight triominoes to a standard chess board with one of its four corners removed?

Page 84: The Foundations: Logic and Proofs. 1.1 Propositional Logic Introduction A proposition is a declarative sentence that is either true or false, but not.

The Roles of Open Problems

• Fermat’s last theorem: The equation

has no solutions in integers x, y, and z with xyz0 whenever n is an integer with n>2.

• The 3x+1 conjecture: Let T to be the transformation that sends an even integer x to x/2 and odd integer x to 3x+1. For any positive integer x, when we repeatedly apply the transformation T, we will eventually reach the integer 1.

nnn zyx