logic chapter 2. proposition "proposition" can be defined as a declarative statement...

22
Logic Chapter 2

Post on 19-Dec-2015

225 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Logic

Chapter 2

Page 2: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Proposition

• "Proposition" can be defined as a declarative statement having a specific truth-value, true or false.

• Examples:

    2 is a odd number.

    4 is a perfect square. • The above statements are propositions as they have

precise truth values. Their truth values are false and true, respectively.

Page 3: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Connective• "Connective": Two or more propositions can be

combined together to make compound propositions with the help of logical connectives.

• Examples:     2 is an odd number  AND  4 is a perfect square.     2 is an odd number  OR 4 is a perfect square. • Above two propositions can be used to make a compound

proposition using any of the logical connectives. • Their truth vales are false and true respectively. For the

first compound proposition to be true both the propositions have to be true as the connective is AND.

• As OR is the connective for the second one if either of the propositions is true the truth value of the compound proposition is true.

Page 4: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Connectives: Conjunction

• If p and q are propositions, the conjunction of p and q is the compound statement “p and q”

• It is denoted by p ^ q.

• The connective and is denoted by the symbol ^.

• The compound proposition p ^ q is true when both p and q are true, otherwise it is false.

p q p ^ q

T T T

T F F

F T F

F F F

Truth table

Page 5: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Connectives: Disjunction

• If p and q are propositions, the disjunction of p and q is the compound statement “p or q”

• It is denoted by p v q.

• The connective or is denoted by the symbol v.

• The compound proposition p v q is true if at least one of p or q is true, it is false when both p and q are false.

p q p v q

T T T

T F T

F T T

F F F

Truth table

Page 6: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Negation

• If p is a proposition, the negation of p is the statement not p.

• It is denoted by ~p or ¬p.

p ~ p or ¬p

T F

F T

Page 7: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Conditional Statement

• If p and q are statements, the compound statement ‘if p then q’ (denoted by p => q) is called a conditional statement / implication.

• The statement p is called hypothesis.• The statement q is called the consequent

/conclusion.• The connective if …then is denoted by the

symbol =>.

Page 8: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Conditional Statement

• Determines whether a proposition is true if another proposition is true.

• Example:p: I am hungryq: I will eatp => q: If I am hungry,

I will eat.

p q p q

T T T

T F F

F T T

F F T

Page 9: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Conditional Statement

• p -> q is also expressed in a number of different (but equivalent) ways in English.

• For example, the following are all different ways of saying "if p then q".

"p only if q" , "if not q then not p" , "p is sufficient for q" , "q is necessary for p", "q is a necessity/consequence of p" and "q whenever p"

Page 10: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Converse, Contrapositive, and Inverse

• If p =>q is an implication, then √ the converse of p => is the implication q => p.√ the contrapositive of p => q is the implication ~q => ~p. the inverse of p => q is is the implication ~p => ~q.• Examples:

p: I am elected q: I will lower taxesp => q: If I am elected, then I will lower taxes.Converse: q => p: I will lower taxes if I am elected.Contrapositive: ~q => ~p: I will not lower taxes if I am not elected.Inverse: ~p => ~q: If I am not elected, then I will not lower the taxes.

Page 11: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Converse, Contrapositive, and Inverse

Q What are the contrapositive, the converse, and the inverse of the implication

“The home team wins whenever it is raining”?S “q whenever p” is one of the ways to express the

implication p => q, the original statement can be written as ”If it is raining, then home team wins”.

Contrapositive: If the home team does not win, then it is not raining.

Converse: If the home team wins, then it is raining. Inverse: If it is not raining, then the home team

does not win.

Page 12: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Biconditional

• If p and q are propositions, the compound statement p if and only if q, denoted by p q. This is called an equivalence / biconditional.

• The connective if and only if is denoted by .

• p q is true when both p =>q and q => p are true.

• p q is true only when both p and q are true or both p and q are false.

p q p q

T T T

T F F

F T F

F F T

Page 13: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Biconditional

• There are some other common ways to express p q: “p is necessary and sufficient for q” “if p then q, and conversely” “p iff q” (iff is the abbreviation for ‘if and only if”)• Note: p q has exactly the same truth value as

(p => q) ^ (q => p).

Page 14: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Biconditional

• Example1:

p: You can take the flight, q: You buy a ticket.

p q : You can take the flight if and only if you buy a ticket.

• Example 2:

p: You can have dessert, q: You finish your meal.

p q : You can have dessert if and only if you finish your meal.

Page 15: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Tautology

• Tautology: A compound proposition that is true for all possible values of its propositional variables is called tautology.

Example: p v  ~p

p ~p p v ~p

T F T

F T T

Page 16: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Tautology

• The truth table for (p v q) (q v p) shows the statement is a tautology.

p q p v q q v p (p v q) (q v p)

T T T T T

T F T T T

F T T T T

F F F F T

Page 17: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Contradiction

• Contradiction: A compound proposition that is false for all possible values of its proposition variables is called contradiction.

Example: p ^ ~p

p ~p p ^ ~p

T F F

F T F

Page 18: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Contigency

• Contigency: A compound proposition that is true or false depending on the truth values of its propositional variables is called contigency.

Example: (p =>q) ^ (p v q)

p q p=>q pvq (p=>q) ^

(p v q)

T T T T T

T F F T F

F T T T T

F F T F F

Page 19: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Quantifiers• Set is defined as

A = {x | P(x)}

where p(x) is predicate/propositional function• Quantification: universal & existential quantifications• The universal quantification of P(x) is the proposition

“P(x) is true for all values of x in the universe of discourse”.

• The notation

Vx P(x) denotes the universal quantification of P(x).

V is called the universal quantifier

Page 20: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Universal QuantifierQ Let P(x) be the statement “x+1>x”.

What is the truth value of the quantification Vx P(x), where the universe of discourse consists of all real numbers?

S Since P(x) is true for all real numbers x, the quantification Vx P(x) is true.

Q Let Q(x) be the statement “x < 2”.What is the truth value of the quantification Vx Q(x), where the universe of discourse consists of all real numbers?

S Q(x) is not true for all real numbers x, since for instance Q(3) is false. Thus the quantification Vx Q(x) is false.

Page 21: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Existential Quantifier• With existential quantification, we form a

proposition that is true if and only if P(x) is true for at least one value of x in the universe of discourse.

• The existential quantification P(x) is the proposition

“There exists an element x in the universe of discourse such that P(x) is true”

• We can use the notation

Ξ x P(x) for existential quantification of P(x).

Ξ is called the existential quantifier.

Page 22: Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd

Existential QuantifierQ Let P(x) be the statement “x>3”.

What is the truth value of the quantification Ξ P(x), where the universe of discourse consists of all real numbers?

S Since “x>3” is true – for instance, when x = 4 - the existential quantification of P(x), which is Ξ x P(x), is true.

Q Let Q(x) be the statement “x = x + 1”.What is the truth value of the quantification Ξ x Q(x), where the universe of discourse consists of all real numbers?

S Q(x) is false for all real numbers x, the existential quantification of Q(x), which is Ξ x Q(x), is false.