Why isn't $\sqrt[12]{\left(-1\right)^6}$ equal to $\sqrt{-1}$? Why isn't $\sqrt[12]{\left(-1\right)^6}$ equal to $\sqrt{-1}$? Clearly, the square root isn't defined. We have divided the index and the exponent by $6$. The theorem says that $$\sqrt[nk]{a^{mk}}=\sqrt[n]{a^m}$$ where $a\ge0$. How does it work when $a<0$, or it doesn't?
PP. I see that we can write $\sqrt[12]{(-1)^6}=\sqrt[12]{1^6}=1,$ but my question still holds.

If $\ x\in\mathbb{R}\ $ and $\ x>0,\ $ then $\ x^y\ $ is well-defined and unique for any $\ y\in\mathbb{R}.\ $ This is, for example, an exercise left to the reader in Rudin's PMA chapter $1.$
If $\ x\in\mathbb{R}\ $ and $\ x<0,\ $ then $\ x^y\ $ is well-defined if and only if $\ y\ $ is an integer. Basically, attempts to define $\ x^y\ $ if $\ x<0\ $ always runs into problems, one of which you encountered in your question.
However, in $\ \mathbb{C}\ $ we do not get analogous issues: if $\ x,y\in\mathbb{C}\ $ then $\ x^y\in\mathbb{C}.$
