mathacle pset ---- algebra, logic i. basics of propositional...

25
Mathacle PSet ---- Algebra, Logic Level ---- 2 Number ----- 1 Name: ___________________ Date: _______________ 1 I. BASICS OF PROPOSITIONAL LOGIC George Boole (1815-1864) developed logic as an abstract mathematical system consisting of propositions, operations (conjunction, disjunction, and negation), and rules for using the operations. The basic idea is that if simple propositions could be represented by precise symbols, the relation among the propositions could be associated as an algebraic equation. Therefore, certain types of reasoning are reduced to the manipulation of symbols. 1.1. Propositions A proposition is a declarative sentence that can be either true or false. It must be one or the other, and it cannot be both. An atomic proposition is the smallest statement or assertion that must be true or false. Letters P, , , , , , ... QRpqr , called the propositional variables , are usually used to denote the propositions, with the values of them either true (T) or false (F). Example 1.1.1. Identify if the following statements are propositions: P: “5 is a prime” p: the book is about math A1: Obama was the President [4]: “are you going out somewhere?” r: 2+3 1 C : I am a liar. Solution: Propositions: P: 5 is a primep: the book is about math A1: Obama was the President Non- propositions: [4]: “are you going out somewhere?” r: 2+3 1 C : I am a liar.

Upload: others

Post on 29-Jul-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

1

I. BASICS OF PROPOSITIONAL LOGIC

George Boole (1815-1864) developed logic as an abstract mathematical system

consisting of propositions, operations (conjunction, disjunction, and negation), and rules

for using the operations. The basic idea is that if simple propositions could be represented

by precise symbols, the relation among the propositions could be associated as an

algebraic equation. Therefore, certain types of reasoning are reduced to the manipulation

of symbols.

1.1. Propositions

A proposition is a declarative sentence that can be either true or false. It must be one or

the other, and it cannot be both. An atomic proposition is the smallest statement or

assertion that must be true or false.

Letters P, , , , , , ...Q R p q r , called the propositional variables , are usually used to denote

the propositions, with the values of them either true (T) or false (F).

Example 1.1.1. Identify if the following statements are propositions:

P: “5 is a prime”

p: the book is about math

A1: Obama was the President

[4]: “are you going out somewhere?”

r: 2+3

1C : I am a liar.

Solution:

Propositions:

P: “5 is a prime”

p: the book is about math

A1: Obama was the President

Non- propositions:

[4]: “are you going out somewhere?”

r: 2+3

1C : I am a liar.

Page 2: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

2

1C can not have either T or F, though it looks like a proposition. It is called a paradox.

Example 1.1.2. Identify if the following statements are propositions:

:p “Drilling for oil caused dinosaurs to become extinct.”

:q “Look out!”

:r “How far is it to the next town?”

:1P “x + 2 = 2x”

:2P “x + 2 = 2x when x = −2”

:3P The Earth is further from the sun than Venus.

:4P There is life on Mars.

:5P 2 × 2 = 5.

Solution:

p is a proposition.

q is not a proposition.

r is not a proposition.

1P is not a proposition.

2P is a proposition.

3P is a proposition.

4P is a proposition.

5P is a proposition.

1.2. Logic Operators or Connectives

The connectives for propositions are

~ : negation

: and (conjunction)

: or (disjunction)

: implication

: equivalence

Propositional formulas are constructed from atomic propositions by using the

connectives.

Page 3: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

3

Example 1.2.1. Let

:p ”Tomorrow is Saturday”

:q ”Tomorrow is sunny”

:t “Tomorrow is a beach day”

Find

:~ p ________________________

:qp ________________________

:~~ tp ________________________

:tq ________________________

Solution:

:~ p ”Tomorrow is not Saturday”

:qp ”Tomorrow is Saturday and sunny”

:~~ tp ”Tomorrow is not Saturday or not a beach day”

:tq ”If tomorrow is sunny, then tomorrow is a beach day”

The well-formed formulas (wff) are obtained by using the construction rules:

An atomic proposition is a wff.

If is a wff, then so is ~ .

If and are wff, then so are , , , and .

If is a wff, then so is .

1.3. Truth Tables

