reserve a,b,c,k,l,m,n for Nat,
  i,j,x,y for Integer;

theorem
  m,n are_coprime implies Euler (m*n) = Euler m * Euler n
proof
  assume
A3: m,n are_coprime;
  per cases;
  suppose m <= 1;
    then m = 0 or m = 1 by NAT_1:25;
    hence thesis by LM,Th17;
  end;
  suppose n <= 1;
    then n = 0 or n = 1 by NAT_1:25;
    hence thesis by LM,Th17;
  end;
  suppose that
A1: m > 1 and
A2: n > 1;
  set X={i where i is Element of NAT: m*n,i are_coprime & i >= 1 & i <=
  m*n};
  set C={i where i is Element of NAT:ex x,y being Integer st i = (m*y + n*x)
  mod m*n & m*n,i are_coprime & y <= n & x <= m & i >= 0};
A4: m*n <> 0 by A1,A2,XCMPLX_1:6;
A5: C c= Seg (m*n) \/ {0}
  proof
    let z be object;
    assume z in C;
    then consider i being Element of NAT such that
A6: i = z and
A7: ex x,y being Integer st i = (m*y + n*x) mod m*n & m*n,i
    are_coprime & y <= n & x <= m & i >= 0;
    consider x,y being Integer such that
A8: i = (m*y + n*x) mod m*n and
    m*n,i are_coprime and
    y <= n and
    x <= m and
    i >= 0 by A7;
    per cases;
    suppose
A9:   i > 0;
A10:  (m*y + n*x) mod m*n <= m*n
      proof
        set i2 = m*n;
        set i1 = (m*y + n*x);
A11:    ([\ i1/i2 /]) + 1 >= i1/i2 by INT_1:29;
        (m*y + n*x) mod m*n = i1 - (i1 div i2)*i2 by A4,INT_1:def 10
          .= i1 - ([\ i1/i2 /])*i2 by INT_1:def 9;
        hence thesis by A1,A2,A11,Lm1,XCMPLX_1:6;
      end;
      i >= 1 by A9,NAT_1:14;
      then z in Seg (m*n) by A6,A8,A10,FINSEQ_1:1;
      hence thesis by XBOOLE_0:def 3;
    end;
    suppose
A12:  i = 0;
      0 in {0} by TARSKI:def 1;
      hence thesis by A6,A12,XBOOLE_0:def 3;
    end;
  end;
  then reconsider C as finite set;
  set A={i where i is Element of NAT:n,i are_coprime & i >= 1 & i <= n};
A13: A c= Seg n
  proof
    let x be object;
    assume x in A;
    then
    ex i being Element of NAT st i = x & n,i are_coprime & i >= 1 &
    i <= n;
    hence thesis by FINSEQ_1:1;
  end;
A14: y = 1 & x = 1 implies (m*y + n*x) mod m*n in C
  proof
A15: m gcd n = 1 by A3,INT_2:def 3;
    then (m + n) gcd m = 1 by Th7;
    then
A16: m,(m + n) are_coprime by INT_2:def 3;
    (m + n) gcd n = 1 by A15,Th7;
    then n,(m + n) are_coprime by INT_2:def 3;
    then m*n,(m + n) are_coprime by A1,A16,Th14;
    then
A17: m*n gcd (m + n) = 1 by INT_2:def 3;
    assume
A18: y = 1 & x = 1;
    then reconsider y9= y,x9= x as Element of NAT;
    (m*y9 + n*x9) mod m*n = (m*y + n*x) mod m*n;
    then consider t being Element of NAT such that
A19: t = (m*y + n*x) mod m*n;
    ex d being Nat st (m + n) = (m*n)*d + ((m + n) mod m*n) & ((m + n) mod
    m*n) < (m*n) by A4,NAT_D:def 2;
    then (m + n) mod m*n gcd m*n = 1 by A17,Th8;
    then m*n,t are_coprime by A18,A19,INT_2:def 3;
    hence thesis by A1,A2,A18,A19;
  end;
  reconsider A as finite set by A13;
A20: a = 1 implies a in A
  proof
    assume
A21: a = 1;
    then n gcd a = 1 by NEWTON:51;
    then n,a are_coprime by INT_2:def 3;
    hence thesis by A2,A21;
  end;
  set B={i where i is Element of NAT:m,i are_coprime & i >= 1 & i <= m};
