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,p st p2-p1,p3-p1 are_lindependent2 holds p in
outside_of_triangle(p1,p2,p3) iff tricord1(p1,p2,p3,p)<0 or tricord2(p1,p2,p3,p
  )<0 or tricord3(p1,p2,p3,p)<0
proof
  let p1,p2,p3,p;
  set i1=tricord1(p1,p2,p3,p),i2=tricord2(p1,p2,p3,p), i3=tricord3(p1,p2,p3,p);
  assume
A1: p2-p1,p3-p1 are_lindependent2;
  thus p in outside_of_triangle(p1,p2,p3) implies tricord1(p1,p2,p3,p)<0 or
  tricord2(p1,p2,p3,p)<0 or tricord3(p1,p2,p3,p)<0
  proof assume
A2: p in outside_of_triangle(p1,p2,p3);
    p in the carrier of TOP-REAL 2;
    then p in REAL 2 by EUCLID:22;
    then
A3: p in plane(p1,p2,p3) by A1,Th54;
    consider p0 such that
A4:   p0=p and
A5: ex a1,a2,a3 being Real st
   (0>a1 or 0>a2 or 0>a3) & a1+a2+a3=1 & p0= a1*p1+a2*p2+a3*p3 by A2;
   ex a1,a2,a3 being Real st
   (0>a1 or 0>a2 or 0>a3) & a1+a2+a3=1 & p0= a1*p1+a2*p2+a3*p3 by A5;
   hence thesis by A1,A3,Def11,Def12,Def13,A4;
  end;
  p in the carrier of TOP-REAL 2;
  then p in REAL 2 by EUCLID:22;
  then
A6: p in plane(p1,p2,p3) by A1,Th54;
  then consider a2,a3 being Real such that
A7: i1+a2+a3=1 & p=i1*p1+a2*p2+a3*p3 by A1,Def11;
  assume
A8: tricord1(p1,p2,p3,p)<0 or tricord2(p1,p2,p3,p)<0 or tricord3(p1,p2,
  p3,p)<0;
  a2=i2 & a3=i3 by A1,A6,A7,Def12,Def13;
  hence thesis by A8,A7;
end;
