logic. statements, connectives, and quantifiers in symbolic logic, we only care whether statements...

48
Logic

Upload: roderick-parrish

Post on 20-Jan-2016

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Logic

Page 2: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Statements, Connectives, and Quantifiers

In symbolic logic, we only care whether statements are true or false – not their content.

In logic, a statement or a proposition is a declarative sentence that is either true or false.

We often represent statements by lowercase letters such as p, q, r or s.

Page 3: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Examples of statements:

Today is WednesdayToday is Wednesday

2 + 2 = 42 + 2 = 4

Kobe Bryant will play in the Super BowlKobe Bryant will play in the Super Bowl

Chris Bosh plays for the Toronto RaptorsChris Bosh plays for the Toronto Raptors

Page 4: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Examples of non-statements:

What day is today? - this is not a declarative statement – it is a question.

Come here – this is a command.

This statement is false – this is a paradox. It cannot be either true or false. Why?

That was a good movie – this is an ambiguous sentence – there may be no agreement on what makes a movie good.

Page 5: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

TryClassify each of the following sentences as a statement or not

a statement.

1. When is your next class?

2. That was a hard test!

3. Four plus three is eight.

4. Gordon Campbell is a great Premier.

5. Vancouver is the capital of BC.

6. Is Vancouver the capital of BC?

Page 6: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Value

Because we deal only with statements that Because we deal only with statements that can be classified as “can be classified as “true” or “” or “false”, we ”, we can assign a can assign a truth value to a statement to a statement p..

We use T to represent the value “true” and F to represent the value “false”.

Page 7: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Compound Statements

A compound statement may be formed by combining two or more statements or by negating a single statement.

Example:

Today is not Tuesday.

Nanaimo has no mayor but Victoria has one.

.

Page 8: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives

The words or phrases used to form compound statements are called connectives..

Some of the connectives used in English are:

Or; either…or; and; but; if…then.

Page 9: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Compound Statements

Decide whether each statement is compound.

1.1. If Jim wrote the test, then he passed.If Jim wrote the test, then he passed.

2. The car was fixed by Jack and Jill..

3.3. He either brought it to your house or he sent it to school.He either brought it to your house or he sent it to school.

4. Craig loves Math and Psychology..

Page 10: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives

The connectives used in logic generally fall into five categories:

NegationConjunctionDisjunctionConditionalBiconditional

Page 11: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Negations

The negation of a given statement p is a statement that is true when p is false and is false when p is true.

We denote the negation of p by ~p.

Example:- p: Victoria is the capital of BC

~p: Victoria is not the capital of BC.

Page 12: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

ConnectivesNegation Example:

Page 13: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

QuantifiersA quantifier tells us “how many” and fall

into two categories.

Universal quantifiers

Existential quantifiers

Page 14: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Quantifiers

Page 15: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Quantifiers

Page 16: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Negating Quantifiers Suppose we want to negate the statement “All

professional athletes are wealthy.” (universal)

Correct: “Some athletes are not wealthy” or “Not all athletes are wealthy.” (both existential)

Incorrect: “All athletes are not wealthy.” (universal)

Page 17: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Negating Quantifiers Negate the statement “Some students will get a

scholarship.” (existential)

Correct: “No students will get a scholarship.” (universal)

Incorrect: “Some students will not get a scholarship.” (existential)

Page 18: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Negating Quantifiers

Write a negation of each statement.

1. The flowers are not watered.

2. Some people have all the luck.

3. Everyone loves a winner.

4. The Olympics will start on 12th February.

5. Everybody loves somebody sometime.

6. All the balls are red.

7. Some students did not write the test.

Page 19: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Negating Inequalities

Page 20: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives

Example:

Page 21: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives

Example:

Page 22: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives

DEFINITION Conditional

A conditional or an implication expresses the notion of if … then. We use an arrow, , to represent a conditional.

Example:Suppose that p represents “The Raptors win the NBA Playoffs” and

q represents “Bosh will win the MVP”.

We would read the statement p q as “If The Raptors win the Play-

offs, then Bosh will win the MVP.

Write the statement “If The Raptors do not win the Playoffs, then

Bosh will not win the MVP symbolically. ~p ~q

Page 23: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives - Conditional

We read p q as “p implies q” or

“if p, then q”.

In the conditional p q, the statement p is

the antecedent or hypothesis, while q is the

consequent or conclusion.

Page 24: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives - Conditional

Examples:

If it rains, then I carry my umbrella.

