reserve n for Nat;
reserve i for Integer;
reserve r,s,t for Real;
reserve An,Bn,Cn,Dn for Point of TOP-REAL n;
reserve L1,L2 for Element of line_of_REAL n;
reserve A,B,C for Point of TOP-REAL 2;
reserve D for Point of TOP-REAL 2;
reserve a,b,c,d for Real;

theorem
  A,C,B is_a_triangle & |(A-C,A-B)| = 0 implies
  the_length_of_the_altitude(C,A,B) = |.A-B.| * |. tan angle(A,B,C) .|
  proof
    assume that
A1: A,C,B is_a_triangle and
A2: |(A-C,A-B)| = 0;
A3: A,C,B are_mutually_distinct & |(C-A,B-A)| = 0
       by A2,Th10,A1,EUCLID_6:20;
A4: |.A-B.| <> 0 by A3,EUCLID_6:42;
    per cases by A3,EUCLID_3:45;
    suppose angle(C,A,B) = PI/2;
      then
A5:   the_length_of_the_altitude(C,A,B) = |.A-B.| * tan angle(A,B,C)
         by A1,Th65;
      then 0 <= tan angle(A,B,C) by A4,A3,Th46;
      hence thesis by A5,ABSVALUE:def 1;
    end;
    suppose
A6:   angle(C,A,B) = 3/2*PI;
A7:   A,B,C is_a_triangle by A1,MENELAUS:15;
      tan angle(C,B,A) = tan (2*PI-angle(A,B,C)) by A1,EUCLID10:31
                      .= - tan angle(A,B,C) by Th6;
      then
A8:   (- tan angle(A,B,C)) * |.A-B.| = the_length_of_the_altitude(C,A,B)
           by A7,A6,Th66;
      then tan angle(A,B,C) <= 0 by A4,A3,Th46;
      hence thesis by A8,ABSVALUE:30;
    end;
  end;
