Artificial intelligent assistant

Does this rule I found really work? I was playing a bit whit exponents. I maybe found a working formula for calculating $n^y$ if you know $n^x$. The formula may already be discovered, but the formula I found is: $$ (n^x)^\frac{y}{x} = n^y $$ Ok, so the formula should work if $n,x,y \in \mathbb N$ I am not sure if it does work whit negative and decimal numbers tho. Ok, my questions are: 1\. Can the formula be used whit decimal, and negative numbers (x,y,n) 2\. Can you prove that the formula works if $x,y,n \in \mathbb N$, if it is possible also for $x,y,n \in \mathbb Q$, $x,y,n \in \mathbb R$ and $x,y,n \in \mathbb Z$.

Let $n=-1$, $x=2$ and $y=1$. Then you have

$$((-1)^2)^{1/2} = 1^{1/2} = 1$$

but

$$(-1)^1 = -1.$$

So your rule fails.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a99384fe7c20fa314aab595a3989de7f