ECM 1415 Predicate Logic & Rules of Inference Flashcards
What is predicate logic?
a generalization of propositional logic
What is a predicate?
a proposition that can store variables in a scope
What 3 features does predicate logic include?
Predicates
Quantifiers
Variables
What does the Universal Quantifier, ∀x, do?
asserts P(x) is true for every x in the domain
What does the Existential Quantifier, ∃x, do?
asserts P(x) is true for some x in the domain
The domain is often denoted by U for universe of discourse
Example (Quantifier)
If P(x) denotes “x is even” and the U the integers, then…
- ∀x. P(x) is false
- ∃x. P(x) is true
Nested Quantifier example
“Every real number has an inverse” is
∀x ∃y. (x + y = 0)
Laws for Quantifiers:
¬(∀x. P(x)) _= ∃x. ¬P(x)
¬(∃x. P(x)) _= ∀x. ¬P(x)
Example
Not “There is a student in your class who has taken a course in Java” means “Every student in your class has not taken Java”
Modus Ponens
P -> q
p
———
Therefore q
Corresponding tautology
(p /\ (p -> q)) -> q
Modus Tollens
P -> q
¬q
———
Therefore ¬p
Corresponding tautology
(¬q /\ (p -> q)) -> ¬p
Hypothetical Syllogism
P -> q
q -> r
———
Therefore p -> r
Disjunctive Syllogism
P \/ q
¬p
———
therefore q
Addition
p
Therefore p \/ q
Simplification
p /\ q
Therefore p
Resolution
¬p \/ r
p \/ q
———
Therefore q \/ r