# using predicate logic how would is say: There are at least two students who have all three pets.

Using predicate logic where the pets are cats, dogs, and parrots ($C(x)$, $D(x)$, and $P(x)$ respectively). How would you translate the sentence: There are at least two students who have all three pets. Where the domain is all students in class.

I came to the answer: $\exists x \exists y ~ ((P(x) \land D(x) \land C(x) \land (D(y) \land P(y) \land C(y) \land (x \ne y)))$.

This can be read as for some $x$, $x$ has all three pets and for some $y$ that is not $x$ has all three pets.

Can someone please tell me if this is correct? I think it is wrong. Don't I have to say something about the rest of the domain besides just these two?

• It looks correct to me Sep 9 '15 at 23:45
• You only care about $x$ and $y$, it's okay that you don't say anything about the rest of the domain Sep 10 '15 at 0:06

Yes, you have the basic form of: $\exists x \,\exists y\,\Big(\big(x\neq y\big)\wedge Q(x)\wedge Q(y)\Big)$