Quantified logic: are these two statements equivalent?

The statement that I need to convert to quantified logic is the following: There is a student in your class who has sent everyone else in your class an email message.

$$M(x, y) = x \text{ sent } y \text{ an email}$$

The solution in the book is: $$\exists x \forall y ((x \neq y) \rightarrow M(x, y))$$

Is that equivalent to my solution: $$\exists x \forall y (M(x, y) \ \land \ x \neq y)$$

• One thing you can check for problems like this is "what if there are only 2 students in class, are the expressions equivalent in that case". – DanielV Feb 11 '18 at 1:37

No, your answer is incorrect. Saying $\forall y(M(x,y) \wedge x \ne y)$ means, in part, that for every $y$, we have $x \ne y.$ This isn't true, because $y$ could very well be $x$. What you need to say is just what the book says: if $y$ is not $x$, then $x$ sent $y$ an email.
• Yes, $y \ne x$ means exactly the same thing as $x \ne y,$ so either both are right, or both are wrong. – saulspatz Feb 10 '18 at 22:40