A truth table shows whether a propositional formula is true or false for each possible

truth assignment. Truth tables for the five basic connectives are:

Page 4: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

4

p ~ p

F T

T F

p q p q p q p q p q

F F F F T T

F T F T T F

T F F T F F

T T T T T T

Notice that the only case the implication p q is false is when p is true and q is false. If

p is false, then the implication p q is true.

This is like to say the following statement is true:

p: “If horses have wings, then elephants can dance”

There are two possible truths tables for the implication p q when p is false:

p q

1T ( p q ) 2T ( p q ) 3T ( q ) 4T Comments

F F F T F T casethisforsurenot

F T F F T T casethisforsurenot

T F F F F F casethisforfalse

T T T T T T casethisfortrue

If 1T is used, then p q would have the same table as p q ; If 2T is used, then

p q would have the same table as p q ; If 3T is used, then p q would have the

same table as q . So, 4T is a reasonable choice.

In the form of Boolean variables:

Page 5: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

5

p ~ p

1 0

0 1

p q p q p q p q p q

0 0 0 0 1 1

0 1 0 1 1 0

1 0 0 1 0 0

1 1 1 1 1 1

1.4. Identity Or Equivalence

Two compound propositions p and q are logically equivalent if the columns in a truth

table giving their truth values agree. The equivalence is written as p ≡ q.

A proposition is

a tautology, if it is always true. Example: ~p p .

a contradiction, if it is always false. Example: ~p p

a satisfiable, if its truth table contains true at least once. Example: p q .

a contingency, if it is neither a tautology nor a contradiction. Example: p

Example 1.4.1. Prove Implication Identity ~p q p q .

Solution: p q p q p~ qp~

0 0 1 1 1

0 1 1 1 1

1 0 0 0 0

1 1 1 0 1

Since the truth tables for p q and qp~ are the same, then ~p q p q .

Page 6: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

6

Example 1.4.2. Translate the following sentences into logic.

a.) Only THS students can have IDT.

b.) You cannot ride the roller coaster if you are under 4 feet tall unless you are older than

16 years old.

c.) You can access the info website from school only if you take AP Calculus or you are

not a freshman.

Solution:

a.). Let

p : You are a THS student

q : Students have IDT

Then pq . That is, the statement is equivalent to “The students who can have IDT are

THS students.”

b.) Let

p : You ride roller coaster

q : You are under 4 feet

r : You are older than 16 years old

Then prq ~)~( or )(~ rqp .

c.) Let

a : You access info website

c : You take AP Calculus

f : You are a freshman