A22: B c= Seg m
  proof
    let x be object;
    assume x in B;
    then
    ex i being Element of NAT st i = x & m,i are_coprime & i >= 1 &
    i <= m;
    hence thesis by FINSEQ_1:1;
  end;
A23: m*n <> 1 by A1,NAT_1:15;
A24: C = X
  proof
    thus C c= X
    proof
      let z be object;
      assume z in C;
      then consider i being Element of NAT such that
A25:  i = z and
A26:  ex x,y being Integer st i = (m*y + n*x) mod m*n & m*n,i
      are_coprime & y <= n & x <= m & i >= 0;
      consider x,y being Integer such that
A27:  i = (m*y + n*x) mod m*n and
A28:  m*n,i are_coprime and
      y <= n and
      x <= m and
      i >= 0 by A26;
A29:  (m*y + n*x) mod m*n <= m*n
      proof
        set i2 = m*n;
        set i1 = (m*y + n*x);
A30:    ([\ i1/i2 /]) + 1 >= i1/i2 by INT_1:29;
        (m*y + n*x) mod m*n = i1 - (i1 div i2)*i2 by A4,INT_1:def 10
          .= i1 - ([\ i1/i2 /])*i2 by INT_1:def 9;
        hence thesis by A1,A2,A30,Lm1,XCMPLX_1:6;
      end;
      per cases;
      suppose
        i > 0;
        then i >= 1 by NAT_1:14;
        hence thesis by A25,A27,A28,A29;
      end;
      suppose
        i = 0;
        then m*n gcd 0 = 1 by A28,INT_2:def 3;
        hence thesis by A23,NEWTON:52;
      end;
    end;
    let z be object;
    assume z in X;
    then consider i being Element of NAT such that
A31: i=z and
A32: m*n,i are_coprime and
    i >= 1 and
A33: i <= m*n;
    i <> m*n
    proof
      assume i = m*n;
      then (m*n) gcd (m*n) = 1 by A32,INT_2:def 3;
      then m*n = 1 by NAT_D:32;
      hence contradiction by A1,NAT_1:15;
    end;
    then
A34: i < m*n by A33,XXREAL_0:1;
    consider y0,x0 being Integer such that
A35: y0*m + x0*n = i by A3,Th10;
A36: (m*y0 + n*x0) mod (m*n) = (m*y0 + n*x0) - ((m*y0 + n*x0) div (m*n))*(
    m*n) by A4,INT_1:def 10
      .= (m*y0 + n*x0) - 0*(m*n) by A34,A35,PRE_FF:4
      .= m*y0 + n*x0;
    set k = y0 div n;
    set j = x0 div m;
    consider x1,y1 being Integer such that
A37: x1 = x0 mod m and
A38: y1 = y0 mod n;
    x0 mod m = x0 - (x0 div m)*m & y0 mod n = y0- (y0 div n)*n by A1,A2,
INT_1:def 10;
    then m*y0 + n*x0 = m*y1 + n*x1 + (m*n)*(k+j) by A37,A38;
    then
A39: m*y0 + n*x0 = (m*y1 + n*x1) mod (m*n) by A36,NAT_D:61;
A40: ([\ y0/n /]) + 1 >= y0/n by INT_1:29;
A41: ([\ x0/m /]) + 1 >= x0/m by INT_1:29;
    y1 = y0 - (y0 div n)*n by A2,A38,INT_1:def 10
      .= y0 - ([\ y0/n /])*n by INT_1:def 9;
    then
A42: y1 <= n by A2,A40,Lm1;
    x1 = x0 - (x0 div m)*m by A1,A37,INT_1:def 10
      .= x0 - ([\ x0/m /])*m by INT_1:def 9;
    then x1 <= m by A1,A41,Lm1;
    hence thesis by A31,A32,A35,A42,A39;
  end;
  reconsider B as finite set by A22;
A43: b = 1 implies b in B
  proof
    assume
A44: b = 1;
    then m gcd b = 1 by NEWTON:51;
    then m,b are_coprime by INT_2:def 3;
    hence thesis by A1,A44;
  end;
  {0} c= NAT by ZFMISC_1:31;
  then Seg (m*n) \/ {0} c= NAT by XBOOLE_1:8;
  then reconsider
  A,B,C as non empty finite Subset of NAT by A13,A22,A5,A20,A43,A14,XBOOLE_1:1;
  deffunc F(Element of A,Element of B) = (m*$1+n*$2) mod (m*n);
