tu152_1-1420768394

17
TU 152 Asst.Prof.Dr. Supranee Lisawadi 1 Chapter 1 Logic What is logic, and why should we learn about it? - Logic is used for reasoning. - Reasoning is the act of deciding if something is true of false. Learning about logic will enable us to construct better arguments in our essays and papers and to be better at dissecting other people’s arguments in our studies. Section 1.1 Statements A declarative sentence: “(noun) is (adjective)” “(noun) was (adjective)” “(noun) will be (adjective)” etc. A statement is a declarative sentence that is either true or false, but not both. Examples: (i) “Today is sunny.” is a statement. (ii) “How are you?” is not a statement. (not declarative). (iii) “School.” is not a statement. (not a sentence) (iv) “1+2 = 3” is a statement. (v) “This sentence is false.” is not a statement. (it is neither true nor false) The truth value of a statement is true or false. - It is up to us to decide which statements we will take as true and which ones we will take as false. - This will depend on our interpretation of the context of the statement. A simple statement is a statement of the form “(noun) is (adjective)”, or other variations. - Simple statements can be combined using conjunctive words like “and”, “but”, “or”, “nor”, etc. to make compound statements.

description

Thammasat TU152 note #1

Transcript of tu152_1-1420768394

Page 1: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 1

Chapter 1 Logic

What is logic, and why should we learn about it?

- Logic is used for reasoning.

- Reasoning is the act of deciding if something is true of false.

Learning about logic will enable us to construct better arguments in our essays and papers

and to be better at dissecting other people’s arguments in our studies.

Section 1.1 Statements

A declarative sentence:

“(noun) is (adjective)”

“(noun) was (adjective)”

“(noun) will be (adjective)”

etc.

• A statement is a declarative sentence that is either true or false, but not both.

Examples:

(i) “Today is sunny.” is a statement.

(ii) “How are you?” is not a statement. (not declarative).

(iii) “School.” is not a statement. (not a sentence)

(iv) “1+2 = 3” is a statement.

(v) “This sentence is false.” is not a statement. (it is neither true nor false)

• The truth value of a statement is true or false.

- It is up to us to decide which statements we will take as true and which ones we will

take as false.

- This will depend on our interpretation of the context of the statement.

• A simple statement is a statement of the form “(noun) is (adjective)”, or other variations.

- Simple statements can be combined using conjunctive words like “and”, “but”, “or”,

“nor”, etc. to make compound statements.

Page 2: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 2

Examples:

(i) “ It will be sunny tomorrow or it will rain tomorrow.”

(ii) “1+3 = 4 and 4+1 = 5.”

(iii) “It’s not nice outside, but I’m happy.”

• A conditional statement is formed by combining simple statements using “if, then”.

e.g. “If it just rained, then the car is wet.”

Here, the statement “it just rained” is called the assumption (or hypothesis) and “the car is

wet” is called the conclusion.

We can also create quantified statements using quantifiers like “some”, “all”, and “there

exists”.

Examples: True or False

(i) “Some dogs are brown.”

(ii) “For all integers n, n+1 = 2.”

(iii) “There exists a real number x such that x2 = 2.”

Page 3: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 3

Section 1.2 Symbolic Logic and Truth Tables

We can use letters, like p and q, to represent statements.

e.g. Let p represent the statement “The sky is blue.”

Given two statements, p and q, we write the compound statement “p and q” as

p q∧ (read: “p and q”)

We write the compound statement “p or q” as

p q∨ (read: “p or q”)

The statement “It is not true that p” is written as

~ p (read: “not p”)

Examples:

- let p be the statement “Jennie has one brother”

- let q be the statement “Paul has three sisters”

- let r be the statement “Rob has one sister”

(i) p q∧

(ii) ~ r q∨

(iii) Jennie doesn’t have one brother or Paul has three sisters and Rob has one sister.

Page 4: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 4

• The Truth Value of Compound Statements

Examples:

Let

p = “Today is January 12.” q = “Today is Monday.”

