# Predicate Logic Expression: “Nobody loves anybody.”

Express the following in predicate logic: "Nobody loves anybody."

$$P(x): \text{x is a person.}$$ $$L(x,y): \text{x loves y.}$$

My attempt was:

$$\neg[\exists x(P(x) \land \forall y P(y) \longrightarrow L(x,y))]$$

Although my instructor wrote it as:

$$\neg[\exists x(P(x) \land ( \forall y P(y) \longrightarrow L(x,y)))]$$

I do not get why he nested the implies in separate parentheses.

More so I am not able to semantically tell the difference between the two formulae.

Anyone?

• It's about operator precedence. $p\wedge q \to r$ is usually interpreted as $(p\wedge q)\to r$ rather than $p\wedge (q\to r)$ though not always. Personally I'd have wrapped the quantifier scope; $$\neg\exists x~\Big(P(x)\wedge \forall y~\big(P(y)\to L(x,y)\big)\Big)$$ which is "nobody loves everybody," by the way. – Graham Kemp Feb 17 '16 at 5:22
• Nobody loves anybody does not have the same meaning as nobody loves any body. – André Nicolas Feb 17 '16 at 5:27
• @Sharma: Sorry, miscounted. – André Nicolas Feb 17 '16 at 5:31
• @AndréNicolas I did too. The (pointless) outer brackets don't help. – BrianO Feb 17 '16 at 5:36

Actually both of the formulas you have are wrong in some way. In both, the $\forall y$ only binds the $y$ in $P(y)$, leaving the $y$ in $L(x,y)$ free. In your professor's sentence, the parenthesis before $\forall y$ should come right after it. Finally, there's no need for the outer brackets. Thus: $$\neg\exists x~\Big(P(x) \land \forall y \big(P(y) \to L(x,y)\big)\Big)$$ However, this isn't right: it's equivalent to \begin{align} \forall x~\Big(P(x) \to \neg\forall y~\big(P(y) \to L(x,y)\big)\Big) &\iff \forall x~\Big(P(x) \to \exists y~\big(P(y) \land \neg L(x,y)\big)\Big) \end{align} which means "everybody doesn't love someone", or equivalently, nobody loves everybody. Everybody does not mean anybody. I am assuming that "nobody loves anybody" does not mean the same thing as "nobody loves just anybody" (i.e. everybody).
I take "nobody loves anybody" to mean for all people $x$ and $y$, $x$ does not love $y$: $$\forall x~\forall y~\Big(\big(P(x)\land P(y)\big)\to \neg L(x,y)\Big)$$