A45: for y being Element of A, x being Element of B holds F(y,x) in C
  proof
    set l = n*m;
    let y be Element of A, x be Element of B;
    y in A;
    then consider i being Element of NAT such that
A46: i = y and
A47: n,i are_coprime and
A48: i >= 1 and
A49: i <= n;
    x in B;
    then consider j being Element of NAT such that
A50: j = x and
A51: m,j are_coprime and
    j >= 1 and
A52: j <= m;
    i*m,n are_coprime by A1,A2,A3,A47,Th14;
    then i*m gcd n = 1 by INT_2:def 3;
    then (m*i + n*j) gcd n = 1 by Th8;
    then
A53: n,(m*i + n*j) are_coprime by INT_2:def 3;
    j*n,m are_coprime by A1,A2,A3,A51,Th14;
    then j*n gcd m = 1 by INT_2:def 3;
    then (m*i + n*j) gcd m = 1 by Th8;
    then
A54: m,(m*i + n*j) are_coprime by INT_2:def 3;
    i*m <> 0*m by A1,A48,XCMPLX_1:5;
    then n*m,(m*i + n*j) are_coprime by A1,A53,A54,Th14;
    then
A55: n*m gcd (m*i + n*j) = 1 by INT_2:def 3;
    reconsider ii = i,jj = j as Integer;
    m*ii + n*jj mod m*n = m*i + n*j mod m*n;
    then consider q being Element of NAT such that
A56: q = (m*ii + n*jj) mod m*n;
    ex t being Nat st (m*i + n*j) = (n*m)*t + ((m*i + n*j) mod n*m) & ((m
    *i + n*j) mod n*m) < (n*m) by A4,NAT_D:def 2;
    then ((m*i + n*j) mod l) gcd l = 1 by A55,Th8;
    then l,q are_coprime by A56,INT_2:def 3;
    hence thesis by A46,A49,A50,A52,A56;
  end;
  consider f being Function of [:A,B:], C such that
A57: for y being Element of A, x being Element of B holds f.(y,x) = F(y
  ,x) from FUNCT_7:sch 1(A45);
A58: f is onto
  proof
    thus rng f c= C by RELAT_1:def 19;
    let z be object;
    assume z in C;
    then consider i being Element of NAT such that
A59: i = z and
A60: ex x0,y0 being Integer st i = (m*y0 + n*x0) mod m*n & m*n,i
    are_coprime & y0 <= n & x0 <= m & i >= 0;
    consider x0,y0 being Integer such that
A61: i = (m*y0 + n*x0) mod m*n and
A62: m*n,i are_coprime and
    y0 <= n and
    x0 <= m and
    i >= 0 by A60;
    consider x,y being Integer such that
A63: x = x0 mod m and
A64: y = y0 mod n;
A65: x <= m by A1,A63,NEWTON:65;
A66: (m*y + n*x) mod (m*n) = (m*y0 + n*x0) mod (m*n)
    proof
      set k = y0 div n;
      set j = x0 div m;
      x0 mod m = x0 - (x0 div m)*m & y0 mod n = y0- (y0 div n)*n by A1,A2,
INT_1:def 10;
      then m*y0 + n*x0 = m*y + n*x + (m*n)*(k+j) by A63,A64;
      hence thesis by NAT_D:61;
    end;
A67: y <= n by A2,A64,NEWTON:65;
    reconsider x,y as Element of NAT by A63,A64,INT_1:3,NEWTON:64;
A68: x <> 0
    proof
      set j = x0 div m;
      set jj = (y0 + (n*j)) - (n*((m*(y0 + (n*j))) div m*n));
      assume x = 0;
      then x0 - (x0 div m)*m = 0 by A1,A63,INT_1:def 10;
      then
A69:  (m*y0 + n*x0) mod m*n = m*(y0 + (n*j)) - ((m*(y0 + (n*j))) div m*n
      )*(m*n) by A4,INT_1:def 10
        .= m*((y0 + (n*j)) - (n*((m*(y0 + (n*j))) div m*n)));
      then reconsider g = m*jj as Element of NAT by A61;
A70:  m*n gcd m*jj = 1 by A61,A62,A69,INT_2:def 3;
A71:  g > 0 or g = 0;
      not jj < 0
      proof
        assume jj < 0;
        then m*jj < 0*jj by A1,XREAL_1:69;
        hence contradiction by A71;
      end;
      then reconsider jj as Element of NAT by INT_1:3;
      m*(n gcd jj) = 1 by A2,A70,Th15;
      then jj = 0 by A1,NAT_1:15;
      then m*n gcd 0 = 1 by A61,A62,A69,INT_2:def 3;
      hence contradiction by A23,NEWTON:52;
    end;
