TITLE: Is $\{x\}$ an element of $\{x,\{x,y\}\}$ or not?
QUESTION [5 upvotes]: I'm a math teacher and I have a doubt about this question
$\{x\}\in\{x,\{x,y\}\}$
is true or false? And why? 
I think it's true because $\{x,y\}=\{x\}\cup\{y\}$ then...
But I'm not sure.
Thanks!

REPLY [4 votes]: By the definition of set enumeration notation,
$$\{ x \} \in \{ x, \{ x, y \} \}$$
if and only if
$$ \{ x \} = x \qquad \text{or} \qquad \{ x \} = \{ x, y \} $$

For the second case,
$$\{ x \} = \{ x, y \} $$
if and only if
$$ \{ x \} \subseteq \{ x, y \} \qquad \text{and} \qquad \{ x \} \supseteq \{ x, y \} $$
if and only if (since the first case is always true we only need to check the second case)
$$ x \in \{ x \} \qquad \text{and} \qquad y \in \{ x \} $$
if and only if (since the first case is always true we only need to check the second case)
$$ y = x$$

Therefore,
$$\{ x \} \in \{ x, \{ x, y \} \}$$
if and only if
$$ x = \{ x \} \qquad \text{or} \qquad y = x $$
...
Depending on your particular version of set theory (e.g. "axiom of foundation"), $x = \{ x \}$ can never be true. In that case, we can follow up with
... if and only if $y = x$