Вы находитесь на странице: 1из 9

Reviewing Propositional Logic,

Introduction to Predicates, Quantifiers and


Predicate Logic

CSE-2315: Discrete Structures


Ashis Kumer Biswas

Department of Computer Science and Engineering,


University of Texas at Arlington.

CSE-2315 Discrete Structures January 31, 2017 1 / 17

Propositional Logic

Goal how to reach a logical conclusion based on given statements.


Valid Argument: The propositional wff
P1 P2 P3 Pn Q
is a valid argument when it is a tautology.
Given statements P1 , P2 , P3 , , Pn are n statements given. Each of
them is called hypothesis statement.
Q is a conclusion statement.
So, goal is: When can Q be logically deduced from P1 , P2 , Pn ?
How to accomplish this? Truth table vs. Proof sequence
1. P1 (hypothesis, hyp)
2. P2 (hypothesis, hyp)
3. P3 (hypothesis, hyp)
n Pn (hypothesis, hyp)
. wff1 (intermediate wffs obtained using derivation rules)
. wff2 (intermediate wffs obtained using derivation rules)
. Q (obtained using derivation rules)
CSE-2315 Discrete Structures January 31, 2017 2 / 17
Proof sequence example 1

P Q is equivalent to P 0 Q, (implication rule, imp)


That is, P Q P 0 Q
Now lets do an example of proof sequence:
Prove whether the argument is valid: (A B) A B
Here is the proof sequence for it:
1. A B hyp
2. A hyp
3. 0
A B 1, imp
4. B 3, disjunctive syllogism (ds)

CSE-2315 Discrete Structures January 31, 2017 3 / 17

Proof sequence example 2

If the birds are flying south and the leaves are turning, then it must
be fall. Fall brings cold weather. The leaves are turning but the
weather is not cold. Therefore the birds are not flying south.
Lets first define the statements:
B: Birds are flying south.
L: The leaves are turning.
F : It must be fall.
C : The weather is cold.
Now, lets translate the given English sentences:
(B L) F
F C
L C0
And, dont forget translating the conclusion sentence:
B0
CSE-2315 Discrete Structures January 31, 2017 4 / 17
Proof sequence example 2 (contd.)

If the birds are flying south and the leaves are turning, then it must
be fall. Fall brings cold weather. The leaves are turning but the
weather is not cold. Therefore the birds are not flying south.
Lets first define the statements:
B: Birds are flying south.
L: The leaves are turning.
F : It must be fall.
C : The weather is cold.
So, the argument is:
((B L) F ) (F C ) (L C 0 ) B 0
The question is whether the argument is valid?
Check if the argument is a tautology.
Truth table vs. Proof sequence

CSE-2315 Discrete Structures January 31, 2017 5 / 17

Argument is valid if it is a tautology

((B L) F ) (F C ) (L C 0 ) B 0
One way to prove is using Truth Table
B L F C BL (B L) F F C L C0 ((B L) F ) (F C ) (L C 0 ) B 0

T T T T T T T F T
T T T F T T F T T
T T F T T F T F T
T T F F T F T T T
T F T T F T T F T
T F T F F T F F T
T F F T F T T F T
T F F F F T T F T
F T T T F T T F T
F T T F F T F T T
F T F T F T T F T
F T F F F T T T T
F F T T F T T F T
F F T F F T F F T
F F F T F T T F T
F F F F F T T F T

CSE-2315 Discrete Structures January 31, 2017 6 / 17


Argument is valid if it is a tautology

((B L) F ) (F C ) (L C 0 ) B 0
Now prove whether this argument is valid:
1. ((B L) F ) (F C ) (L C 0 ) hyp
2. (B L) F 1,sim
3. F C 1,sim
4. L C 0 1,sim
5. L 4,sim
6. C 0 4,sim
7. (B L) C 2,3,hs
8. (B L)0 6,7,mt
9. B 0 L0 8, De Morgan
10. L0 B 0 9,comm
11. L B 0 10,imp
12. B 0 5,11,mp
So, the argument is valid.

CSE-2315 Discrete Structures January 31, 2017 7 / 17

Example of an invalid argument

Given an argument: (A0 B 0 ) B (A C ) C 0


1. A0 B 0 hyp
2. B hyp
3. A C hyp
4. B A 1,cont
5. A 2,4,mp
6. C 3,6,mp
Therefore, the argument is NOT VALID.

