Docsity

Homework 5 for CPSC 625: First-Order Logic Problems, Assignments of Computer Science

Toggle sidebar
bg1
CPSC 625 – Homework 5
due: Mon, Oct 30, 2006
0. Prove the following equivalence using model theory for FOL:
¬∃xΓ(x)≡ ∀x¬Γ(x), where Γ(x) is a sentence containing the variable x.
1. Prove that Existential Introduction is a sound rule of inference in FOL: Γ(a)⊢ ∃xΓ(x), where
Γ(a) represents some sentence that contains the constant term a, which is replaced by the (new)
variable xthroughout.
2. Consider the following model for a first-order logic theory containing the constant a, the function
f, and predicates Pand Q: universe is U={1,2}; denotations are a7→ 1, f(1) = 2 and f(2) = 1;
extensions are P={h2i}, and Q={h1,1i,h1,2i,h2,2i}. Determine the truth value of the following
sentences in the model. Be sure to show all of your work.
a) ∀X P (X)→Q(f(X), a)
b) ∃X P (f(X)) ∧Q(X, f (a))
c) ∃X¬P(X)∧Q(X, a)
d) ∀X∃Y P (X)∧Q(X, Y )
e) ¬∃X∀Y Q(f(Y), X)
3. Show that the following first-order theory is satisfiable by giving a model that satisfies it. (In
this problem, Xand Yare variables, while aand bare constant terms.)
{∀X∀Y P (X, Y )→Q(Y),P (a, f (b)),¬Q(a)∧ ¬Q(b)}
4. Determine whether or not the following pairs of predicates are are unifiable. If they are, give
the most-general unifier and show the result of applying the substitution to each predicate. If they
are not unifiable, indicate why. Variables are in capital letters; constants are lowercase.
a) P(a, X, f(g(Y))) and P(Z, f (Z), f (U))
b) Q(f(a), g(X)) and Q(Y , Y )
c) R(f(Y), Y, X ) and R(X, f (a), f (V))
d) P(a, Y, f (X)) and P(X, f (b), f (b))
e) Q(g(f(a)), g(X), Z) and Q(Y, Y , f(X))
f) P(a, X , g(f(f(a)), X)) and P(Z, f(Z), g (Y),f (Z)))
g) Q(f(a, a), Y, Z ) and Q(X, f (Z, Z ), Y )
5. Using first-order rules of inference, prove that “there exists a vegetarian” from the following pieces
of knowledge: anyone who does not eat meat is a vegetarian, tomatoes are not meat, carrots are not
meat, and there is someone who eats only tomatoes and carrots. The initial sentences (premises)
are translated into first-order logic for you below. The goal is to generate: ∃X vegetarian(X).
Be sure to explicitly label each new sentence with the one(s) it was derived from, along with the
inference rule and any substitution used.
∀P(∀X eat(P, X )→ ¬meat(X)) →vegetarian(P)
∀X tomato(X)→ ¬meat(X)
∀X carrot(X)→ ¬meat(X)
∃P∀X eat(P, X )→(tomato(X)∨carrot(X))
1

Partial preview of the text

Download Homework 5 for CPSC 625: First-Order Logic Problems and more Assignments Computer Science in PDF only on Docsity!

CPSC 625 – Homework 5

due: Mon, Oct 30, 2006

  1. Prove the following equivalence using model theory for FOL: ¬∃x Γ(x) ≡ ∀x ¬Γ(x), where Γ(x) is a sentence containing the variable x.
  2. Prove that Existential Introduction is a sound rule of inference in FOL: Γ(a) ⊢ ∃x Γ(x), where Γ(a) represents some sentence that contains the constant term a, which is replaced by the (new) variable x throughout.
  3. Consider the following model for a first-order logic theory containing the constant a, the function f, and predicates P and Q: universe is U = { 1 , 2 }; denotations are a 7 → 1, f (1) = 2 and f (2) = 1; extensions are P = {〈 2 〉}, and Q = {〈 1 , 1 〉, 〈 1 , 2 〉, 〈 2 , 2 〉}. Determine the truth value of the following sentences in the model. Be sure to show all of your work.

a) ∀X P (X) → Q(f (X), a) b) ∃X P (f (X)) ∧ Q(X, f (a)) c) ∃X ¬P (X) ∧ Q(X, a) d) ∀X ∃Y P (X) ∧ Q(X, Y ) e) ¬∃X ∀Y Q(f (Y ), X)

  1. Show that the following first-order theory is satisfiable by giving a model that satisfies it. (In this problem, X and Y are variables, while a and b are constant terms.)

{∀X ∀Y P (X, Y ) → Q(Y ), P (a, f (b)), ¬Q(a) ∧ ¬Q(b)}

  1. Determine whether or not the following pairs of predicates are are unifiable. If they are, give the most-general unifier and show the result of applying the substitution to each predicate. If they are not unifiable, indicate why. Variables are in capital letters; constants are lowercase.

a) P (a, X, f (g(Y ))) and P (Z, f (Z), f (U )) b) Q(f (a), g(X)) and Q(Y, Y ) c) R(f (Y ), Y, X) and R(X, f (a), f (V )) d) P (a, Y, f (X)) and P (X, f (b), f (b)) e) Q(g(f (a)), g(X), Z) and Q(Y, Y, f (X)) f) P (a, X, g(f (f (a)), X)) and P (Z, f (Z), g(Y ), f (Z))) g) Q(f (a, a), Y, Z) and Q(X, f (Z, Z), Y )

  1. Using first-order rules of inference, prove that “there exists a vegetarian” from the following pieces of knowledge: anyone who does not eat meat is a vegetarian, tomatoes are not meat, carrots are not meat, and there is someone who eats only tomatoes and carrots. The initial sentences (premises) are translated into first-order logic for you below. The goal is to generate: ∃X vegetarian(X). Be sure to explicitly label each new sentence with the one(s) it was derived from, along with the inference rule and any substitution used.

∀P (∀X eat(P, X) → ¬meat(X)) → vegetarian(P ) ∀X tomato(X) → ¬meat(X) ∀X carrot(X) → ¬meat(X) ∃P ∀X eat(P, X) → (tomato(X) ∨ carrot(X))