Predicate Logic: Introduction and Translations
Alice Gao
Lecture 10
CS 245 Logic and Computation Fall 2019 1 / 28
Predicate Logic: Introduction and Translations Alice Gao Lecture - - PowerPoint PPT Presentation
Predicate Logic: Introduction and Translations Alice Gao Lecture 10 CS 245 Logic and Computation Fall 2019 1 / 28 Outline Learning goals Introduction and Motivation Elements of Predicate Logic Translating between English and Predicate
CS 245 Logic and Computation Fall 2019 1 / 28
CS 245 Logic and Computation Fall 2019 2 / 28
▶ Give examples of English sentences that can be modeled using
▶ Translate an English sentence into a predicate formula. ▶ Translate a predicate formula into an English sentence.
CS 245 Logic and Computation Fall 2019 3 / 28
▶ Translate this sentence: Alice is married to Jay and Alice is
▶ Translate this sentence: Every bear likes honey. ▶ Defjne what it means for a natural number to be prime.
CS 245 Logic and Computation Fall 2019 4 / 28
▶ Relationships among individuals: Alice is married to Jay and
▶ Generalizing patterns: Every bear likes honey. ▶ Infjnite domains: Defjne what it means for a natural number
CS 245 Logic and Computation Fall 2019 5 / 28
CS 245 Logic and Computation Fall 2019 6 / 28
CS 245 Logic and Computation Fall 2019 7 / 28
▶ Domains ▶ Predicates ▶ Quantifjers
CS 245 Logic and Computation Fall 2019 8 / 28
▶ If our domain is the set of natural numbers, is this statement
▶ If our domain is the set of real numbers, is this statement true
CS 245 Logic and Computation Fall 2019 9 / 28
▶ Natural numbers: 0, 6, 100, ... ▶ Alice, Bob, Eve, ... ▶ Animals: Winnie the Pooh, Micky Mouse, Simba, ...
CS 245 Logic and Computation Fall 2019 10 / 28
▶ a property of an individual, or ▶ a relationship among mulitple individuals.
▶ Defjne 𝑀(𝑦) to mean “x is a lecturer”. (unary predicate)
▶ Alice is a lecturer: 𝑀(𝐵𝑚𝑗𝑑𝑓) ▶ Micky Mouse is not a lecturer: (¬𝑀(𝑁𝑗𝑑𝑙𝑧𝑁𝑝𝑣𝑡𝑓)) ▶ 𝑧 is a lecturer: 𝑀(𝑧)
▶ Defjne 𝑍 (𝑦, 𝑧) to mean “x is younger than y”. (binary
▶ Alex is younger than Sam: 𝑍 (𝐵𝑚𝑓𝑦, 𝑇𝑏𝑛) ▶ 𝑏 is younger than 𝑐: 𝑍 (𝑏, 𝑐) CS 245 Logic and Computation Fall 2019 11 / 28
▶ The universal quantifjer ∀: the statement is true for every
▶ The existential quantifjer ∃: the statement is true for one or
CS 245 Logic and Computation Fall 2019 12 / 28
CS 245 Logic and Computation Fall 2019 13 / 28
CS 245 Logic and Computation Fall 2019 14 / 28
CS 245 Logic and Computation Fall 2019 15 / 28
CS 245 Logic and Computation Fall 2019 16 / 28
CS 245 Logic and Computation Fall 2019 17 / 28
CS 245 Logic and Computation Fall 2019 18 / 28
CS 245 Logic and Computation Fall 2019 19 / 28
CS 245 Logic and Computation Fall 2019 20 / 28
CS 245 Logic and Computation Fall 2019 21 / 28
CS 245 Logic and Computation Fall 2019 22 / 28
CS 245 Logic and Computation Fall 2019 23 / 28
CS 245 Logic and Computation Fall 2019 24 / 28
CS 245 Logic and Computation Fall 2019 25 / 28
▶ (¬(∀𝑦 𝑄(𝑦))) ≡ (∃𝑦 (¬𝑄(𝑦))) ▶ (¬(∃𝑦 𝑄(𝑦))) ≡ (∀𝑦 (¬𝑄(𝑦)))
CS 245 Logic and Computation Fall 2019 26 / 28
CS 245 Logic and Computation Fall 2019 27 / 28
▶ There are at least two bears.
▶ There is at most one bear.
▶ There is exactly one bear.
CS 245 Logic and Computation Fall 2019 28 / 28
▶ Give examples of English sentences that can be modeled using
▶ Translate an English sentence into a predicate formula. ▶ Translate a predicate formula into an English sentence.
CS 245 Logic and Computation Fall 2019 28 / 28