Is $e^\pi$ equal to $(e^{i\pi})^{-i}$? Fermat's Library tweeted five hours ago that $e^\pi$ can be proved to be transcendental as follows. Let $A=-1$ and $B=-i$. Then $A$ and $B$ are algebraic numbers, $A\ne0,1$ and $B$ is not rational. Therefore, by Gelfond-Schneider theorem,
$$A^B=e^\pi=(e^{i\pi})^{-i}=(-1)^{-i}\tag{1}$$
is a transcendental number.
The same equality $(1)$ is also mentioned in Wikipedia, but I am confused because an answer on this site stated that the rule $x^{yz}=(x^y)^z$ is valid only when $x>0$ and $y$ is real. Does the rule really apply here? Is the proof in the aforementioned tweet valid?
 A: Just because an identity does not hold generically, does not mean that there are no coincidences where it seems to work anyway.
Having chosen a branch of the logarithm, we may write the complex exponential
$$  (-1)^{-\mathrm{i}} = \mathrm{e}^{-\mathrm{i} \ln(-1)}  $$
and proceed from there.  
If we do not wish to choose a branch of the logarithm, we instead write
$$  (-1)^{-\mathrm{i}} = \mathrm{e}^{-\mathrm{i} (\ln(-1) + 2 \pi \mathrm{i} k)}  $$
for some choice of integer $k$ (which choice is equivalent to a choice of branch).  Then we can evaluate $\ln(-1)$ on any branch, for instance $\ln(-1) = \mathrm{i} \pi$.  And finally, \begin{align*}
-\mathrm{i} (\ln(-1) + 2 \pi \mathrm{i} k) &= -\mathrm{i}(\mathrm{i} \pi + 2\pi \mathrm{i}k)  \\
&= \pi + 2 \pi k  \text{.}
\end{align*}
So
$$  (-1)^{-\mathrm{i}} = \mathrm{e}^{\pi + 2 \pi k}  \text{,}  $$
where the choices of $k$ correspond to different choices of branch of logarithm in defining the complex exponential.  If we choose the branch with $k = 0$, we recover the claimed identity.
