I want to translate some sentences into predicate logic [based off the text "Language, Proof and Logic" (Barwise, Etchemendy) 1st ed].
The sentences are as follows:
- Only in front of large objects is nothing.
- Each tetrahedron is in front of all dodecahedra.
No tetrahedron is the exact same size as a cube.
Every small cube is to the left of a large tetrahedron.
- there is a large tetrahedron which lies to the right of every cube.
- nothing is behind a cube.
I have formulated solutions and tested them using the program Tarski's World using worlds in which I expect the sentences to be true and worlds in which I expect the sentences to be false.
- $\forall x ( Large(x) \to \neg \exists y \ FrontOf(y,x))$
- $\forall x \forall y \ ((Tet(x) \land Dodec(y)) \to FrontOf(x,y))$
$\neg \exists x \ (Tet(x) \land \exists y (Cube(y) \land SameSize(x,y)))$
$\forall x \ ((Small(x) \land Cube(x)) \to \exists y (Large(y) \land Tet(y) \land LeftOf(x,y)))$
- $\forall x \ (Cube(x) \to \exists y \ (Tet(y) \land Large(y) \land RightOf(y,x)))$
- $\exists x \ (Cube(x) \to \neg \exists y \ BackOf(y,x)) $
Could anyone please verify that the sentences are correct/have been sensibly formulated? Does anyone have alternative suggestions?
Your 6 is not correct. Now, as dxiv points out in the comments, 6 actually has two different interpretations, but your translation does not capture either of them.
The first reading of 6 is:
"There is a cube with nothing behind it".
In logic, this would be:
$$\exists x (Cube(c) \land \neg \exists y \ BackOf(y,x))$$
The second reading is:
"Nothing is behind any cube"
which translates as:
$$\neg \exists x (Cube(x) \land \exists y \ BackOf(y,x))$$
Note in both cases you get a $\land$ in combination with an $\exists$ ... this is what very often* happens when you translate into first-order logic: $\forall$'s tend to go hand in hand with $\rightarrow$, while $\exists$'s tend to go with $\land$'s .. this is not a strict rule, but many English sentences, when translated, end up as such. Indeed, this is how I immediately spotted your mistake for $6$: I just scanned for those combinations, and when I saw your $\exists$ together with a $\rightarrow$, I knew there was a good chance your translation was wrong.