Then )~( fca or afc ~)(~ .

Page 7: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

7

Example 1.4.3. Equivalence Identity p q p q q p

Solution:

p q p q pq qp )()( pqqp

0 0 1 1 1 1

0 1 1 0 0 0

1 0 0 1 0 0

1 1 1 1 1 1

The values for the qp and )()( pqqp are the same.

In mathematical term for proofs, this is often stated as “if and only if”, “iff” or

“necessary and sufficient conditions”:

Q P : “P is necessary for Q”, or P if Q

P Q : “P is sufficient for Q”, or P only if Q

P Q : “P is necessary and sufficient for Q, or P is true iff Q is true”

For example, let

p : I will take the exam

q : I am not sick

Then the sentence “I will take the exam if and only if I am not sick.” is qp .

Example 1.4.4. Equivalence of Implication and its Contrapositive

~ ~p q q p

Solution: p q p q q~ p~ pq ~~

0 0 1 1 1 1

0 1 1 0 1 1

1 0 0 1 0 0

1 1 1 0 0 0

Page 8: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

8

Example 1.4.5. DeMorgan’s Laws qpqp ~~)(~ and qpqp ~~)(~

Solution:

p q p~ q~ qp qp )(~ qp qp ~~ )(~ qp qp ~~

0 0 1 1 0 0 1 1 1 1

0 1 1 0 1 0 0 0 1 1

1 0 0 1 1 0 0 0 1 1

1 1 0 0 1 1 0 0 0 0

Example 1.4.6. Law of Syllogism or Transitivity ( )p q q r p r

It can also be written as

p q

q r

p r

Solution:

p q r qp rq )()( rqqp rp )())()(( rprqqp

0 0 0 1 1 1 1 1

0 0 1 1 1 1 1 1

0 1 0 1 0 0 1 1

0 1 1 1 1 1 1 1

1 0 0 0 1 0 0 1

1 0 1 0 1 0 1 1

1 1 0 1 0 0 0 1

1 1 1 1 1 1 1 1

Page 9: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

9

Example 1.4.7. Exclusive OR (xor) of p and q , denoted as qp , is defined as

p q qp

0 0 0

0 1 1

1 0 1

1 1 0

It means that p and q are different. Prove )(~)( qpqpqp .

Solution:

p q qp )(~ qp )(~)( qpqp qp

0 0 0 1 0 0

0 1 1 1 1 1

1 0 1 1 1 1

1 1 1 0 0 0

An argument, constructed from premises which are sets of two or more atomic

propositions, yields another proposition known as the conclusion.

Example 1.4.8. The following statements were from Lewis Carroll’s puzzle. Draw the

conclusion if the following statements are given:

]1[ All the dated letters in this room are written on blue paper.

]2[ None of them are in black ink, except those that are written in the 3rd person.

]3[ I have not filed any of those that I can read.

]4[ None of those that are written on one sheet are undated.

]5[ All of those that are not crossed out are in black ink.

]6[ All of those that are written by Brown begin with “Dear Sir.”

]7[ All of those that are written on blue paper are filed.

]8[ None of those that are written on more than one sheet are crossed out.

]9[ None of those that begin with “Dear sir” are written in the 3rd person.

Conclusion: ___________________________________

Page 10: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

10

Solution:

Rewrite the premises from the given information:

1P letter is a dated letter.

2P letter is written on blue paper.

3P letter is written in black ink.

4P letter is written in the 3rd person.

5P letter is a readable letter.

6P letter is written on one sheet.

7P sentences are crossed out.

8P letter is written by Mr. Brown.

9P better is beginning with “Dear Sir”.

10P letter is filed.

Then

1. 21 PP premise [1]

2. 43 PP premise [2]

3. 10~5 PP premise [3]

4. 16 PP premise [4]

5. 37~ PP premise [5]

6. 98 PP premise [6]

7. 102 PP premise [7]

8. 7~6~ PP premise [8]

9. 4~9 PP premise [9]

10. 3~4~ PP from 2., Contrapositive

11. 73~ PP from 5., Contrapositive

12. 67 PP from 7., Contrapositive

13. 510~ PP from 3., Contrapositive

Now cascading all the givens:

14. 5~1021673~4~98 PPPPPPPPPP

Or simply

5~8 PP

Conclusion: Mr. Brown’s letters are unreadable.

Page 11: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

11

II. PROOFS

2.1. Testing an Argument

The following is the procedure to check if an argument is valid or not:

Identify the premises 1 2, , , np p p , and the conclusion cq .

Construct a true table for 1 2, , , np p p , cq and 1 2 n cp p p q .

If there is one line such that 1 2 n cp p p q is false, then the argument is

invalid.

Another way to think this is to look for all specific rows, called critical rows, where the

premises 1 2, , , np p p are all true. If the conclusion is false in a critical row, then the

argument is invalid. Otherwise, the argument is valid.

In logic, the words “true” and “valid” have very different meanings - truth is about the

statements making up an argument, and validity is about whether the conclusion follows

from the premises.

Example 2.1.1. Determine whether the arguments are valid:

“If I get into the THS Academic Research internship, then I don’t go to regular classes. If

I don’t go to regular classes, then I will be well prepared for college. Therefore, if I get

into the THS academic Research internship or I don’t go to regular classes, I will be well

prepared for college.”

Solution:

:p “I get into the THS Academic Research internship”

q : “I don’t go to regular classes”

r : “I will be well prepared for college”

In the wff form:

p q

q r

------------------ p q r

Page 12: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

12

Construct the truth table:

p q r

1( )p q p 2( )q r p p q ( )cp q r q Notes

0 0 0 1 1 0 1 Critical

0 0 1 1 1 0 1 Critical

0 1 0 1 0 1 0

0 1 1 1 1 1 1 Critical

1 0 0 0 1 1 0

1 0 1 0 1 1 1

1 1 0 1 0 1 0

1 1 1 1 1 1 1 Critical

Notice that all critical rows have a true conclusion and thus the argument is valid.

Example 2.1.2. Determine whether the arguments are valid:

“Robbery was the motive for the crime only if the victim had money in his pockets. But

robbery or vengeance was the motive for the crime. Therefore, vengeance must have

been the motive for the crime.”

Solution:

:p “robbery was the motive for the crime”

q : “the victim had money in his pockets”

r : “vengeance was the motive for the crime”

In the wff form:

p q

p r

------------------ r

p q r

1( )p q p 2( )p r p ( )cr q Notes

0 0 0 1 0 0

0 0 1 1 1 1 Critical

0 1 0 1 0 0

0 1 1 1 1 1 Critical

1 0 0 0 1 0

Page 13: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

13

1 0 1 0 1 1

1 1 0 1 1 0 Critical

1 1 1 1 1 1 Critical

It is not a valid argument.

2.2. Valid Forms

a.) Modus Ponens (affirm by affirming or the law of detachment)

Modus Ponens can symbolically be expressed as

p

p q

q

which is equivalent to the argument statement:

p q p q

The truth table for the above statement is

p q p q p q p p q p q

F F T F T

F T T F T

T F F F T

T T T T T

The argument is always true. That is, it is a tautology. Therefore, the argument is valid.

Page 14: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

14

Example 2.2.1. Determine whether the following argument is valid or invalid.

“If it’s after midnight, then I must go to sleep.”

“It is after midnight.”

--------------------------

“I must go to sleep.”

Solution: Let

:p “It is after midnight”

q : “I must go to sleep.”

Then

[1] p q 1st Premise

[2] p 2nd Premise

-----------------

q MP

The argument is valid.

b.) Modus Tollens (deny by denying)