r = “The year is 2014.” s = “It is the morning.”

True or False:

(i) p (ii) q

(iii) r (iv) s

(v) ~ p (vi) ~ q

(vii) p q∧ (viii) p r∧

(ix) q r∨ (x) q s∨

We can summarize the truth values of statements like p q∧ , p q∨ , ~ p using truth tables:

AND:

OR:

NOT:

Page 5: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 5

• More Truth Tables

Example: Make a truth table for (~ )p q∧ .

Example: Make a truth table for ( ) ( )~ ~p q r ∧ ∨

Page 6: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 6

• Always true, always false

A statement which is always true is called a tautology.

Example: ( )~p p∨ is a tautology:

A statement which is always false is called a contradiction.

Example: ( )~p p∧ is a contradiction:

Page 7: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 7

Section 1.3 Conditional Statements

Given two statements, p and q, we write the conditional statement “if p, then q” as

p q→ (read: “p implies q”)

Example:

Let p = “It just rained.”

and q = “The car is wet.”

Then we can write “If it just rained, then the car is wet.” as

p q→

Here is the Truth Table for “→” :

IMPLIES:

Other ways to translate p q→ :

“p implies q”

“if p, then q”

“if p, q”

“q if p”

“p, therefore q”

“q when p”

Page 8: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 8

Important:

Although p q∧ is the same as q p∧ and p q∨ is the same as q p∨ , this is not the case

with “→”:

p q→ is not the same as q p→

In fact, we have a name for q p→ :

We call q p→ the converse of p q→ .

We see the difference between p q→ and q p→ in this truth table:

Another related statement to p q→ is the inverse:

( ) ( )~ ~p q→

Page 9: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 9

We also have the contrapositive of p q→

( ) ( )~ ~q p→

• Biconditional

Biconditional statement is the combination of the statements p q→ and q p→ to form the

new statement ( ) ( )p q q p→ ∧ → . This new statement is written as

p q↔ (read: “p if and only if q”).

The truth table for p q↔ :

Page 10: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 10

Section 1.4 Logical Equivalence

Two statements are equivalent if they have the same truth value in every possible situation.

The columns of each truth table that were the last to complete will be exactly the same for

equivalent statements.

Example: Are the statements ~ ~p q∨ and ( )~ p q∧ equivalent?

De Morgan’s laws: For any statements p and q

( )~ ~ ~p q p q∨ ≡ ∧ ; ( )~ ~ ~p q p q∧ ≡ ∨

Examples: Write the negation of the compound statements.

(i) Colin went to work or he went to bed.

(ii) Jen didn’t come last night and didn’t pick up her money.

Page 11: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 11

Example: Show that p q→ is equivalent to ~ p q∨

Example: Refer to previous example; use De Morgan’s law and double negation to show that

( )~ ~p q p q→ ≡ ∧

Page 12: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 12

Recall: Statement:

In Mathematics we are constantly dealing with statements. By a statement we mean a

sentence that is true or false, but not both.

Truth Values:

Every statement has a truth value, namely true (denoted by T) or false (denoted by F).

We often use P or Q to denote statements, or perhaps 1 2, ,..., nP P P if there are several

statements involved.

Compound statement:

A compound statement is a statement that can be expressed in terms of one or more

(simpler) statements.

The Negation of a Statement:

The negation of a statement P is the statement “Not P” and is denoted by “ P”.

The Disjunction of Statements:

The disjunction of the statements P and Q is the statement “P or Q” and is denoted by

P∨Q.

The conjunction of Statements:

The conjunction of the statements P and Q is the statement “P and Q” and is denoted

by P∧Q.

The Implication:

For statements P and Q, the implication is the statement “If P, then Q” and is denoted

by P→Q.

Page 13: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 13

Section 1.5 Quantified Statements and Their Negations

• Symbols

negation (not)

∨ disjunction (or)

∧ conjunction (and)

→ implication

↔ equivalence