A72: y <> 0
    proof
      set j = y0 div n;
      set jj = ((m*j) + x0) - (m*((n*((m*j) + x0)) div m*n));
      assume y = 0;
      then y0 - (y0 div n)*n = 0 by A2,A64,INT_1:def 10;
      then
A73:  (m*y0 + n*x0) mod m*n = n*((m*j) + x0) - ((n*((m*j) + x0)) div m*n
      )*(m*n) by A4,INT_1:def 10
        .= n*(((m*j) + x0) - (m*((n*((m*j) + x0)) div m*n)));
      then reconsider g = n*jj as Element of NAT by A61;
A74:  m*n gcd n*jj = 1 by A61,A62,A73,INT_2:def 3;
A75:  g > 0 or g = 0;
      not jj < 0
      proof
        assume jj < 0;
        then n*jj < 0*jj by A2,XREAL_1:69;
        hence contradiction by A75;
      end;
      then reconsider jj as Element of NAT by INT_1:3;
      n*(m gcd jj) = 1 by A1,A74,Th15;
      then jj = 0 by A2,NAT_1:15;
      then m*n gcd 0 = 1 by A61,A62,A73,INT_2:def 3;
      hence contradiction by A23,NEWTON:52;
    end;
A76: m,x0 are_coprime
    proof
      set p = m gcd x0;
      p divides m by INT_2:21;
      then consider i1 being Integer such that
A77:  m = p*i1 by INT_1:def 3;
      p divides x0 by INT_2:21;
      then consider i2 being Integer such that
A78:  x0 = p*i2 by INT_1:def 3;
      set jj = i1*n;
      set k = ((p*i1)*y0 + n*(p*i2))div((p*i1)*n);
      set j = (i1*y0 + n*i2) - ((i1*k)*n);
A79:  p <> 0 by A1,A77;
A80:  (m*y0 + n*x0) mod m*n = ((p*i1)*y0 + n*(p*i2)) - (((p*i1)*y0 + n*(
      p*i2)) div((p*i1)*n))*((p*i1)*n) by A4,A77,A78,INT_1:def 10;
A81:  ((p*i1)*y0 + n*(p*i2)) - k*((p*i1)*n) = p*((i1*y0 + n*i2) - ((i1*k )*n));
      not j < 0
      proof
        assume j < 0;
        then p*j < 0*j by A79,XREAL_1:69;
        hence contradiction by A4,A61,A77,A78,A81,INT_1:def 10;
      end;
      then reconsider p,j as Element of NAT by INT_1:3;
      not jj < 0
      proof
        assume jj < 0;
        then p*jj < 0*jj by A79,XREAL_1:69;
        hence contradiction by A4,A77;
      end;
      then reconsider jj as Element of NAT by INT_1:3;
A82:  m*n = p*(i1*n) by A77;
      now
        per cases by A1,A2,A82,XCMPLX_1:6;
        suppose
A83:      p <> 0 & jj <> 0 & j <> 0;
          p*jj gcd p*j = 1 by A61,A62,A77,A80,INT_2:def 3;
          then p*(jj gcd j) = 1 by A83,Th15;
          hence p = 1 by NAT_1:15;
        end;
        suppose
          p <> 0 & jj <> 0 & j = 0;
          then p*jj gcd 0 = 1 by A61,A62,A77,A80,A81,INT_2:def 3;
          then p*jj = 1 by NEWTON:52;
          hence p = 1 by NAT_1:15;
        end;
      end;
      hence thesis by INT_2:def 3;
    end;
    n,y0 are_coprime
    proof
      set p = n gcd y0;
      p divides n by INT_2:21;
      then consider i1 being Integer such that
A84:  n = p*i1 by INT_1:def 3;
      p divides y0 by INT_2:21;
      then consider i2 being Integer such that
A85:  y0 = p*i2 by INT_1:def 3;
      set jj = i1*m;
      set k = (m*(p*i2) + (p*i1)*x0) div (m*(p*i1));
      set j = (m*i2 + i1*x0) - ((i1*k)*m);
A86:  p <> 0 by A2,A84;
A87:  (m*y0 + n*x0) mod m*n = (m*(p*i2) + (p*i1)*x0) - ((m*(p*i2) + (p*
      i1)*x0) div (m*(p*i1)))*(m*(p*i1)) by A4,A84,A85,INT_1:def 10;