~

~

q

p q

p

c.) Disjunctive Syllogism ~ p

p q

q

d.) Generalization

p

p q

Page 15: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

15

e.) Specialization

p q

p

If argument contains three or more premises, it will be necessary to take the conjunction

of all of them. To avoid the inconvenience of writing long truth tables, some of the valid

forms can be used to show an argument valid. To show that an argument is invalid, an

assignment of truth values for components that makes all the premises true and the

conclusion false.

Example 2.2.2. Determine whether the following argument is valid or invalid.

“If tomorrow is Saturday and sunny, then it is a beach day.”

“Tomorrow is Saturday.”

“Tomorrow is not a beach day.”

--------------------------

“Tomorrow must not be sunny.”

Solution: Let

t “Tomorrow is Saturday”

s “Tomorrow is sunny”

b “Tomorrow is a beach day”

then

1. t s b 1st premise

2. t 2nd premise

3. ~ b 3rd premise

4. ~ t s 1,3 Modus Tollens

5. ~ s ~ t DeMorgan’s Laws

6. ~ s 2, 5, Disjunctive Syllogism

Example 2.2.3. Determine whether the following argument is valid or invalid.

It is not sunny this afternoon and it is colder than yesterday.

We will go swimming only if it is sunny.

If we do not go swimming, then we will take a canoe trip.

If we take a canoe trip, then we will be home by sunset.

--------------------------

We will be home by sunset.

Page 16: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

16

Solution:

p “it is sunny this afternoon”

q “it is colder than yesterday”

r “we will go swimming”

s “we will take a canoe trip”

t ” we will be home by sunset”

then

1. ~ p q 1st premise

2. ~ p Simplification

3. r p 2nd premise

4. ~ r 2,3, Modus tollens

5. ~ r s 3rd premise

6. s 4, 5, Modus ponens

7. s t 4th premise

8. t 6, 7, Modus ponens

Page 17: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

17

III. FIRST-ORDER LOGIC

3.1. Predicate

A constant or value is an object in a set called the domain or universe of discourse. A

variable can denote any object in the universe of discourse. A predicate or propositional

function is a function that a variable or a finite collection of variables can have.

A predicate becomes a proposition when specific values are assigned to the variables.

1 2p( , , , )nx x x is called a predicate of n variables or n arguments. A predicate can also

