reserve x,y,z for Real,
  a,b,c,d,e,f,g,h for Nat,
  k,l,m,n,m1,n1,m2,n2 for Integer,
  q for Rational;
reserve fs,fs1,fs2,fs3 for FinSequence;
reserve D for non empty set,
  v,v1,v2,v3 for object,
  fp for FinSequence of NAT,
  fr,fr1,fr2 for FinSequence of INT,
  ft for FinSequence of REAL;

theorem Th24:
  (ex q st a=q|^b) implies ex k st a=k|^b
proof
  given q such that
A1: a=q|^b;
  now
A2: now
      set d=denominator(q);
      set k=numerator(q);
      assume b<>0;
      then consider e be Nat such that
A3:   e+1=b by NAT_1:6;
A4:   d|^b <>0 by CARD_4:3;
      (k |^ b),d are_coprime by Th10,Th22;
      then
A5:   (k|^b gcd d)=1 by INT_2:def 3;
A6:   q=k/d by RAT_1:15;
      then a=(k|^b)/(d|^b) by A1,PREPOWER:8;
      then a*(d |^ b)=(k |^ b) by A4,XCMPLX_1:87;
      then (k |^ b)=a*((d |^ e)*d) by A3,NEWTON:6
        .=(a*(d |^ e))*d;
      then d divides (k |^ b);
      then d=1 or d=-1 by A5,INT_2:13,22;
      hence thesis by A1,A6;
    end;
    now
      assume
A7:   b=0;
      then a=1 by A1,NEWTON:4;
      then a=1|^0;
      hence thesis by A7;
    end;
    hence thesis by A2;
  end;
  hence thesis;
end;
