reserve x for set;
reserve a, b, c, d, e for Real;
reserve m, n, m1, m2 for Nat;
reserve k, l for Integer;
reserve p for Rational;

theorem
  for n being Nat st n>=1 & a>=0 or n is odd holds
  (n-root a) |^ n = a & n-root (a |^ n) = a
proof
  let n be Nat;
  assume
A1: n>=1 & a>=0 or n is odd;
A2: now
    assume that
A3: n>=1 and
A4: a>=0;
A5: n-root a = n -Root a by A3,A4,Def1;
 now per cases by A4;
      suppose a>0;
        hence a |^ n >= 0 by PREPOWER:6;
      end;
      suppose a=0;
        hence a |^ n >= 0;
      end;
    end;
    then n-root (a |^ n) = n -Root (a |^ n) by A3,Def1;
    hence thesis by A3,A4,A5,PREPOWER:19;
  end;
 now
    assume
A6: n is odd;
    then
A7: ex m st n=2*m+1 by ABIAN:9;
A8: n>=1 by A6,ABIAN:12;
 now per cases;
      suppose a>=0;
        hence thesis by A2,A8;
      end;
      suppose
A9:    a<0;
then A10:    -a>0 by XREAL_1:58;
        thus
        (n-root a) |^ n = (- n -Root (-a)) |^ n by A7,A9,Def1
          .= -(n -Root (-a)) |^ n by A7,Th2
          .= -(-a) by A8,A9,PREPOWER:19
          .= a;
    (-a) |^ n > 0 by A10,PREPOWER:6;
then     -a |^ n > 0 by A7,Th2;
then     a |^ n < 0;
        hence n-root (a |^ n) = - n -Root (-a |^ n) by A7,Def1
          .= - n -Root ((-a) |^ n) by A7,Th2
          .= -(-a) by A8,A9,PREPOWER:19
          .= a;
      end;
    end;
    hence thesis;
  end;
  hence thesis by A1,A2;
end;
