reserve p,q for Rational;
reserve g,m,m1,m2,n,n1,n2 for Nat;
reserve i,i1,i2,j,j1,j2 for Integer;

theorem Th14:
  m <> 0 implies (i div (i gcd m)) gcd (m div (i gcd m)) = 1
  proof
    set g = i gcd m;
    set a = i div g, b = m div g;
    assume
A1: m <> 0;
    then
A2: g <> 0 by INT_2:5;
A3: 1 divides a & 1 divides b by INT_2:12;
    now
      let w be Integer such that
A4:   w divides a and
A5:   w divides b;
      consider i1 such that
A6:   a = i1*w by A4;
      consider i2 such that
A7:   b = i2*w by A5;
A8:   g divides i by INT_2:def 2;
A9:   g divides m by INT_2:def 2;
A10:  now
        assume
A11:    w = 0;
        g <= m by A1,A9,INT_2:27;
        hence contradiction by A2,A5,A11,NAT_2:13;
      end;
A12:  (i/g/w)*w = i/g by A10,XCMPLX_1:87;
A13:  (m/g/w)*w = m/g by A10,XCMPLX_1:87;
      i/g/w = i1*w/w by A6,A8,Th6
      .= i1 by A10,XCMPLX_1:89;
      then (i/g/w)*w*g = i1*w*g;
      then i = i1*(g*w) by A12,A2,XCMPLX_1:87;
      then
A14:  g*w divides i;
      m/g/w = i2*w/w by A7,A9,Th6
      .= i2 by A10,XCMPLX_1:89;
      then (m/g/w)*w*g = i2*w*g;
      then m = i2*(g*w) by A13,A2,XCMPLX_1:87;
      then g*w divides m;
      then g*w divides g by A14,INT_2:def 2;
      then w = 1 or w = -1 by A2,Th11;
      hence w divides 1 by INT_2:14;
    end;
    hence a gcd b = 1 by A3,INT_2:def 2;
  end;
