reserve a,b,c for Integer;
reserve i,j,k,l for Nat;
reserve n for Nat;
reserve a,b,c,d,a1,b1,a2,b2,k,l for Integer;

theorem
  a divides b iff |.a.| divides |.b.|
proof
  thus a divides b implies |.a.| divides |.b.|
  proof
    assume a divides b;
    then consider c such that
A1: b = a*c;
    |.b.| = |.a.|*|.c.| by A1,COMPLEX1:65;
    hence thesis;
  end;
    assume |.a.| divides |.b.|;
    then consider m being Integer such that
A2: |.b.| = |.a.|*m;
A3: a>=0 implies a divides b
    proof
      assume a>=0;
      then
A4:   |.b.| = a*m by A2,ABSVALUE:def 1;
      per cases;
      suppose b<0;
        then -b = a*m by A4,ABSVALUE:def 1;
        then b = a*(-m);
        hence thesis;
      end;
      suppose b>=0;
        then b = a*m by A4,ABSVALUE:def 1;
        hence thesis;
      end;
    end;
    a<0 implies a divides b
    proof
      assume a<0;
      then
A5:   |.b.| = (-a)*m by A2,ABSVALUE:def 1;
      per cases;
      suppose b<0;
        then -b = -(a*m) by A5,ABSVALUE:def 1;
        hence thesis;
      end;
      suppose b>=0;
        then b = a*(-m) by A5,ABSVALUE:def 1;
        hence thesis;
      end;
    end;
    hence thesis by A3;
end;