If US President Obama comes to the Olympics, then

security will be tight.

If the package does not arrive today, I will call to find out

why.

Page 25: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives - Conditional

Examples:

Statement: All equilateral triangles have acute

angles.

If-then form: If a triangle is equilateral, then it has

acute angles.

Page 26: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives - Conditional

Try: Write each statement in if-then form.

1. “Winners never quit”

2. It is difficult to study when you are distracted.

If you are a winner, then you never quit.

If you are distracted, then it is difficult to study.

Page 27: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Connectives - Conditional

Given p: “I have a Math test”

q: “I do not have time for breakfast”

Write the following statements in symbolic form:

1. If I have time for breakfast, then I have a Math test.

2. If I have a Math test, then I do not have time for breakfast.

3. If I don’t have a Math test, then I have time for breakfast.

Page 28: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Tables

Truth tables are often used to show all possible true-false

patterns for statements.

For example, when statement p is true, ~p is false and

when p is false, ~p is true. Thus the truth table for negation

is given byStatement

p

Negation

~p

T F

F T

Page 29: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Table for the Conjunction p and q

Let us decide on the truth values of the conjunction

. Recall that a conjunction represents the idea of

“both”.

The compound statement 2 + 2 = 4 and Victoria is the capital

of BC is true because each component statement is true.

However, the compound statement 2 + 2 = 4 and Vancouver

is the capital of BC is false, even though part of the

statement is false.

qp

Page 30: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Table for the Conjunction p and q

For the conjunction to be true, both p and q must

be true. The truth table for the conjunction is given below.

qp

qp p and q

P q

T T TT F FF T FF F F

qp

Page 31: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Table for the Disjunction p or q

Let us decide on the truth values of the disjunction

. Recall that a disjunction represents the idea of

“either”.

The compound statement: I have a quarter or I have a dime

is true whenever I have either a quarter, a dime, or both.

The only way this disjunction could be false would be if I

had neither a quarter nor a dime.

qp

Page 32: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Table for the Disjunction p or q

For the disjunction to be false, both p and q must

be false. The truth table for the disjunction is given below.

qp p or q

P q

T T TT F TF T TF F F

qp

qp

Page 33: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Tables

Example: Let p: “5 > 3” and q: “ - 3 > 0”.

Find the truth value of:

1.

2.

3.

qp

qp

qp ~

Page 34: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Tables

Example: Suppose that p is false, q is true and r is false.

What is the truth value of the compound statement

(Parentheses first)?

1.

2.

rqp ~~

rqp ~~

Page 35: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Truth Tables

Example: Let p: “3 > 2”, q: “ 5 < 4” and r: 3 < 8.

Determine whether each statement is true or false.

1.

2.

3.

qp ~~

qp ~

pqrp ~~~

~ p is false so the and is false.

p is true and q is false so is false and hence the statement is TRUE.

qp

Page 36: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Constructing Truth Tables

Consider the statement .

a) Construct a truth table.

b) Suppose both p and q are true. Find the truth value of the statement.

We begin by listing all possible combinations of truth values

for p and q. We then list the truth values of ~p

qqp ~~

p q ~pT T FT F FF T TF F T

Page 37: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Constructing Truth Tables qqp ~~ p q ~p

T T F

T F F

F T T

F F T

Now we use the columns for ~p and q along with the and truth table to find the truth values of . qp ~

p q ~pT T F FT F F FF T T TF F T F

qp ~

Page 38: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Constructing Truth Tables qqp ~~

Finally, we include a column for ~q and use the or truth table to combine with ~q. qp ~

p q ~p

T T F F

T F F F

F T T T

F F T F

qp ~

p q ~p ~q

T T F F F F

T F F F T T

F T T T F T

F F T F T T

qp ~ qqp ~~ b) When both p and q are true, the statement is FALSE.

Page 39: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Constructing Truth Tables

TRY: Construct truth tables for

a)

b)

What do you observe?

They have the same truth values.

qp ~~

qp ~

p q

T T FT F FF T FF F T

qp ~~

Page 40: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Lady or the Tiger

p~

Page 41: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Lady or the Tiger

p~

Page 42: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Lady or the Tiger

p~

Page 43: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Island of Questioners

Page 44: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Island of Questioners

Page 45: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Island of Questioners

Page 46: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

The Island of Questioners

Page 47: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

Equivalent Statements

Logically equivalent statements express the same meaning.

Page 48: Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a

DeMorgan’s Laws