Let the predicate $ E(x,y) $ represent the statement "Person x eats food y". Let the predicate $ M(y) $ represent the statement "Food y is a meat product".
(a) Express the following statement in predicate logic: "Someone is a vegetarian". (b) Express the following statement in predicate logic: "Nobody (except maybe John) eats lasagna."
How could I write these statements in predicate logic ?
Could I do the following for the first one ?
$ \exists x\; E(x, beans) $
I don't know about the second one.
What you wrote was: "There is a person who eats beans." But that's not quite equivalent to "Someone is a vegetarian.", since it's possible that all people on earth eat both beans and meat. Instead, try something like: $$ \exists x ~ \forall y ~ [M(y) \to \neg E(x,y)] $$ which reads to be something like: "There is a person named $x$ such that for any meat product $y$, $x$ doesn't eat $y$."
For the second statement, try convincing yourself that it's equivalent to: "The only person who might eat lasagna is John." Then we get something like: $$ \forall x ~ [E(x, \text{lasagna}) \to x = \text{John}] $$