# Translating english sentences to predicate logic

Trying to practice translating english sentences into predicate logic and vice versa.

• $$E(x,y)$$: $$x$$ can eat $$y$$
• $$L(x,y)$$: $$x$$ loves eating $$y$$
• $$D$$ is the domain of all dogs
• $$S$$ is the domain of all snakes

(a) English to Predicate Logic:

A dog can eat any snake, only if they are different from some other dog who can also eat any snake:
$$\forall a \in S,\forall b \in D,\exists c \in D, E(b,a)\implies b \ \ne c \ \wedge E(c,a)$$

(b) Predicate Logic to English:

$$\forall a \in S,\forall b \in D, \forall c \in S ,\sim \ \bigg[\ a\ \ne c \ \wedge E(a,c)\bigg] \iff L(a,b)$$:

Not all snakes is the same as some other snake, or that not all snakes can eat some other snake, if and only if, all snakes loves eating all dogs. This part sounds a bit weird to me and can possibly be condensed.

Any thoughts on both (a) and (b)?

## 1 Answer

(b) No snake will eat a snake other than itself, iff it loves eating dogs.

(a) If any dog can eat any snake, then there is another dog that can eat all the snakes.

• Is your reponse for (b) a condensed version or is it totally different? Could you explain your reasoning - I am still a bit curious about how you translated (b). – u7283 Oct 24 '18 at 19:34
• @JFOXX It is the condensed version, but your translation is slightly wrong you put or, where it needs to be and: not all snakes is the same as every other snake and it can't eat the other snakes iff it loves eating dogs. – Bertrand Wittgenstein's Ghost Oct 24 '18 at 19:39
• But doesn't the negation flip the sign to 'or'? – u7283 Oct 24 '18 at 19:41
• @JFOXX non mathematical equalities are wierd. They are not treated as a separate conjunct. On the other hand, of it were a mathematical equality, then yes. You would need to flip the conjunction. – Bertrand Wittgenstein's Ghost Oct 24 '18 at 20:06
• Thank you Bertrand! – u7283 Oct 24 '18 at 22:10