I need some help translating the following English sentences to predicate logic. I want to make sure I'm doing it correctly.
- Every duck whose all ducklings cannot swim is worried.
My attempt: ∀X(∀Y (duck(X)∧duckling(Y,X)∧ cannotswim(Y)) → worried(X))
- Every duck cannot swim.
My attempt: ∀X (duck(X) → cannotswim(X))
- Every duck who has a yellow duckling is yellow.
My attempt: ∀X(∀Y (duck(X)∧duckling(Y,X)∧yellow(Y)) → yellow(X))
Goal: "Every yellow duck is worried"
∀X( (duck(X) ∧ yellow(X)) → worried(X))
Are any of these incorrect or do I seem to be doing it OK?
In 1: To say that all the ducklings of $x$ cannot swim you need:
$$\forall y (duckling(y,x) \rightarrow cannotswim(y))$$
and hence you end up with:
$$\forall x((duck(x) \land \forall y (duckling(y,x) \rightarrow cannotswim(y))) \rightarrow worried(x))$$
If you mean that a duck is worried as soon as any one (i.e some of its ducklings cannot swim, it would be:
$$\forall x((duck(x) \land \exists y (duckling(y,x) \land cannotswim(y))) \rightarrow worried(x))$$
or equivalently:
$$\forall x \forall y ((duck(x) \land duckling(y,x) \land cannotswim(y)) \rightarrow worried(x))$$
(you can think of the latter as: 'for any duck and duckling pair where the duckling cannot swim, the duck is worried')
In 3 you also just need some yellow duckling, so you should get:
$$\forall x (\exists y(duck(x) \land duckling(y,x) \land yellow(y)) \rightarrow yellow(x))$$
or equivalently:
$$\forall x \forall y((duck(x) \land duckling(y,x) \land yellow(y)) \rightarrow yellow(x))$$
(you can think of the latter as: 'for any duck and duckling pair where the duckling is yellow, the duck is yellow as well')
Your 2. is fine, and your conclusion is symbolized correctly as well