reserve x for object,
  a,b for Real,
  k,k1,i1,j1,w for Nat,
  m,m1,n,n1 for Integer;
reserve p,q for Rational;

theorem Th27:
  (p = m/k & k <> 0 & not ex w st 1 < w & ex m1,k1 st m = m1*w & k = k1*w)
  implies k = denominator(p) & m = numerator(p)
proof
  assume that
A1: p=m/k and
A2: k<>0 and
A3: not ex w st 1<w & ex m1,k1 st m=m1*w & k=k1*w;
  consider w such that
A4: m=numerator(p)*w and
A5: k=denominator(p)*w by A1,A2,Th24;
  0<w by A2,A5;
  then
A6: 0+1<=w by NAT_1:13;
  w<=1 by A3,A4,A5;
  then
A7: w=1 by A6,XXREAL_0:1;
  hence k=denominator(p) by A5;
  thus thesis by A4,A7;
end;
