# How do I translate this sentence with predicate logic?

I have the following sentence that I'm trying to translate into a predicate formula:

"All doctors that do not treat themselves, are treated by a doctor"

If I'm right, this translates to : $\forall x \exists y ((Dx \wedge \neg Txx) \rightarrow (Dy \wedge Tyx \wedge x \neq y))$

Dx: x is a doctor Txy: x treats y

Also, "All doctors that do not treat themselves, are not treated by any doctor" would be $\forall x \neg\exists y ((Dx \wedge \neg Txx) \rightarrow (Dy \wedge Tyx \wedge x \neq y))$ (I hope I'm right on these two)

However, I'm having a hard time figuring out what to do with the following sentence:

"If a doctor does not treat himself, then he does not treat everyone that doesn't treat themselves."

Even without the bit on the end (so "If a doctor does not treat himself, then he does not treat everyone.") I'm still not sure how to translate it. I think that the existential quantifier has to be at the beginning of the formula for a doctor x, but where do I place the universal quantifier? So:

$\exists x \forall y((Dx \wedge \neg Txx) \rightarrow (\neg Txy)$

or

$\exists x (Dx \wedge \neg Txx) \rightarrow \forall y(\neg Txy)$ ?

and then how do I do the last bit?

If anyone has any tips, I would love to hear!

Your first two translations are correct, though you don't need the $x \not = y$ (given that $x$ does not treat himself, while $y$ does treat $x$, it logicslly follows that $x \not = y$, so you can delete that ... it's also not stated explicitly in the original sentence anyway.

More importantly, I don't like how you are putting the quantifier for the $y$ at the very beginning of the statement. That is, I think a more readable translation for the first statement would have been:

$$\forall x ((Dx \land \neg Txx) \rightarrow \exists y (Dy \land Tyx))$$

and for the second sentence:

$$\forall x ((Dx \land \neg Txx) \rightarrow \neg \exists y (Dy \land Tyx))$$

In fact, I believe your inclination to try and put quantifiers at the beginning of the statement is exactly what gets you in trouble for the third sentence as well. That is, for that third sentence ... or at least the part you indicated... you want to move the quantifier further inside yet ... inside the negation in fact.

Why? Well, 'not everyone' effectively means 'not all', and thus you get some kind of $\neg \forall$. To be specific, to translate that '$x$ does not treat everyone' you should get:

$$\neg \forall y \ Txy$$

and thus for 'if $x$ is a doctor who does not treat himself, then he does not treat everyone' you get:

$$\forall x ((Dx \land \neg Txx) \rightarrow \neg \forall y \ Txy)$$

So, by breaking up the statement bit by bit, the quantifiers automatically end up in the right spot, even if that is not at the beginning of the sentence. And that's just fine, and often indeed much easier for translation purposes. And if, for some other purpose, you need the quantifiers at the beginning of the statements, then you can always do this afterwards. In sum: don't feel the need to put them all at the beginning, but instead introduce them when appropriate as you are breaking down the sentence!

Now, can you see how to modify the last translation to get your whole third sentence?

• Thanks so much for helping me out! I had to think long and hard on this one and I'm not sure at all if this is right, but here is my attempt: $\forall x ((Dx \wedge \neg Txx)) \wedge \forall y (\neg Tyy)) \rightarrow \neg Txy$ So basically, "If x is a doctor that doesn't treat himself and y is everyone that doesn't treat themselves then x does not treat y.
– Rose
Commented Dec 3, 2017 at 16:39
• Also, why wouldn't it be the existential quantifier for x, since there is a doctor, not all doctors?
– Rose
Commented Dec 3, 2017 at 16:41
• @Rose No, you took the quantifier outside the negatin again. The 'x does not treat everyone who does not teat themselves' is the negation of 'x does treat everyone who does not treat themselves'. Since the latter is $\forall y (\neg Tyy \rightarrow Txy)$, the former is $\neg \forall y (\neg Tyy \rightarrow Txy)$ ... so that should be the second part of the sentence. Commented Dec 3, 2017 at 16:55
• @Rose Think of the sentence: 'if something is a snake, then it is dangerous' ... should this be an existential or a universal? Commented Dec 3, 2017 at 16:56
• Ah yes I get it now! Thanks again for helping me, I'll keep practising!
– Rose
Commented Dec 3, 2017 at 16:58