All books that i am reading are telling that the identiy $ a^x = a^y \Longrightarrow x=y ; \,\,\,\,\, a \in \mathbb{R} - \{0,1\} $ $ \,\,\,\,$ also do not work for $a<0$, but, for example, if $ (-2)^2 = (-2)^x $, than for sure $x=2$.
Than, the identity works for $a<0$, correct?