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;
reserve c0,c1,c2,u,a0,b0 for Real;
reserve a,b for Real;
reserve n for Integer;
reserve a1,a2,b1,b2,c1,c2 for Element of REAL;
reserve eps for positive Real;
reserve r1 for non negative Real;
reserve q,q1 for Element of RAT;

theorem Th50:
   |.a1*b2-a2*b1.|<>0 & b1 <> 0 & a1/b1 is rational implies
   ex x,y be Element of INT st
   |.LF(a1,b1,c1).(x,y).|*|.LF(a2,b2,c2).(x,y).|<=|.a1*b2-a2*b1.|/4
   proof
   set Delta = |.a1*b2-a2*b1.|;
     assume that
A1:  |.a1*b2-a2*b1.|<>0 and
A2:  b1 <> 0 and
A3:  a1/b1 is rational;
     reconsider r1 = a1/b1 as Rational by A3;
     set n1 = numerator(r1);
     set d1 = denominator(r1);
     reconsider t0 = b1/d1 as non zero Real by A2;
A5:  b1 = t0 * d1 by XCMPLX_1:87;
A6:  a1 = a1/b1 * b1 by A2,XCMPLX_1:87 .= n1/d1 * b1 by RAT_1:15
       .= (n1/d1*d1)*t0 by A5.=t0*n1 by XCMPLX_1:87;
     reconsider rh0 = c1/t0 as Element of REAL by XREAL_0:def 1;
A7:  c1 = rh0*t0 by XCMPLX_1:87;
     consider x0,y0 be Element of INT such that
A8:  |.n1*x0-d1*y0+rh0.|<= 1/2 by Th16,WSIERP_1:22;
     reconsider x=x0,y=-y0 as Element of INT by INT_1:def 2;
     t0*(n1*x-d1*y0+rh0) = a1*x + (t0*d1)*(-y0) + rh0*t0 by A6
     .= a1*x + b1*y + rh0*t0 by XCMPLX_1:87
     .= LF(a1,b1,c1).(x,y) by A7,Def4; then
A9:  |.LF(a1,b1,c1).(x,y).| = |.t0.|*|.(n1*x0-d1*y0+rh0).| by COMPLEX1:65;
     reconsider r=-t0*(a2*x+b2*y+c2)/(a2*b1-b2*a1)
       as Element of REAL by XREAL_0:def 1;
     consider s be Element of INT such that
A11: |.r - s .| <= 1/2 by GAUSSINT:48;
A12: |.-t0*(a2*x+b2*y+c2)/(a2*b1-b2*a1)-s.|
     =|.-(t0*(a2*x+b2*y+c2)/(a2*b1-b2*a1)+s).|
    .=|.(t0*(a2*x+b2*y+c2)/(a2*b1-b2*a1)+s).| by COMPLEX1:52;
    reconsider x1 = x + d1*s, y1 = y -n1*s as Element of INT by INT_1:def 2;
     LF(a1,b1,c1).(x1,y1) = a1*x1 + b1*y1 +c1 by Def4
    .= a1*x+b1*y+c1+(a1*d1-b1*n1)*s
    .= LF(a1,b1,c1).(x,y) by Def4,A6,A5; then
A24: |.LF(a1,b1,c1).(x1,y1).| <= |.t0.|*(1/2) by A9,A8,XREAL_1:64;
A14: LF(a2,b2,c2).(x1,y1)= a2*x1+b2*y1+c2 by Def4
    .=a2*x+b2*y+c2+(a2*d1-b2*n1)*s
    .= a2*x+b2*y+c2+(a2*d1-b2*n1)*(s*t0/t0) by XCMPLX_1:89
    .= a2*x+b2*y+c2+(a2*b1-b2*a1)*(s/t0) by A6,A5;
      a2*b1-b2*a1 <> 0 by A1; then
A16:  |.(t0*(a2*x+b2*y+c2)+(a2*b1-b2*a1)*s)/(a2*b1-b2*a1).| <= 1/2
        by A11,A12,XCMPLX_1:113;
      |.(a2*b1-b2*a1).| = |.-(a1*b2-a2*b1).|  .=Delta by COMPLEX1:52; then
      |.(t0*(a2*x+b2*y+c2)+(a2*b1-b2*a1)*s).|/Delta<=1/2 by COMPLEX1:67,A16;
        then
      (|.(t0*(a2*x+b2*y+c2)+(a2*b1-b2*a1)*s).|/Delta)*Delta<=(1/2)*Delta
        by XREAL_1:64; then
A18:  |.(t0*(a2*x+b2*y+c2)+(a2*b1-b2*a1)*s).|<=(1/2)*Delta by A1,XCMPLX_1:87;
      |.t0*(a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s*t0/t0).|<=(1/2)*Delta
        by A18,XCMPLX_1:89; then
      |.t0*((a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s/t0)).|<=(1/2)*Delta; then
A20:  |.t0.|*|.(a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s/t0).|<=(1/2)*Delta
        by COMPLEX1:65;
      (|.t0.|*|.(a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s/t0).|)/|.t0.|
     =((1/|.t0.|)*|.t0.|)*|.(a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s/t0).|
    .=1*|.(a2*x+b2*y+c2)+(a2*b1-b2*a1)*(s/t0).| by XCMPLX_1:106; then
A23:  |.LF(a2,b2,c2).(x1,y1).| <= (1/2)*Delta/|.t0.|
        by A14,A20,XREAL_1:72;
      (|.t0.|*(1/2))*((1/2)*Delta/|.t0.|) = |.t0.|*((1/4)*Delta/|.t0.|)
    .=Delta/4 by XCMPLX_1:87; then
      |.LF(a1,b1,c1).(x1,y1).|*|.LF(a2,b2,c2).(x1,y1).|<= Delta/4
        by A23,A24,XREAL_1:66;
      hence thesis;
    end;
