Problems in formalizing these sentences

93 Views Asked by At

This is the first sentence that I have to formalize:

"Every student likes at least one type of cake"

Let:

  • $S(x)$ stands for 'x is a student'
  • $C(x)$ stands for 'x is a type of cake'
  • $L(x,y)$ stands for 'x likes y'

My formalisation is:

$\forall x (S(x)\rightarrow \exists y (C(y) \wedge L(x,y)))$

Is it correct? Or should I write:

$\forall x \exists y (S(x)\wedge C(y) \rightarrow L(x,y))$ ?

The second sentence is:

"There is a type of cake such that every student likes it"

Is the following formalisation correct?

$\exists x (C(x) \wedge \forall y (S(y) \rightarrow L(y,x)))$

Many thanks for the help

1

There are 1 best solutions below

2
On BEST ANSWER

In short:

  • formalization $\forall x (S(x)\rightarrow \exists y (C(y) \wedge L(x,y)))$ is correct;
  • formalization $\forall x \exists y (S(x)\wedge C(y) \rightarrow L(x,y))$ is not correct, suppose that there is an object $y_0$ which is not a cake (perhaps a student), then setting $y = y_0$ would make the formula true even if all students dislike all cakes;
  • formalization $\exists x (C(x) \wedge \forall y (S(y) \rightarrow L(y,x)))$ is correct.

To give you some intuition:

  • You could think of unary predicates as sets, in particular

$$\forall x \in S\ (\Phi)\quad \text{ is equivalent to } \quad\forall x \big(S(x) \to \Phi\big)$$ $$\exists x \in S\ (\Phi)\quad \text{ is equivalent to } \quad\exists x \big(S(x) \land \Phi\big)$$

  • Your first formula is $\forall x \in S\ \Big( \exists y \in C\ \big(L(x,y)\big)\Big)$.
  • Your second formula can be rewritten as \begin{align} &\forall x \exists y \big(S(x)\wedge C(y) \rightarrow L(x,y)\big)\\ &\forall x \exists y \Big(S(x)\to \big(C(y) \to L(x,y)\big)\Big)\\ &\forall x \Big(S(x)\to \exists y \big(C(y) \to L(x,y)\big)\Big)\\ &\forall x \in S\ \exists y \Big(C(y)\land\big(C(y) \to L(x,y)\big) \lor \neg C(y)\land\big(C(y) \to L(x,y)\big)\Big)\\ &\forall x \in S\ \exists y \Big(C(y)\land L(x,y) \lor \neg C(y)\Big)\\ &\forall x \in S\ \Big(\exists y \big(C(y)\land L(x,y)\big) \lor \exists y \big(\neg C(y)\big)\Big)\\ &\forall x \in S\ \Big(\exists y \in C\ \big(L(x,y)\big) \lor \exists y \in \overline{C}\Big)\\ \end{align} which could be read as "for every student there is a cake that he likes or something which is not a cake".
  • Your third formula is $\exists x \in C\ \Big(\forall y \in S\ \big(L(y,x)\big)\Big)$.

I hope this helps $\ddot\smile$