$\exists\text{ set }X:X=X^X$? Given sets A and B, define the set $B^A$ to be the set of all functions A $\to$ B.
My question is: Is there a set X such that X = $X^X$?
Has this something to do with the axiom of regularity?
 A: Hint: 


*

*By a cardinality argument it follows $|X|=1$.

*Now, can such a $X$ satisfy $X = X^X$?

A: Recall that a function $X\to X$ is really a subset $f\subseteq X\times X$ satisfying the requirement $$\forall a\in X.\ \exists! b\in X.\ (a, b)\in X.$$ Also, note that a pair $(a, b)$ is defined as the set $\{\{a\}, \{a, b\}\}$.
Now, suppose there is an $X$ with $X=X^X$. Since $\emptyset$ is obviously not the same as the set $\emptyset^{\emptyset}=\{\mathrm{id}_\emptyset\}$ and for $X$ with $|X| \geq 2$ we have $|X^X| \geq |2^X|> |X|$ and therefore $X\not = X^X$, we can infer that $|X|=1$. Let $X=\{\bullet\}$. This unique element $\bullet\in X$ has to be equal to the function $\mathrm{id}_X$ because we supposed $X$ to be the same as $X^X = \{\mathrm{id}_X\}$. According to our definitions $$\mathrm{id}_X=\{(\bullet, \bullet)\}=\{\{\{\bullet\}, \{\bullet, \bullet\}\}\}=\{\{\{\bullet\}\}\}.$$ But we have already said that $\mathrm{id}_X=\bullet$. Hence $\bullet=\{\{\{\bullet\}\}\}$ which is forbidden by the axiom of regularity.