∀ universal quantifier (for every, for all)

∃ existential quantifier (there exists, for some)

Each of the phrases “for every, “for each”, and “for all” is referred to as a universal

quantifier and is commonly expressed by the symbol∀ . For example, “For every real

number x, its square 2 0x ≥ .” can be written in symbols as

2, 0x R x∀ ∈ ≥ .

In fact, if we define the open sentence ( )p x by 2( ) : 0p x x ≥ , then we can write

statement 2, 0x R x∀ ∈ ≥ as ( ),x R p x∀ ∈ . We are saying then that for every element x in the

set of real numbers (the universal set in this case), ( )p x holds.

Suppose, however, that we were to let ( ) 2: 0q x x ≤ . The statement ( ),x R q x∀ ∈ (that

is, for every real number x, its square 2 0x ≤ ) is false. Of course this means that its negation

is true. If it were not the case that for every real number x, its square 2 0x ≤ , then there must

exist some real number x such that 2 0x > . The phase “there exists” or “there is” is called an

existential quantifier and is denoted in symbols by ∃ . Hence this statement can be written

as

( )2, 0 or ,x R x x R q x∃ ∈ > ∃ ∈

Therefore, if we are considering some universal set S and if ( )p x is an open sentence

concerning some element x S∈ , then

( )( ),x S p x∀ ∈ is logical equivalent to ( ),x S p x∃ ∈ .

Page 14: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 14

Example 1: Find the truth value of the following statements.

1) [ ] [ ]1 3 2 0x N x x N x∀ ∈ − = ∨ ∃ ∈ + =

2) [ ]2 1 1 2x x x x ∃ = − → ∃ − >

3) [ ]20 0 2 1x x x x I x ∀ ≠ → ≠ ∧∃ ∈ =

4) [ ] 21 0 0x N x x x ∃ ∈ + = ↔ ∃ <

Page 15: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 15

Theorem: For all statements p, q, and r, the following statements are tautologies.

1. Law of Identity: p p↔

2. Law of Double Negation:

( )p p↔

3. Law of Excluded Middle: p p∨

4. Law of Contradiction:

( )p p∧

5. Idempotent Laws:

( )p p p∧ ↔

( )p p p∨ ↔

6. Law of Addition:

( )p p q→ ∨

7. Law of Equivalence:

[ ] ( ) ( )p q p q q p ↔ ↔ → ∧ →

8. Law of Contraposition:

( ) ( )p q q p→ ↔ →

9. Law of (Hypothetical) Syllogism:

( ) ( ) [ ]p q q r p r → ∧ → → →

10. Commutative Laws:

( ) ( )p q q p∧ ↔ ∧

( ) ( )p q q p∨ ↔ ∨

11. Associative Laws:

( ) ( ) [ ]p q r p q r p q r ∧ ∧ ↔ ∧ ∧ ↔ ∧ ∧

( ) ( ) [ ]p q r p q r p q r ∨ ∨ ↔ ∨ ∨ ↔ ∨ ∨

Page 16: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 16

12. Distributive Laws:

( ) ( ) ( )p q r p q p r ∧ ∨ ↔ ∧ ∨ ∧

( ) ( ) ( )p q r p q p r ∨ ∧ ↔ ∨ ∧ ∨

13. Absorption Laws:

( )p p q p ∧ ∨ ↔

( )p p q p ∨ ∧ ↔

14. De Morgan’s Laws:

( ) ( )p q p q∧ ↔ ∨

( ) ( )p q p q∨ ↔ ∧

15. Law of Implication:

( ) ( )p q p q→ ↔ ∨

( ) ( )p q p q∨ ↔ →

16. Law of Negation for Implication:

( ) ( )p q p q→ ↔ ∧

Example 2: Show that ( )p q p ∨ → is tautology.

Page 17: tu152_1-1420768394

TU 152 Asst.Prof.Dr. Supranee Lisawadi 17

Example 3: Show that ( )p q p q→ ∧ ∧ is contradiction.