CSE-2315 Discrete Structures January 31, 2017 8 / 17


Modus Ponens

Modus ponens, mp (Method of affirming the premise/antecedent):


PQ
P
Therefore, Q
Example:
If you do good in the exams, then you will get an A.
You did good in the exams.
Therefore, you got an A.

CSE-2315 Discrete Structures January 31, 2017 9 / 17

Modus Tollens

Figure: Adapted from https://openparachute.wordpress.com/category/religion/theology/

Modus tollens, mt (Method of denying the consequent):


PQ
Q0
Therefore, P0
If you do good in the exams, then you will get an A.
You did not get an A.
Therefore, you did not do good in the exams.
CSE-2315 Discrete Structures January 31, 2017 10 / 17
Hypothetical Syllogism, hs

Figure: Adapted from https://philosophicated.wordpress.com/tag/life-lesson/

PQ
QR
Therefore, P R
If I get paid today, then I will buy groceries.
If I buy groceries, then I will cook meal tonight.
Therefore, If I get paid today, then I will cook meal tonight.
How about the following example?
If there had been snow in the valley yesterday, I would have gone skiing.
If an avalanche had taken place yesterday, there would have been snow
in the valley yesterday.
Therefore, If an avalanche had taken place yesterday, I would have
gone skiing!
CSE-2315 Discrete Structures January 31, 2017 11 / 17

Disjunctive Syllogism, ds

Either this or that. P Q


Not this. P0
Therefore, that. Q
Either this or that. P Q
Not that. Q0
Therefore, this. P

Examples:
Either the class is in room NH-110 or in room NH-111.
The class is not in room NH-111.
Therefore, the class is in room NH-110.

CSE-2315 Discrete Structures January 31, 2017 12 / 17


Predicates
(Grammar): A predicate talks about the subject in an English
sentence.
My neighbors dog barked all night.
(Subject) My neighbors dog.
(Predicate) barked all night.
We can replace subject by a variable x : x barked all night.
Lets define P be the predicate: barked all night.
Now, the English sentence looks like: P(x ).
Predicate, P is thus a verbal ( statement
(((( sentence that describes the
property of a variable.
B(x , y ) : x is brother of y .
Now you see that predicates are not statements (since subjects are
variable(s), that make P(x ) neither true nor false)!
Domain of interpretation: the collection of objects from which x
(or y ) may be chosen.
The value of a predicate can be either TRUE, FALSE, or undefined.
CSE-2315 Discrete Structures January 31, 2017 13 / 17

Quantifiers

Quantifiers are phrases that refer to given quantities indicating how


many objects from the domain of interpretation have a certain
property (i.e., predicate sentences).
It gives a predicate sentence truth value.
A quantifier only works on a single variable in the predicate sentence.
Two categories of phrases:
Universal quantifier, (x )P(x ) specifies all items in the domain of
interpretation.
for all,
for every,
Existential quantifier, (x )P(x ) specifies the existence of at least
one item in the domain of interpretation.
there is a
for at least one
there exists a

CSE-2315 Discrete Structures January 31, 2017 14 / 17


Examples using Quantifiers

Given, domain of interpretation: all flowers in the world.


P(x ): x is yellow.
What is the truth value of the statement: (x )P(x )
FALSE
What is the truth value of the statement: (x )P(x )
TRUE

CSE-2315 Discrete Structures January 31, 2017 15 / 17

Examples using Quantifiers (contd.)

Given, domain of interpretation: { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}


P(x ): x is divisible by 5.
What is the truth value of the statement: (x )P(x )
FALSE
(x )P(x ) P(1) P(2) P(10)
What is the truth value of the statement: (x )P(x )
TRUE
(x )P(x ) P(1) P(2) P(10)

CSE-2315 Discrete Structures January 31, 2017 16 / 17


Order of quantifiers matters!

Given, domain of interpretation: all integers = { , 2, 1, 0, 1, 2, }


Q(x , y ): x is less than y .
(x )(y )Q(x , y )
False. (just consider an example, x =5, y =2)
(x )(y )Q(x , y )
TRUE.
(x )(y )Q(x , y )
FALSE. (can you imagine an integer x which is less than all integers in
the domain of interpretation?)
(x )(y )Q(x , y )
TRUE.

CSE-2315 Discrete Structures January 31, 2017 17 / 17

Вам также может понравиться