0% found this document useful (0 votes)
3 views38 pages

Lecture 3

The document is a lecture prepared by Dr. Heba Askr on Discrete Mathematics, focusing on Logic and Proofs. It covers topics such as propositional logic, predicates, quantifiers, and rules of inference, providing examples and explanations for constructing valid arguments. The lecture outlines specific rules of inference for both propositional and quantified statements, illustrating their application in logical reasoning.

Uploaded by

yasmeensamir2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views38 pages

Lecture 3

The document is a lecture prepared by Dr. Heba Askr on Discrete Mathematics, focusing on Logic and Proofs. It covers topics such as propositional logic, predicates, quantifiers, and rules of inference, providing examples and explanations for constructing valid arguments. The lecture outlines specific rules of inference for both propositional and quantified statements, illustrating their application in logical reasoning.

Uploaded by

yasmeensamir2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

University of Sadat City

Faculty of Computers and Artificial Intelligence (FCAI)

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

An argument is valid if the truth values of all its


premises implies that the conclusion is true.
6
Rules of Inference and Proofs
Argument Form : is a sequence of compound
propositions involving propositional variables.

premises

conclusion
therefore
7
Rules of Inference and Proofs
Premise: a statement, in an argument, or argument
form, other than the final one.

Conclusion: the final statement in an argument or


argument form.

Valid Argument Form : a sequence of compound


propositions involving propositional variables where
the truth of all the premises implies the truth of the
conclusion

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.”

“If it is snowing, then I will study discrete math.”


“It is snowing.”

“Therefore , I will study discrete math.”


10
Rules of Inference and Proofs
Rule # 2
p→q Based on the tautology: “Modus Tollens”
q ((p→q)  q) → p
 p

Example:
Let p be “it is snowing.”
Let q be “I will study discrete math.”

“If it is snowing, then I will study discrete math.”


“I will not study discrete math.”

“Therefore , it is not snowing.”


11
Rules of Inference and Proofs
Rule # 3

p→q Based on the tautology: “hypothetical syllogism”


q→r ((p→q)  (q→r)) → (p→r)
 p→r
Example:
Let p be “I study.”
Let q be “I will succeed.”
Let r be “I will get the job.”

“If I study, then I will succeed.”


“If I succeed, I will get the job.”

“Therefore , If I study, I will get the job.”


12
Rules of Inference and Proofs
Rule # 4
pq Based on the tautology: “disjunctive syllogism”
p ((p  q)  p) → q
q

Example:
Let p be “I will study discrete math.”
Let q be “I will study semi conductor.”

“I will study discrete math or I will study semi conductor.”


“I will not study discrete math.”

“Therefore , I will study semi conductor.”


13
Rules of Inference and Proofs
Rule # 5
p Based on the tautology: “Addition”
p  q p→p q

Example:
Let p be “I will study discrete math.”
Let q be “I will visit Las Vegas.”

“I will study discrete math.”

“Therefore, I will study discrete math or I will visit Las Vegas.”

14
Rules of Inference and Proofs
Rule # 6

pq Based on the tautology: “Simplification”


p (p  q) → p

Example:
Let p be “I will study discrete math.”
Let q be “I will study semi conductor.”

“I will study discrete math and I will study semi conductor”

“Therefore, I will study discrete math.”


15
Rules of Inference and Proofs
Rule # 7
p Based on the tautology: “Conjunction”
q ( (p)  (q) ) → (p  q)
p  q
Example:
Let p be “I will study discrete math.”
Let q be “I will study semi conductor.”

“I will study discrete math.”


“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
pq Based on the tautology: “Resolution”
pr ((pq)  (pr)) → (qr)
 qr

Example:
Let p be “I will study discrete math.”
Let r be “I will study semi conductor.”
Let q be “I will study databases.”

“I will not study discrete math or I will study semi conductor.”


“I will study discrete math or I will study databases.”

“Therefore, I will study databases or I will study semi conductor.”

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

Show that q is a conclusion.

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

The rules of inference for quantified statements are introduced


in the next several slides.

26
Rules of Inference and Proofs
Rules of Inference Quantified Statements (4 rules):
Rule # 1
Universal Instantiation (UI)

Example:

Our domain consists of all women and Mona is a woman.

“All women are wise.”

“Therefore, Mona is wise.”

27
Rules of Inference and Proofs
Rules of Inference Quantified Statements :
Rule # 2

Universal Generalization (UG)

Used often implicitly in Mathematical Proofs.

28
Rules of Inference and Proofs
Rules of Inference Quantified Statements :
Rule # 3
Existential Instantiation (EI)

Example:

“There is someone who got an A in the course.”


“Let’s call her Mona and say that Mona got an A”

29
Rules of Inference and Proofs
Rules of Inference for Quantified Statements :
Rule # 4

Existential Generalization (EG)

Example:

“Mona got an A in the class.”


“Therefore, someone got an A in the class.”

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.”

Then the premises are:


∀x(D(x) → C(x))
D(Marla)

And the conclusion is :


C(Marla)

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.”

Then the premises are:


∃x(C(x) ∧ ¬B(x))
∀x(C(x) → P(x)).
And the conclusion is :
∃x(P(x) ∧ ¬B(x)).
35
The desired conclusion! 36
Rules of Inference and Proofs
Combining Rules of Inference for Propositions
and Quantified Statements:
Universal Modus Ponens
Universal Modus Ponens combines universal instantiation
and modus ponens into one rule.

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))

And the conclusion is :


∀x(R(x) ∧ S(x))

38
Universal Modus Ponens

The desired conclusion! 39

You might also like