Upload
ashrafdzulkefly
View
232
Download
4
Embed Size (px)
Citation preview
1
Introduction to Logic
DCS5028
Determining the validation of an arguments by using truth table
Identify the Rules of Inference Implement and use the rules of inference to
prove a statement.
2DCS5028
An Argument is a sequence of propositions called premises, plus a proposition called conclusion.
Consider the following:1. If you have MMU’s student ID, then you can
enter into MMU’s library.2. You have MMU student ID.
Therefore, 3. You can enter into MMU’s library
An argument is valid if the conclusion follows from the premises (or hypotheses); that is,if p1,and p2,and … and pn are all true, then q must be true.
DCS50284
P1
P2
.
.
.Pn
--------∴ q
VALIDATION OF AN ARGUMENTVALIDATION OF AN ARGUMENTWe can determine whether an argument is valid or not by examining the truth table.Example: Formulate the arguments below symbolically and determine whether it is valid:
p : Today is a school holidayq : We go to the mall
Today is a school holiday if and only if we go to the mallWe go to the mall ∴Today is a school holiday
5DCS5028
p qq ∴ p
The argument is valid (the final value is all true)
6
p q p q ( p q ) q (( p q ) q ) p
T T T T T
T F F F T
F T F F T
F F T F T
DCS5028
((p ↔q) q) → p
Tautology
PROOF TECHNIQUESPROOF TECHNIQUESIf a statement is said to be true, then figure out why it is true.
Technique 1: truth table is used to prove a statement.
Technique 2: Laws of basic algebra and rules of inference and theorems are used in the proof techniques to prove a statement.
7DCS5028
Rules of Inference: Rules that provide the justification of the steps used to show that a conclusion follow logically
from a set of premises (hypothesis).
8DCS5028
Abbreviations Name
P Premise
Con Impl Conversion of Implication
ADD Addition
SIMP Simplification
Conj Conjunction
MP Modus Ponens
MT Modus Tollens
HS Hypothetical Syllogism
DS Disjunctive Syllogism
Res Resolution
9DCS5028
Rules of Inference:Rules that provide the justification of the steps used to show that a conclusionfollows logically from a set of premises (hypothesis).
1. Modus ponens p p q q
[p (p q) ] q is a tautology: [p (p q) ] q ¬(p (¬p q) ) q (¬p (p ¬ q)) q (¬p q) (p ¬q) ¬(p ¬q) (p ¬q) T
Example: Suppose that the premise “if it is sunny today, then we will go to the beach ” and the premise “it is sunny today” are true, then the conclusion “we will go to the beach” is true.
This can also be written as p, p q or p, p q q or p (p q) q q
10DCS5028
p q is equivalent to ¬p q
p→q ≡ ¬p q ¬ (p q) ≡ ¬p ¬ q
2. Addition p p q
p p q is a tautology: p p q ¬p (p q) (¬p p) q T q T
Example: Suppose that the statement “it is sunny now” is true, then the statement“it is either sunny or cloudy now” is true.
3. Simplification p q p
Show that (p q) p is a tautology
Example:Suppose that the statement “it is cloudy and raining now” is true, then thestatement “it is cloudy now” is true.
11DCS5028
p q is equivalent to ¬p q
4. Conjunction p q p q
[(p) (q)] p q is a tautology!
Example: Suppose that the statement “it is cloudy now” and the statement “it is raining now”are both true, then the statement “it is cloudy and raining now” is true.
5. Modus Tollens ¬q p q ¬p
Show that [¬q (p q)] ¬p is a tautology
Example:Suppose that the implication “if I finish my homework before six, then I will go to watch the movie” is true, but I do not go to watch movie, i.e. the conclusion “I go to watch the movie” is not true, then the premise “I finish my homework before six” is not true.
How is this related to Modus ponens?
12DCS5028
6. Hypothetical Syllogism p q q r p r
[(p q) (q r)] (p r) is a tautology: [(p q) (q r)] (p r) ¬[(p q) (q r)] (p r) ¬(¬p q) ¬(¬q r) ( ¬p r) (p ¬q) (q ¬r) ¬p r [(p ¬q) ¬p] [(q ¬r) r] [(p ¬p) (¬q ¬p)] [(q r) (¬r r)] [T (¬q ¬p)] [(q r) T] (¬q ¬p) (q r) (¬q q) ¬p r T
Example: Suppose that the implication “if it is raining today, then we will stay at home” and the implication “if we stay at home, we will watch TV” are both true, then the implication “if it is raining today, then we will watch TV” is true.
13DCS5028
7. Disjunctive Syllogism p q ¬p q
Show that [(p q) ¬p] q is a tautology.
Example: If the statement “2 is either an odd number or an even number” is true and the statement “2 is an odd number” is false, then the statement “2 is an even number” must be true.
8. Resolution p q ¬p r q r
How is this related to Modus ponens?
Show that [(p q) (¬p r)] (q r) is a tautology.
Example:Suppose that the statement “I am at home or it is sunny” and the statement “I am not at home or I am watching TV” are both true, then the statement “it is sunny or I am watching TV” must be true.
How is this related to Hypothetical Syllogism?
14DCS5028
Rules of Inference:
Rules of Inference Corresponding Tautology Name p p (p q) Addition p q
p q (p q) p Simplification p
p [(p) (q)] (p q) Conjunction q p q
p [p (p q)] q Modus Ponens p q q
¬q [¬q (p q)] ¬p Modus Tollens p q ¬p
15DCS5028
Rules of Inference (cont.)
Rules of Inference Corresponding Tautology Name p q [(p q) (q r)] (p r) Hypothetical Syllogism q r p r
p q [(p q) ¬p] q Disjunctive Syllogism ¬p q
p q [(p q) (¬p r)] (q r) Resolution ¬p r q r
16DCS5028
To see that whether a conclusion follows from some given premises, weneed a formal proof, where a proof line is either
a) a given premiseb) an application of an inference rulec) a transformation using equivalence laws.
Inference Rules are just some tautologies that are “obvious” in our common sense!
Imagine how tedious it is to write downa proof without using inference rules!
Step Reason1. ….. Hypothesis / Premise2. ….. ………3. ….. ………
17DCS5028
Example:
(p q) (p r) ¬p q r valid
Formal Proof: 1. p q P 2. p r P 3. ¬p P
4. q 1, 3, DS 5. r 2, 3, DS 6. q r 4, 5, Conj
Lets do something else: Find assignments for p, q, r that make sense to build such an argument.
argument
premises conclusion
18DCS5028
Example:Show that the following argument is valid by using rules of inference:
If Susan gets the supervisor’s position and works hard, then she will get a raise.If she gets the raise, she will buy a new car. She has not purchased a new car. Thereforeeither Susan did not get the supervisor’s position or she did not work hard.
Solution:Let p : Susan gets the supervisor’s position. q : Susan works hard. r : Susan gets a raise. n : Susan buys a new car.Premises: a) p q r, b) r n, c) ¬nConclusion: ¬p ¬q
Proof:1. p q r P2. r n P3. ¬n P
4. ¬r 2, 3, MT5. ¬(p q) 1, 4, MT6. ¬p ¬q 5, De Morgan’s law
19DCS5028
Example:Write formal proof for the following argument:
If Mary can sing or John can play, then I will buy the CD. Mary can sing. I willbuy the CD player. So I will buy the CD and the CD player.
Solution:Let p : Mary can sing. q : John can play. r : I will buy the CD. n : I will buy the CD player.Premises: a) p q r, b) p, c) nConclusion: r n
Proof:1. p q r P2. p P3. n P
4. p q 2, ADD5. r 4, 1, MP6. r n 5, 3, Conj
20DCS5028
Prove by using rules of inference that [(p (q r)) (p s) q ¬ s] r is valid.
21
Solution:
We prove [(p (q r)) (p s) q ¬s] r.
1. p (q r) P2. p s P3. q P4. ¬ s P
5. p 2, 4, DS6. q r 5, 1, MP7. r 3, 6, MP
DCS5028
Proof of Techniques
22
Abbreviations
P Premise
Con Impl Conversion of Implication
ADD Addition
SIMP Simplification
Conj Conjunction
MP Modus Ponens
MT Modus Tollens
HS Hypothetical Syllogism
DS Disjunctive Syllogism
Res Resolution
DCS5028
REVIEW QUESTIONSREVIEW QUESTIONS1. Formulate the arguments below symbolically and determine
whether each is valid. Let p: The weather is hot , q: It’s going to rain, r: I’ll bring an
umbrella
(a) If the weather is hot, then it’s going to rainThe weather is hot∴ It’s going to rain
(b) If the weather is hot or I’ll bring an umbrella, then it’s going to rain
It’s going to rain
∴ If the weather is not hot, then I’ll bring an umbrella23
DCS5028
REVIEW QUESTIONSREVIEW QUESTIONS
2. Give an argument using rules of inference to show that the conclusion follow from the hypothesis:
Hypothesis: If the sun is shining or tomorrow is Saturday, then we will go to the beach. The sun is shining. We will buy ice-cream. Therefore we will go to the beach and buy ice-cream.
24DCS5028