TITLE: A statement equivalent to $\exists ! x P(x)$
QUESTION [9 upvotes]: I'm trying to write a statement in logic symbols that says there is a unique $x$ such that $P(x)$ is true. I've heard of writing this down as $\exists !x P(x) $. But I think I'm not allowed to use the symbol $\exists !$. Now I'm trying to write an equivalent statement without using that symbol. I've come up with two statements, but I'm not sure if one of them is correct:

$\exists x ,\lnot \exists y (P(x) \land P(y) \land \lnot (x=y))$
$\exists x P(x) \land \lnot \exists y (P(y) \land \lnot (x=y))$

My doubt with the first one is that I've never seen a construction like $\exists x, \lnot \exists y (...)$. 
My doubt with the second one is that I'm not sure if the variable $x$ in this part $\lnot \exists y (P(y) \land \lnot (x=y))$ is interpreted as a free variable or as the variable with the property $\exists x P(x) $.

REPLY [6 votes]: In your second expression, you have all the right pieces (propositions) covered, but you need to check which parentheses you need to "put the pieces together".
Note that in what you wrote:
$$\color{blue}{\bf \exists x P(x)} \land \color{red}{\bf \lnot \exists y (P(y) \land \lnot ({\color{black}{\bf  x}}=y))}$$
...we have the conjunction of two statements (joined by $\land$). The appearance of $x$ in the right hand expression is unrelated to its appearance in the left hand (blue) proposition. That is, $x$ is unbound on the right. We want to say that its appearance on the right is the same $x$ we are bounding on the left, so we need a large bracket to enclose everything that follows $\exists x$. That gives us:
$$\color{blue}{\bf \exists x \Big[P(x) \land \lnot \exists y (P(y) \land \lnot (x=y))\Big]}\tag{$\dagger$}$$
And with the added bracket, all is good: $\dagger$ is now equivalent to $\exists\, !\, x \,P(x)$.