become a proposition by quantification.

In predicate logic, each predicate is given a name, which followed by the list of

arguments. It involves quantities like “some” and “all.”

Example 3.1.1. For an equation 1y x , the predicate for the equation is

p( , )x y : “ 1y x ”

p(1,2) is true and p(2,1) is false.

Example 3.1.2. A student is a senior at THS. The predicate can be formed as

s( )x : “ x is a senior at THS”

If Matt is a senior at THS and Grace is a senior at CHS, then s(Matt) is true and

s(Grace) is false. The predicate can also be formed as

n( , )x y : “ x is a senior at y ”

In this case, n(Matt,THS) is true, n(Grace,CHS) is true also.

3.2. Quantification

The universal quantification of ( )P x is the proposition written in logical notation as:

( )xp x : “ p( )x is true for all values x in the universe”

or sometimes it can be written as

Page 18: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

18

, ( )x U p x

Where U is called the universe of discourse, the set from which the variables can take

values.

If 1 2{ , , , }nx x x x is the domain, then

1 2( ) ( ) ( ) ( )nxp x p x p x p x

A counterexample for ( )xp x is that there is a t U such that p( )t is false.

The existential quantification of p( )x is the proposition written in logical notation as:

( )xp x : “There exists an element in the universe discourse such that p( )x is true.”

If 1 2{ , , , }nx x x x is the domain, then

1 2( ) ( ) ( ) ( )nxp x p x p x p x

An assertion involving predicates is valid if it is true for every element in the universe of

discourse.

An assertion involving predicates is satisfiable if there is a universe and interpretation for

which the assertion is true.

Example 3.2.1. If the universe of discourse is {1,2,3}U , then

xp( ) (1) (2) (3)x p p p

xp( ) (1) (2) (3)x p p p

Example 3.2.2. Assume {1,2,3}U and the predicate is

p( ) :x 2 2x x

Then, what are the meanings of ( )xP x and ( )xP x ? Decide if they are true or false.

Page 19: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

19

Solution:

( )xP x : “For every {1,2,3}x , 2 2x x .” The proposition is false.

( )xP x : “There exists {1,2,3}x such that 2 2x x .” The proposition is true.

Example 3.2.3. Assume the following predicates with {All animals}U

F( )x : “ x is a fox”

S( )x : “ x is a sly”

T( )x : “ x is trustworthy”

Quantify the following statements:

a.) Everything is a fox.

b.) All foxes are sly.

c.) If any fox is sly, then it is not trustworthy.

Solution:

a.). xF( )x .

b.) x[F( ) S(x)]x

c.) x[F( ) S(x) ~ T(x)] ~ x[F(x) S(x) T(x)]x

3.3. Multiple Quantifiers

Example 3.3.1. Suppose ( , )P x y is “ 1xy ”, the universe of discourse for x is the set of

positive integers, and universe of discourse for y is all real numbers. Quantify

a.) For every positive integer x and for every real number y , 1xy .

b.) For every positive integer x , there exists a real number y such that for every positive

integer x , 1xy .

Page 20: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

20

c.) There exists a real number y such that, for every positive integer x , 1xy .

Solution:

a.) ( , )x yP x y , false.

b.) ( , )x yP x y , true.

c.) ( , )y xP x y , false.

The order of quantifiers is important; they may not commute. For example,

( , ) ( , )x yP x y y xP x y

( , ) ( , )x yP x y y xP x y

but

( , ) ( , )x yP x y y xP x y

The only cases in which commutativity holds are the cases in which both quantifies are

the same.

Example 3.3.2. ( , )P x y is “ x is a citizen of y .” Q( , )x y is “ x lives y .” The universe of

discourse for x is the set of all people and the universe of discourse for y is the set of US

states. Quantify the following statements:

a.) All people who live in Florida are citizens of Florida.

b.) Every state has a citizen who does not live in that state.

Solution:

a.) [ ( ,Florida) P(x,Florida)]x Q x

b.) [P(x, y) ~ Q(x, y)]y x

Page 21: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

21

3.4. Arguments

Universal Instantiation (UI )

( )

( )

xP x

P c

