reserve z,z1,z2 for Complex;
reserve r,x1,x2 for Real;
reserve p0,p,p1,p2,p3,q for Point of TOP-REAL 2;

theorem
  for p1,p2,p3 st p1<>p2 & p3<>p2 & (angle(p1,p2,p3)=PI/2 or angle(p1,p2
  ,p3)=3/2*PI) holds |.p1-p2.|^2+|.p3-p2.|^2=|.p1-p3.|^2
proof
  let p1,p2,p3;
  assume that
A1: p1<>p2 & p3<>p2 and
A2: angle(p1,p2,p3)=PI/2 or angle(p1,p2,p3)=3/2*PI;
A3: euc2cpx(p1)-euc2cpx(p2)=euc2cpx(p1-p2) & euc2cpx(p3)-euc2cpx(p2)=euc2cpx
  (p3- p2) by Th15;
A4: euc2cpx(p1)-euc2cpx(p3)=euc2cpx(p1-p3) & |.euc2cpx(p1-p2).|=|.p1-p2.| by
Th15,Th25;
A5: |.euc2cpx(p3-p2).|=|.p3-p2.| & |.euc2cpx(p1-p3).|=|.p1-p3.| by Th25;
  euc2cpx(p1)<> euc2cpx(p2) & euc2cpx(p3)<> euc2cpx(p2) by A1,Th4;
  hence thesis by A2,A3,A4,A5,COMPLEX2:77;
end;
