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 Th52:
  for n being Element of NAT, p1,p2,p3,p0 being Point of TOP-REAL
n st (ex a1,a2,a3 being Real
 st p0=a1*p1+a2*p2+a3*p3 & a1+a2+a3=1) holds p0 in
  plane(p1,p2,p3)
proof
  let n be Element of NAT,p1,p2,p3,p0 be Point of TOP-REAL n;
  given a1,a2,a3 being Real such that
A1: p0=a1*p1+a2*p2+a3*p3 & a1+a2+a3=1;
  now
    per cases;
    case
      0>a1 or 0>a2 or 0>a3;
      then p0 in outside_of_triangle(p1,p2,p3) by A1;
      hence thesis by XBOOLE_0:def 3;
    end;
    case
      0<=a1 & 0<=a2 & 0<=a3;
      then p0 in closed_inside_of_triangle(p1,p2,p3) by A1;
      hence thesis by XBOOLE_0:def 3;
    end;
  end;
  hence thesis;
end;