A88:  (m*(p*i2) + (p*i1)*x0) - k*(m*(p*i1)) = p*((m*i2 + i1*x0) - ((i1*k )*m));
      j >= 0
      proof
        assume j < 0;
        then p*j < 0*j by A86,XREAL_1:69;
        hence contradiction by A4,A61,A84,A85,A88,INT_1:def 10;
      end;
      then reconsider p,j as Element of NAT by INT_1:3;
      not jj < 0
      proof
        assume jj < 0;
        then p*jj < 0*jj by A86,XREAL_1:69;
        hence contradiction by A4,A84;
      end;
      then reconsider jj as Element of NAT by INT_1:3;
A89:  m*n = p*(i1*m) by A84;
      now
        per cases by A1,A2,A89,XCMPLX_1:6;
        suppose
A90:      p <> 0 & jj <> 0 & j <> 0;
          p*jj gcd p*j = 1 by A61,A62,A84,A87,INT_2:def 3;
          then p*(jj gcd j) = 1 by A90,Th15;
          hence p = 1 by NAT_1:15;
        end;
        suppose
          p <> 0 & jj <> 0 & j = 0;
          then p*jj gcd 0 = 1 by A61,A62,A84,A87,A88,INT_2:def 3;
          then p*jj = 1 by NEWTON:52;
          hence p = 1 by NAT_1:15;
        end;
      end;
      hence thesis by INT_2:def 3;
    end;
    then
A91: y0 gcd n = 1 by INT_2:def 3;
    x = x0 - (x0 div m)*m by A1,A63,INT_1:def 10;
    then x0 gcd m = x + (x0 div m)*m gcd m;
    then x0 gcd m = x gcd m by A68,Th16;
    then m gcd x = 1 by A76,INT_2:def 3;
    then
A92: m,x are_coprime by INT_2:def 3;
    x >= 0 + 1 by A68,INT_1:7;
    then
A93: x in B by A65,A92;
    y = y0 - (y0 div n)*n by A2,A64,INT_1:def 10;
    then y0 gcd n = y + (y0 div n)*n gcd n;
    then y0 gcd n = y gcd n by A72,Th16;
    then
A94: n,y are_coprime by A91,INT_2:def 3;
    y >= 0 + 1 by A72,INT_1:7;
    then y in A by A67,A94;
    then reconsider y as Element of A;
    reconsider x as Element of B by A93;
A95: i = f.(y,x) by A57,A61,A66;
    consider w being set such that
A96: w = [y,x];
    dom f = [:A,B:] by FUNCT_2:def 1;
    then w in dom f by A96,ZFMISC_1:87;
    hence z in rng f by A59,A96,A95,FUNCT_1:def 3;
  end;
A97: m*n >= 1 by A1,A2,NAT_1:14,XCMPLX_1:6;
  f is one-to-one
  proof
    let x,y be object;
A98: dom f = [:A,B:] by FUNCT_2:def 1;
    assume x in dom f;
    then consider xx1 being Element of A, xx2 being Element of B such that
A99: x = [xx1,xx2] by A98,DOMAIN_1:1;
    assume y in dom f;
    then consider yy1 being Element of A, yy2 being Element of B such that
A100: y = [yy1,yy2] by A98,DOMAIN_1:1;
    xx1 in A;
    then consider x1 being Element of NAT such that
A101: xx1 = x1 and
    n,x1 are_coprime and
A102: x1 >= 1 and
A103: x1 <= n;
    xx2 in B;
    then consider x2 being Element of NAT such that
A104: xx2 = x2 and
    m,x2 are_coprime and
A105: x2 >= 1 and
A106: x2 <= m;
    consider p being Integer such that
A107: p = m;
    assume
A108: f.x = f.y;
    yy2 in B;
    then consider y2 being Element of NAT such that
A109: yy2 = y2 and
    m,y2 are_coprime and
A110: y2 >= 1 and
A111: y2 <= m;
    yy1 in A;
    then consider y1 being Element of NAT such that
A112: yy1 = y1 and
    n,y1 are_coprime and
A113: y1 >= 1 and
A114: y1 <= n;
A115: (x1*m+x2*n) mod (m*n) = f.(xx1,xx2) by A57,A101,A104
      .= f.(yy1,yy2) by A99,A100,A108
      .= (y1*m+y2*n) mod (m*n) by A57,A112,A109;
    reconsider y1,y2,x1,x2 as Element of NAT;
    set k = (x1*m+x2*n) mod (m*n);
