Which of the following statements express the given sentence? Why not both?

Solution 1:

The second “answer” is a true statement, but does not express the same thing as the first. To see that they are not equivalent, suppose that D(x,y) meant that x=y.

Then the first “answer” would be a false statement, since there would exist a prime X such that there was no non-prime y that equaled it.

However, the second “answer” would still be a true statement, since for every prime x there exists a prime y, which makes the first part of the implication false, making the statement true.

In the second “answer”, you can replace D(x,y) by any proposition, and the statement would still be true.

Solution 2:

Both of the statements that you wrote are logically true within the given domain, which means that they are logically equivalent. However, the second one does not represent exactly the sentence given. Now to see that, it might be clearer to covert your statements to syntax. Remember: $p\rightarrow q$ is equivalent to $\lnot p \lor q$, and $\exists$ distributes over $\lor$. So your statements become

1). \begin{align*}&(\forall x)(\exists y) [p(x)\rightarrow (p(y)\wedge D(x,y))] \\\equiv & (\forall x)(\exists y) [\lnot p(x)\lor(p(y)\wedge D(x,y))] \\\equiv & (\forall x)[ \lnot p(x)\lor(\exists y)(p(y)\wedge D(x,y))] \end{align*}

2). \begin{align*}&(\forall x)(\exists y) [p(x)\wedge \lnot p(y)\rightarrow D(x,y)] \\\equiv & (\forall x)(\exists y) [\lnot p(x)\lor p(y)\lor D(x,y))] \\\equiv & (\forall x) [\lnot p(x)\lor (\exists y)p(y)\lor (\exists y)D(x,y))] \end{align*}

It is clearer now that the second statement is true for a wider range of $y$'s, given $x$. For instance, for $x=2$, the choice $y=3$ makes the second statement true (since $p(3)$ is true). However, $y=3$ does not make the first statement true, since $D(2,3)$ is false.