If we have an infinite set $|X|$, does $2^{|X|}=|X|^{|X|}$ hold in ZF? In the other words, is there a bijection between $\mathcal P(X)$ and $X^X$?
I understand that if we have well-order on $X$ then I can get $$2^{|X|} \le |X|^{|X|} \le 2^{|X\times X|} = 2^{|X|},$$ but this argument uses $|X\times X|=|X|$. (Which is true if I assume existence of a well-order on $X$, but this is not necessarily true in ZF.)
Am I correct in assuming that in ZF the above equality may fail? What would be a simple argument to show this?
I got interested in this after reading this in Noah Schweber's answer to: What is $\aleph_0!$?
And this can be simplified further: it turns out $\kappa^\kappa=2^\kappa$, always. Clearly we have $2^\kappa\le\kappa^\kappa$, and in the other direction $$\kappa^\kappa\le (2^\kappa)^\kappa=2^{\kappa\cdot\kappa}=2^\kappa.$$
By the way, the equality $\kappa^\kappa=2^\kappa$ can be proved in ZF alone, the key point being that Cantor-Bernstein doesn't need choice.
I was able to find similar argument in: Cardinal power $\kappa^\kappa$. When is it equal to $2^\kappa$?, Proving $|A^A|=|2^A|$ for infinite $A$. (In both cases the argument uses $\kappa\cdot\kappa=\kappa$ or $|A\times A|=|A|$.)
I had also look at Andreas Blass' answer to the related question Cardinality of the permutations of an infinite set. If I understood that answer correctly, $|\mathcal P(X)|=|X^X|$ can indeed fail in ZF. But maybe there is an easier argument if we are working with all functions (not just bijections).