Predicate logic challenge formula

112 Views Asked by At

Logic is my new hobby, I recently got into it and it is so interesting but sometimes challenging. Please don't be to harsh with me because I am a beginner. I am trying to translate the following English sentences into a predicate logic formula:

  1. An eagle is happy if all of its children can hunt.
  2. Only black eagles like eating and hunting.

I am restricted to using these predicates: eagle, childOf, canHunt, black, likesEating and likesHunting.

This is how I am thinking of solving the first one:

Domain of discourse: dragon (x).

∃x • (∀ childOf(x) -> canHunt)

Meaning Some eagles are happy (if all of its children -> can hunt).

For the second one:

(likedEating(x) ∧ likesHunting)⇔ black (x)

Meaning x likes eating and likes hunting if and only if x is a black eagle.

Do you think this is correct? What is the correct version?

Thanks!

1

There are 1 best solutions below

0
On

To my ears, (1) is a generic statement about all eagles. Even though the indefinite article "an" is used, the sentence isn't talking about some particular eagle. So I would formalize this as $$\forall x \big(\big[\text{eagle}(x) \wedge \forall y(\text{childOf}(y,x) \to \text{canHunt}(y) \big] \to \text{happy}(x) \big).$$

I have introduced the predicate "happy", which you didn't include but which seems to be needed.

A few other things to note about (1): "childOf" is a binary predicate. It doesn't make sense to say "$y$ is a child of," rather "$y$ is a child of $x$" is what's needed. Finally, predicates need to be paired with variables or constants. The formula you wrote, with "canHunt" occurring alone in the consequent, is not well-formed.

For (2), I think you are almost there, but there are a few problems. First, you have free variables in the formula that you wrote, so this is not yet a sentence. You'll need to introduce a quantifier to bind these variables. Second, what you wrote says, "$x$ is black if and only if $x$ likes eating and hunting." So far, this doesn't say anything about eagles, so you'll need to fix that.