Nested quantifiers: Is my answer right?

70 Views Asked by At

I need to express this proposition using predicates and quantifiers

There is a person who loves no one beside him

where $Q(x,y)$ = $x$ loves $y$.

And domain of $x$ and $y$ consists of all people.

Here is my answer:

$\exists x(Q(x,x) \land \forall y((y \neq x) \rightarrow \lnot Q(x,y)))$

Is this right?

2

There are 2 best solutions below

2
On BEST ANSWER

Yes, this is right, but I prefer the elegant $$ \exists x \forall y \big(Q(x, y) \leftrightarrow (x = y)\big)$$

3
On

Looks correct.

I don't know you edited your post, but for now there is also no parenthesis missing.

(note that $\varphi$ and $\psi$ is two formula then $\lnot\varphi$,$\forall x\varphi$,$\exists x\varphi$,$(\varphi\land\psi)$,$(\varphi\lor\psi)$,($\varphi\rightarrow\psi$) are well-written formulas as well)

You can also write without arrows :

$\exists x(Q(x,x)\land\forall y(\lnot Q (x,y)\lor y=x))$