reserve n for Nat,
        lambda,lambda2,mu,mu2 for Real,
        x1,x2 for Element of REAL n,
        An,Bn,Cn for Point of TOP-REAL n,
        a for Real;
 reserve Pn,PAn,PBn for Element of REAL n,
         Ln for Element of line_of_REAL n;
reserve A,B,C for Point of TOP-REAL 2;
reserve x,y,z,y1,y2 for Element of REAL 2;
reserve L,L1,L2,L3,L4 for Element of line_of_REAL 2;
reserve D,E,F for Point of TOP-REAL 2;
reserve b,c,d,r,s for Real;

theorem Th38:
  L1 _|_ L2 & C in L1 /\ L2 & A in L1 & B in L2  & A<>C & B<>C
  implies angle(A,C,B) = PI/2 or angle(A,C,B) = 3 * PI/2
  proof
    assume that
A1: L1 _|_ L2 and
A2: C in L1 /\ L2 and
A3: A in L1 and
A4: B in L2  and
A5: A<>C & B<>C;
A6: C in L1 & C in L2 by A2,XBOOLE_0:def 4;
    now
      L1 is being_line by A1,EUCLIDLP:67;
      hence L1 = Line(C,A) by A3,A5,A6,Th37;
      L2 is being_line by A1,EUCLIDLP:67;
      hence L2 = Line(C,B) by A4,A5,A6,Th37;
    end;
    then |(A-C,B-C)| = 0 by A1,Th36;
    hence thesis by A5,EUCLID_3:45;
  end;
