reserve n,n1,n2,k,D for Nat,
        r,r1,r2 for Real,
        x,y for Integer;

theorem Th3:
  for D be non square Nat
    for a,b,c,d be Integer st
      a + b * sqrt D = c + d *sqrt D
    holds a = c & b = d
  proof
    let D be non square Nat;
    let a,b,c,d be Integer such that A1: a + b * sqrt(D) = c + d *sqrt (D);
    A2:a - c = (d-b) * sqrt(D) by A1;
    (a - c) * (a-c) = ((d-b) * sqrt D) * ((d-b) * sqrt D) by A1
    .= (d-b) * (d-b) * (sqrt D) ^2
    .= (d-b) * (d-b)*D by SQUARE_1:def 2;
    then d-b = 0;
    then d=b & a-c = 0 by A2;
    hence thesis;
  end;