Example 3.4.1. Universe of discourse consists of all dogs, and Fido is a dog.

“ All dogs are cuddly.”

“Therefore, Fido is cuddly.”

Universal Generalization (UG)

( )P c for an arbitrary c

( )xP x

This is often implicitly used in mathematical proofs.

Existential Instantiation (EI)

( )xP x

( )P c for some element c

Example 3.4.2. Universe of discourse consists of all students in the course.

“ There is someone who got an A in the course.”

“Let’s call her a and say that a got an A.”

Existential Generalization (EG)

( )P c for some element c

( )xP x

Page 22: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

22

Example 3.4.3. Universe of discourse consists of all students in the class.

“ Michelle got an A in the class.”

“Therefore, someone got an A in the class.”

Modus Ponens (MP)

[ ( ) ( )]

( )

( )

x P x Q x

P a

Q a

Modus Tollens (MT)

[ ( ) ( )]

~ Q( )

~ ( )

x P x Q x

a

P a

Hypothetical Syllogism (HS)

[ ( ) ( )]

[Q( ) ( )]

[ ( ) ( )]

x P x Q x

x x R x

x P x R x

Example 3.4.4.

a.)

[bird( ) ( )]

( )

( )

x x fly x

bird koko

fly koko

b.)

[bird( ) ( )]

~ fly( )

~ ( )

x x fly x

koko

bird koko

c.)

Page 23: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

23

[bird( ) ( )]

[fly( ) _ ( )]

[bird( ) _ ( )]

x x fly x

x x has wings x

x x has wings x

Example 3.4.5.

“Every man has two legs”

“John Smith is a man”

“Therefore, John Smith has two legs”.

Solution: Let U, the universe of discourse, be the people, and John Smith j U . And let

( )M x : “ x is a man”

L( )x : “ x has two legs”

then

1. ( ) ( )x M x L x 2nd premise

2. (j) (j)M L UI from (1)

3. (j)M 1st premise

4. (j)L MP from (2) and (3)

Example 3.4.6. (Lewis Carroll’s puzzle)

“All babies are illogical”

“Nobody is despised who can manage a crocodile”

“Illogical persons are despised”

What is the consequence?

Solution: Let U, the universe of discourse, be the people. And also let

B( )x : “ x is a baby”

M( )x : “ x can manage a crocodile”

L( )x : “ x is logical”

D( )x : “ x is despised”

then

Page 24: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

24

1.. x B( ) ~ L(x)x 1st premise

2. x M( ) ~ D(x)x 2nd premise

3. x ~ L( ) D(x)x 3rd premise

4. x B( ) D(x)x HS from (1) and (3)

5. x D( ) ~ (x)x M Contrapositive from (2)

6. x B( ) ~ (x)x M HS from (2) and (5)

Conclusion: If a person can manage a crocodile, then the person is not a baby.

Example 3.4.7.

“A student in this class has not read the book”

“Everyone in this class passed the first exam”

“Therefore, someone who passed the first exam has not read the book”

Solution: Let U, the universe of discourse, be the people in the class. And also let

C( )x : “ x is in this class”

B( )x : “ x has read the book”

P( )x : “ x has passed the first exam”

In the wff form:

x C(x) ~ B( )x

x C(x) ( )P x

-----------

x P(x) ~ B(x)

Proof

1. x C(x) ~ B( )x 1st premise

2. C(s) ~ B(s) EI from (1)

3. C(s) Simplification from (2)

4. x C(x) ( )P x 2nd premise

5. C(s) P(s) UI from (3)

6. P(s) MP from (3) and (5)

Page 25: Mathacle PSet ---- Algebra, Logic I. BASICS OF PROPOSITIONAL LOGICmathacle.com/MathPSet/Stats/Mathacle_PSet_Algebra_Logic_level_2_1.pdf · Mathacle PSet ---- Algebra, Logic Level

Mathacle

PSet ---- Algebra, Logic

Level ---- 2

Number ----- 1

Name: ___________________ Date: _______________

25

7. ~ ( )B s Simplification from (2)

8. P(s) ~ B(s) Conjunction of (6) and (7)

9.) x P(x) ~ B(x) EG from (8)