Lecture 3
Lecture 3
Discrete Mathematics
(MA102)
Lecture 3 (For AI and IS programs)
Prepared By:
Dr. Heba Askr
Information Systems Department
2020-2021
1
Chapter 1: Logic and Proofs
Topics
▪ Propositional logic
▪ Predicates and Quantifiers
▪ Rules of Inference and Proofs
2
Chapter 1: Logic and Proofs
Topics
▪ Propositional logic
▪ Predicates and Quantifiers
▪ Rules of Inference and Proofs
3
Lecture 3 Outline
• Valid Arguments
• Rules of Inference for Propositional Logic
• Using Rules of Inference to Build Arguments
• Rules of Inference for Quantified Statements
• Building Arguments for Quantified Statements
4
Rules of Inference and Proofs
Starting by Simple Example
• We have the two premises (hypothesis):
– “All men are mortal.”
– “Ali is a man.”
• And the conclusion:
– “Ali is mortal.”
• How do we get the conclusion from the premises?
Via
Rules of Inference and Proofs
5
Rules of Inference and Proofs
Argument: a sequence of statements that end with a
conclusion.
premises
“All men are mortal.”
“Ali is a man.”
“Ali is mortal.”
conclusion
premises
conclusion
therefore
7
Rules of Inference and Proofs
Premise: a statement, in an argument, or argument
form, other than the final one.
8
Rules of Inference and Proofs
Valid Arguments :
• We will show how to construct valid arguments in two
stages; first for propositional logic and then for predicate
logic.
• The rules of inference are the building blocks in the
construction of valid arguments. Which include:
– Rules of Inference for Propositional Logic
– Rules of Inference for Quantified Statements
• The rules of inference for Propositional Logic are
introduced in the next several slides.
9
Rules of Inference and Proofs
Rules of Inference for Propositional Logic (8 rules):
Rule # 1
p→q Based on the tautology: “Modus Ponens”
p ((p→q) p) → q
q
Example:
Let p be “It is snowing.”
Let q be “I will study discrete math.”
Example:
Let p be “it is snowing.”
Let q be “I will study discrete math.”
Example:
Let p be “I will study discrete math.”
Let q be “I will study semi conductor.”
Example:
Let p be “I will study discrete math.”
Let q be “I will visit Las Vegas.”
14
Rules of Inference and Proofs
Rule # 6
Example:
Let p be “I will study discrete math.”
Let q be “I will study semi conductor.”
“Therefore, I will study discrete math and I will study semi conductor.”
16
Rules of Inference and Proofs
Rule # 8
pq Based on the tautology: “Resolution”
pr ((pq) (pr)) → (qr)
qr
Example:
Let p be “I will study discrete math.”
Let r be “I will study semi conductor.”
Let q be “I will study databases.”
17
Rules of Inference and Proofs
Rules of Inference for Propositional Logic:
18
Rules of Inference and Proofs
Using Rules of Inference to Build Arguments:
Example 1: From the single proposition
Solution:
20
Rules of Inference and Proofs
Using Rules of Inference to Build Arguments:
Example 2:
With these hypotheses(premises):
• “It is not sunny this afternoon and it is colder than yesterday.”
• “We will go swimming only if it is sunny.”
• “If we do not go swimming, then we will take a boat trip.”
• “If we take a boat trip, then we will be home by sunset.”
Using the inference rules, construct a valid argument for the
conclusion:
“We will be home by sunset.”
21
Rules of Inference and Proofs
Using Rules of Inference to Build Arguments:
Solution:
1. Choose propositional variables:
p : “It is sunny this afternoon.”
q : “It is colder than yesterday.”
r : “We will go swimming.”
t : “We will be home by sunset.”
s : “We will take a boat trip.”
22
Rules of Inference and Proofs
Using Rules of Inference to Build Arguments:
Solution:
2. Translation into propositional logic:
23
Rules of Inference and Proofs
24
Rules of Inference and Proofs
Using Rules of Inference to Build Arguments:
Solution:
3. Construct the Valid Argument :
25
Rules of Inference and Proofs
Remember
26
Rules of Inference and Proofs
Rules of Inference Quantified Statements (4 rules):
Rule # 1
Universal Instantiation (UI)
Example:
27
Rules of Inference and Proofs
Rules of Inference Quantified Statements :
Rule # 2
28
Rules of Inference and Proofs
Rules of Inference Quantified Statements :
Rule # 3
Existential Instantiation (EI)
Example:
29
Rules of Inference and Proofs
Rules of Inference for Quantified Statements :
Rule # 4
Example:
30
Rules of Inference and Proofs
Rules of Inference for Quantified Statements :
31
32
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) = “x is in this discrete mathematics class,”
and let C(x) = “x has taken a course in computer science.”
33
34
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.”
37
Rules of Inference and Proofs
Combining Rules of Inference for Propositions
and Quantified Statements:
Example:
Use rules of inference to show that if ∀x(P(x) → (Q(x) ∧ S(x))) and
∀x(P(x) ∧ R(x)) are true, then ∀x(R(x) ∧ S(x)) is true.
The premises are:
∀x(P(x) → (Q(x) ∧ S(x)))
∀x(P(x) ∧ R(x))
38
Universal Modus Ponens