reserve r1,r2,r3 for non negative Real;
reserve n,m1 for Nat;
reserve s for Real;
reserve cn,cd,i1,j1 for Integer;
reserve r for irrational Real;
reserve q for Rational;

theorem Th15:
  for i1,j1 st i1,j1 are_coprime holds ex s,t be Integer st s*i1+t*j1=1
   proof
     let i1,j1;
     assume
A1:  i1,j1 are_coprime; then
B1:  j1 gcd i1 = 1 by INT_2:def 3;
     per cases;
      suppose i1 >= 0 & j1 >= 0; then
      i1 in NAT & j1 in NAT by INT_1:3;
      hence thesis by A1,EULER_1:10;
      end;
      suppose
A3:   i1 >= 0 & j1 < 0;
      set j2 = -j1;
      i1 in NAT & j2 in NAT by A3,INT_1:3; then
      reconsider i1,j2 as Nat;
      i1 gcd j2 = |.i1.| gcd |.-j1.|
       .= i1 gcd |.j1.| by COMPLEX1:52
       .= 1 by B1,INT_6:14; then
      consider s,t be Integer such that
A5:   s*i1 + t*j2 = 1 by EULER_1:10,INT_2:def 3;
      s*i1 + (-t)*j1 = 1 by A5;
      hence thesis;
      end;
      suppose
A6:   i1 < 0 & j1 >= 0;
      set i2 = -i1;
      i2 in NAT & j1 in NAT by A6,INT_1:3; then
      reconsider i2,j1 as Nat;
      i2 gcd j1 = |.-i1.| gcd |.j1.|
      .= |.i1.| gcd j1 by COMPLEX1:52
      .= 1 by B1,INT_6:14; then
      consider s,t be Integer such that
A8:   s*i2 + t*j1 = 1 by EULER_1:10,INT_2:def 3;
      (-s)*i1 + t*j1 = 1 by A8;
      hence thesis;
      end;
      suppose
A9:   i1 < 0 & j1 < 0;
      set i2 = -i1, j2 = -j1;
      i2 in NAT & j2 in NAT by A9,INT_1:3; then
      reconsider i2,j2 as Nat;
      i2 gcd j2 = |.-i1.| gcd |.-j1.|
      .= |.i1.| gcd |.-j1.| by COMPLEX1:52 .= |.i1.| gcd |.j1.| by COMPLEX1:52
      .= |.i1.| gcd j1 by INT_6:14
      .= 1 by B1,INT_6:14; then
      consider s,t be Integer such that
A11:   s*i2 + t*j2 = 1 by EULER_1:10,INT_2:def 3;
      (-s)*i1 + (-t)*j1 = 1 by A11;
      hence thesis;
      end;
     end;
