Discrete Mathematics, Chapter 1.4-1.5: Predicate Logic
Richard Mayr
University of Edinburgh, UK
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 1 / 23
Discrete Mathematics, Chapter 1.4-1.5: Predicate Logic Richard Mayr - - PowerPoint PPT Presentation
Discrete Mathematics, Chapter 1.4-1.5: Predicate Logic Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 1 / 23 Outline Predicates 1 Quantifiers 2 3 Equivalences
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 1 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 2 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 3 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 4 / 23
◮ replaced by a value from their domain, or ◮ bound by a quantifier
◮ P(8) is true. ◮ P(5) is false. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 5 / 23
◮ P(−4, 6, 2) is true. ◮ P(5, 2, 10) is false. ◮ P(5, x, 7) is not a proposition.
◮ P(1, 2, 3) ∧ Q(5, 4, 1) is true. ◮ P(1, 2, 4) → Q(5, 4, 0) is true. ◮ P(1, 2, 3) → Q(5, 4, 0) is false. ◮ P(1, 2, 4) → Q(x, 4, 0) is not a proposition. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 6 / 23
◮ Universal quantifier, “For all”. Symbol: ∀ ◮ Existential quantifier, “There exists”. Symbol: ∃
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 7 / 23
1
2
3
4
5
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 8 / 23
◮ If U is the integers then ∀x P(x) is false. ◮ If U is the positive integers then ∀x P(x) is true. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 9 / 23
◮ If U is the integers then ∃x P(x) is true. ◮ If U is the positive integers then ∃x P(x) is false. Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 10 / 23
◮ There is one and only one x such that P(x). ◮ There exists a unique x such that P(x).
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 11 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 12 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 13 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 14 / 23
◮ ∀x P(x) ≡ P(1) ∧ P(2) ∧ P(3) ◮ ∃x P(x) ≡ P(1) ∨ P(2) ∨ P(3)
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 15 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 16 / 23
◮ for all domains ◮ for every propositional functions substituted for the predicates in the
◮ for some domain ◮ for some propositional functions that can be substituted for the
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 17 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 18 / 23
◮ To see if ∀x ∀y P(x, y) is true, loop through the values of x: ◮ At each step, loop through the values for y. ◮ If for some pair of x and y, P(x, y) is false, then ∀x ∀y P(x, y) is
◮ To see if ∀x ∃y P(x, y) is true, loop through the values of x: ◮ At each step, loop through the values for y. ◮ The inner loop ends when a pair x and y is found such that P(x, y)
◮ If no y is found such that P(x, y) is true the outer loop terminates
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 19 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 20 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 21 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 22 / 23
Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 1.4-1.5 23 / 23