LAB 04 FirstOrderLogic
LAB 04 FirstOrderLogic
Laboratory
is not satisfiable;
page
02
Exercise 8.12
(1) ¬C ∨ ¬D ∨ E
(2) F
(3) ¬D ∨ B
(4) ¬B ∨ A
(5) F ∨ E ∨ ¬A
(6) C ∨ B ∨ ¬G
(7) ¬C ∨ ¬A ∨ G
(8) ¬F ∨ ¬C ∨ D
(9) C
(10) ¬G
page
04
Exercise 8.13
¬C
B ∨ A ∨ C
¬A ∨ D
¬E ∨ ¬A ∨ F
¬E ∨ ¬F ∨ ¬A
G ∨ ¬A ∨ E
E ∨ ¬G ∨ ¬A
A ∨ H ∨ C
¬H ∨ ¬I ∨ A
I ∨ L ∨ M
¬L ∨ C ∨ ¬M
A ∨ ¬L ∨ M
L ∨ N ∨ ¬H
I ∨ L ∨ ¬N
page
05
Exercise 8.13
¬C
B ∨ A ∨ C
¬A ∨ D
¬E ∨ ¬A ∨ F
¬E ∨ ¬F ∨ ¬A
G ∨ ¬A ∨ E
E ∨ ¬G ∨ ¬A
A ∨ H ∨ C
¬H ∨ ¬I ∨ A
I ∨ L ∨ M
¬L ∨ C ∨ ¬M
A ∨ ¬L ∨ M
L ∨ N ∨ ¬H
I ∨ L ∨ ¬N
page
06
Exercise 9.1
▪ This exercise uses the predicates In(x, y), Borders (x, y), and Country(x), whose
arguments are geographical regions, along with constant symbols for various
regions. In each of the following we give an English sentence and a number of
candidate logical expressions.
For each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or (3) is
syntactically valid but does not express the meaning of the English sentence.
page
07
Exercise 9.1
page
08
Exercise 9.1
▪ This exercise uses the predicates In(x, y), Borders (x, y), and Country(x), whose
arguments are geographical regions, along with constant symbols for various
regions. In each of the following we give an English sentence and a number of
candidate logical expressions.
For each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or (3) is
syntactically valid but does not express the meaning of the English sentence.
page
010
Exercise 9.1
▪ This exercise uses the predicates In(x, y), Borders (x, y), and Country(x), whose
arguments are geographical regions, along with constant symbols for various
regions. In each of the following we give an English sentence and a number of
candidate logical expressions.
For each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or (3) is
syntactically valid but does not express the meaning of the English sentence.
page
012
Exercise 9.1
▪ This exercise uses the predicates In(x, y), Borders (x, y), and Country(x), whose
arguments are geographical regions, along with constant symbols for various
regions. In each of the following we give an English sentence and a number of
candidate logical expressions.
For each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or (3) is
syntactically valid but does not express the meaning of the English sentence.
page
014
Exercise 9.1
▪ This exercise uses the function MapColor and predicates In(x, y), Borders (x, y),
and Country(x), whose arguments are geographical regions, along with constant
symbols for various regions. In each of the following we give an English sentence
and a number of candidate logical expressions.
For each of the logical expressions, state whether it (1) correctly expresses the
English sentence; (2) is syntactically invalid and therefore meaningless; or (3) is
syntactically valid but does not express the meaning of the English sentence.
ii. ∀x,y (Country(x) ∧ Country(y) ∧ Borders (x, y) ∧ ¬(x = y)) ⇒ ¬(MapColor (x) = MapColor
(y)).
iv. ∀x,y (Country(x) ∧ Country(y) ∧ Borders (x, y)) ⇒ MapColor (x = y). page
015
Exercise 9.1
ii. ∀x,y (Country(x) ∧ Country(y) ∧ Borders (x, y) ∧ ¬(x = y)) ⇒ ¬(MapColor (x) = MapColor
(y)).
(1) Correct. The inequality is unnecessary because no country borders itself.
page
016
Exercise 9.2
page
017
Exercise 9.2
d. Joe does not have a lawyer (i.e., is not a customer of any lawyer).
¬∃p Customer(Joe, p) ∧ Occupation(p, Lawyer).
▪ Consider a first-order logical knowledge base that describes worlds containing people,
songs, albums (e.g., “Meet the Beatles”) and disks (i.e., particular physical instances of
CDs). The vocabulary contains the following symbols:
page
020
Exercise 9.3
▪ Consider a first-order logical knowledge base that describes worlds containing people,
songs, albums (e.g., “Meet the Beatles”) and disks (i.e., particular physical instances of
CDs). The vocabulary contains the following symbols:
h. Every song that Gershwin wrote has been recorded on some album. (Possibly different
songs are recorded on different albums.)
∀s Wrote(Gershwin, s) ⇒ ∃p,a Sings(p, s, a).
i. There is a single album that contains every song that Joe has written.
∃a ∀s Wrote(Joe, s) ⇒ ∃p Sings(p, s, a).
j. Joe owns a copy of an album that has Billie Holiday singing “The Man I Love.”
∃d,a,s CopyOf(d, a) ∧ Owns(Joe, d) ∧ Sings(BHoliday, TheManILove, a).
k. Joe owns a copy of every album that has a song sung by McCartney. (Of course, each
different album is instantiated in a different physical CD.)
∀a [∃s Sings(McCartney, s, a)] ⇒ ∃d CopyOf(d, a) ∧ Owns(Joe, d).
l. Joe owns a copy of every album on which all the songs are sung by Billie Holiday.
∀a [∀s,p Sings(p, s, a) ⇒ Sings(BHoliday, s, a)] ⇒ ∃d CopyOf(d, a) ∧ Owns(Joe, d).
page
022
Exercise 9.4
In this exercise, it is best not to worry about details of tense and larger concerns with consistent ontologies
and so on. The main point is to make sure students understand connectives and quantifiers and the use of
predicates, functions, constants, and equality. Let the basic vocabulary be as follows:
• F and G: specific French and Greek courses (one could also interpret these sentences as referring to any
such course, in which case one could use a predicate Subject(c, f ) meaning that the subject of course c
is field f;
• Buys(x, y, z): x buys y from z (using a binary predicate with unspecified seller is OK but less felicitous);
• Sells(x, y, z): x sells y to z;
• Shaves(x, y): person x shaves person y
• Born(x, c): person x is born in country c;
• Parent(x, y): x is a parent of y;
• Citizen(x, c, r): x is a citizen of country c for reason r;
• Resident(x, c): x is a resident of country c;
• Fools(x, y, t): person x fools person y at time t;
d. The best score in Greek is always higher than the best score in French.
∀s ∃x ∀y Score(x, G, s) > Score(y, F, s).
g. There is an agent who sells policies only to people who are not insured.
∃x Agent(x) ∧ ∀y,z Policy(y) ∧ Sells(x, y, z) ⇒ (Person(z) ∧ ¬Insured(z)).
h. There is a barber who shaves all men in town who do not shave themselves.
∃x Barber(x) ∧ ∀y Man(y) ∧ ¬Shaves(y, y) ⇒ Shaves(x, y).
j. A person born outside the UK, one of whose parents is a UK citizen by birth, is a UK citizen
by descent.
∀x Person(x) ∧ ¬Born(x, UK) ∧ (∃y Parent(y, x) ∧ Citizen(y, UK, Birth)) ⇒
Citizen(x, UK, Descent).
page
026
Exercise 9.4
k. Politicians can fool some of the people all of the time, and they can fool all of the people
some of the time, but they can’t fool all of the people all of the time.
∀x Politician(x) ⇒
(∃y ∀t Person(y) ∧ Fools(x, y, t)) ∧
(∃t ∀y Person(y) ⇒ Fools(x, y, t)) ∧
¬(∀t ∀y Person(y) ⇒ Fools(x, y, t))
l. All Greeks speak the same language. (Use Speaks(x, l) to mean that person x speaks
language l.)
∀x,y,l Person(x) ∧ [∃r Citizen(x, Greece, r)] ∧ Person(y) ∧
[∃r Citizen(y, Greece, r)] ∧ Speaks(x, l) ⇒ Speaks(y, l)
page
027