A116: (x1*m + x2*n)-(y1*m + y2*n) = m*(x1 - y1) + n*(x2 - y2) & k + ((x1*m
+ x2*n) div (m*n))*(m*n) - (k + ((y1*m + y2*n) div (m*n))*(m*n)) = (m*n)*(((x1*
    m + x2*n ) div (m*n)) - ((y1*m + y2*n) div (m*n)));
    set w = (((x1*m + x2*n) div (m*n)) - ((y1*m + y2*n) div (m*n)));
    y1*m + y2*n = k + ((y1*m + y2*n) div (m*n))*(m*n) by A97,A115,NAT_D:2;
    then
A117: m*(x1 - y1) + n*(x2 - y2) = (m*n)*w by A97,A116,NAT_D:2;
    then n*(x2 - y2) = m*((n*w) - (x1 - y1));
    then
A118: p divides n*(x2 - y2) by A107,INT_1:def 3;
    consider p being Integer such that
A119: p = n;
    m*(x1 - y1) = n*((m*w) - (x2 - y2)) by A117;
    then
A120: p divides m*(x1 - y1) by A119,INT_1:def 3;
    then
A121: n divides (x1 - y1) by A3,A119,INT_2:25;
A122: x1 - y1 = 0
    proof
      per cases;
      suppose
A123:   0<=(x1 - y1);
        consider k being Integer such that
A124:   k = x1 - y1;
        reconsider k as Element of NAT by A123,A124,INT_1:3;
        k = 0
        proof
          set b = n + -1;
          -y1 <= -1 by A113,XREAL_1:24;
          then
A125:     x1 + -y1 <= n + -1 by A103,XREAL_1:7;
A126:     k < b + 1 by A124,A125,NAT_1:13;
          assume k <> 0;
          hence contradiction by A3,A119,A120,A124,A126,INT_2:25,NAT_D:7;
        end;
        hence thesis by A124;
      end;
      suppose
A127:   (x1 - y1)<=0;
        consider k being Integer such that
A128:   k = -(x1 - y1);
A129:   n divides k by A121,A128,INT_2:10;
        reconsider k as Element of NAT by A127,A128,INT_1:3;
        k = 0
        proof
          set b = n + -1;
          -x1 <= -1 by A102,XREAL_1:24;
          then
A130:     - x1 + y1 <= n + -1 by A114,XREAL_1:7;
A131:     k < b + 1 by A128,A130,NAT_1:13;
          assume k <> 0;
          hence contradiction by A129,A131,NAT_D:7;
        end;
        hence thesis by A128;
      end;
    end;
A132: m divides (x2 - y2) by A3,A107,A118,INT_2:25;
    x2 - y2 = 0
    proof
      per cases;
      suppose
A133:   0<=(x2 - y2);
        consider k being Integer such that
A134:   k = x2 - y2;
        reconsider k as Element of NAT by A133,A134,INT_1:3;
        k = 0
        proof
          set b = m + -1;
          -y2 <= -1 by A110,XREAL_1:24;
          then
A135:     x2 + -y2 <= m + -1 by A106,XREAL_1:7;
A136:     k < b + 1 by A134,A135,NAT_1:13;
          assume k <> 0;
          hence contradiction by A3,A107,A118,A134,A136,INT_2:25,NAT_D:7;
        end;
        hence thesis by A134;
      end;
      suppose
A137:   (x2 - y2)<=0;
        consider k being Integer such that
A138:   k = -(x2 - y2);
A139:   m divides k by A132,A138,INT_2:10;
        reconsider k as Element of NAT by A137,A138,INT_1:3;
        k = 0
        proof
          set b = m + -1;
          -x2 <= -1 by A105,XREAL_1:24;
          then
A140:     - x2 + y2 <= m + -1 by A111,XREAL_1:7;
A141:     k < b + 1 by A138,A140,NAT_1:13;
          assume k <> 0;
          hence contradiction by A139,A141,NAT_D:7;
        end;
        hence thesis by A138;
      end;
    end;
    hence thesis by A99,A101,A104,A100,A112,A109,A122;
  end; then
  f is bijective by A58;
  then card[:A,B:] = card C by Th11;
  hence thesis by A24,CARD_2:46;
end;
end;
