Mehreen Khan: BS (UET, Lahore) MS (NUST, Islamabad) Mehreen - Khan@cust - Edu.pk
Mehreen Khan: BS (UET, Lahore) MS (NUST, Islamabad) Mehreen - Khan@cust - Edu.pk
Mehreen Khan
BS(UET, Lahore)
MS(NUST, Islamabad)
[email protected]
RULES OF INFERENCE
RULES OF INFERENCE
• Arguments Sequence of propositions
Premises conclusion
• Valid
• The premises imply the conclusion
• When ever premises are true, conclusion must be true
• Invalid
• Leads to incorrect reasoning
• Also called fallacies
For example Represents implication
1. “If you have a password, then you can log onto system” ( PQ)
2. “you have a password” P
• “therefore, you can log on to system” Q (conclusion)
• (PQ) Λ P if this a tautology then it is a valid argument ( always true)
• Invalid argument if you have a password and you cant log on to a
system
Another example
P Q
7
a
Today is Tuesday.
If today is Tuesday, then John will go to work.
Therefore, John will go to work.
• Law of detachment
Rules
• MODUS TOLLENS
Simplification
“It is below freezing and raining now .
Therefore, it is below freezing now.”
Conclusion = p
Hypothetical Syllogism
• Basically taking out a middle man
Converse Error
Example: p q
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics.
Therefore, you did every problem in this book.
pq qp
q q
p p
• If you did every problem in the book then you learned discrete
mathematics
• ¬p You did not do every problem in the book.
• ∴ ¬q Therefore, you did not learn discrete mathematics
• fallacy of denying the hypothesis.
pq ~p ~q
~p ~p
~q ~q
Rules of Interference for Quantified Statement
• Universal Instantiation
All birds are animals
Therefore, any bird is an animal
• Existential Generalization
If we know that a P(x) is true for at least one element, c, in the
universe, then can we say that there-exists x[P(x)]? Yes.
Combining the rules of inference for propositions &
quantified statements
• Universal modus ponens
∀x(P(x) → Q(x))
P(a), where a is a particular element in the domain
∴ Q(a)
if ∀x(P(x) → Q(x)) is true, and if P(a) is true for a particular element a in
the domain of the universal quantifier, then Q(a) must also be true.
Example
Show that the premises “Everyone in this discrete mathematics class has taken a course in
computer science” and “Marla is a student in this class” imply the conclusion “Marla has taken
a course in computer science.”
Solution: Let D(x) denote “x is in this discrete mathematics class,” and
let C(x) denote “x has taken a course in computer science.”
Then the premises are ∀x(D(x) → C(x)) and D(Marla).
The conclusion is C(Marla).
The following steps can be used to establish the conclusion from the premises.
Step Reason
1. ∀x(D(x) → C(x)) Premise (Everyone in this discrete mathematics class has taken a course incomputer science)
2. D(Marla)→C(Marla) Universal instantiation from (1)
3. D(Marla) Premise (Marla is a student in this class)
4. C(Marla) Modus ponens from (2) and (3)
Example
Show that the premises
“A student in this class has not read the book,” and “Everyone in this class
passed the first exam” imply the conclusion “Someone who passed the first
exam has not read the book.”
Solution: Let C(x) be “x is in this class,”
B(x) be “x has read the book,”
and P(x) be “x passed the first exam.”
A student in this class has not read the book ∃x(C(x)∧¬B(x))
Everyone in this class passed the first exam ∀x(C(x) → P(x)).
Someone who passed the first exam has not read the book ∃x(P(x)∧¬B(x)).
These steps can be used to establish the conclusion from the premises.
solution
Step Reason
1. ∃x(C(x)∧¬B(x)) Premise A student in this class has not read the book
2. C(a)∧¬B(a) Existential instantiation from (1)
3. C(a) Simplification from (2)
4. ∀x(C(x) → P(x)) Premise Everyone in this class passed the first exam
5. C(a) → P(a) Universal instantiation from (4)
6. P(a) Modus ponens from (3) and (5)
7. ¬B(a) Simplification from (2)
8. P(a)∧¬B(a) Conjunction from (6) and (7)
9. ∃x(P(x)∧¬B(x)) Existential generalization from (8)
Someone who passed the first exam has not read the book
Quiz
• Construct a valid argument to show that “Oliver has 4 legs” is a
consequence of the premises “Every dog has 4 legs and Oliver is a
dog”
D(x) denote x is a dog
F(x) denote x has four legs
Construct an argument
1. ∀(D(x) → F(x)) (premise)
2. D(O) F(O) (Universal Instantiation from 1)
3. D(O) (Premise)
4. F(O) (Modus ponen using 2 & 3)
Predicates?
• Take a real life example
• “he goes to school” wrt to English literature 2 parts
• 1st part subject 2nd part predicate (depends on the first part)
• Mathematical example
• X>5 (predicate with variable)
• Why do we study in DM?
• X>5 is this a proposition? (true or false)
• No because we don't know the value of x
• 7>5 is proposition
• Convert x>5 into P(x) [making a function here] what is the truth value of P(9) and
P(2)?
• 9>5 T , 2<5 F
• Predicate is also called propositional function
Quantifiers?
• With out propositional function there is another way to convert the
statement into proposition which is called quantifiers.
• Two types
• Universal
• Predicate true for every element under consideration
• Existential
• One or more than one element (not for all)
• Area of logic that deals with predicates and quantifiers is called
predicate calculus.