reserve a,a1,a2,a3,b,b1,b2,b3,r,s,t,u for Real;
reserve n for Nat;
reserve x0,x,x1,x2,x3,y0,y,y1,y2,y3 for Element of REAL n;
reserve L,L0,L1,L2 for Element of line_of_REAL n;

theorem
  x in plane(x1,x2,x3) & x = a1*x1+a2*x2+a3* x3 implies a1 + a2 + a3 = 1
  or 0*n in plane(x1,x2,x3)
proof
  assume that
A1: x in plane(x1,x2,x3) and
A2: x = a1*x1+a2*x2+a3*x3 and
A3: not a1+a2+a3 = 1;
  ex x9 be Element of REAL n st x = x9 &
ex a19,a29,a39 being Real st a19+
  a29+a39=1 & x9 = a19*x1+a29*x2+a39* x3 by A1;
  then consider a19,a29,a39 being Real such that
A4: a19+a29+a39=1 and
A5: x = a19*x1+a29*x2+a39*x3;
A6: (a1-a19)+(a2-a29)+(a3-a39) <> 0 by A3,A4;
  set t = (a1-a19)+(a2-a29)+(a3-a39);
A7: (a1-a19)/t+(a2-a29)/t+(a3-a39)/t = ((a1-a19)+(a2-a29)+(a3-a39))/t by
XCMPLX_1:63
    .= 1 by A6,XCMPLX_1:60;
A8: 0*n = (a1*x1+a2*x2+a3*x3) - (a19*x1+a29*x2+a39*x3) by A2,A5,Th2
    .= (a1-a19)*x1+(a2-a29)*x2+(a3-a39)*x3 by Th26;
  0*n = (1/t) * 0*n by EUCLID_4:2
    .= (1/t*(a1-a19))*x1+(1/t*(a2-a29))*x2+(1/t*(a3-a39))*x3 by A8,Th22
    .= (a1-a19)/t*x1+(1/t*(a2-a29))*x2+(1/t*(a3-a39))*x3 by XCMPLX_1:99
    .= (a1-a19)/t*x1+(a2-a29)/t*x2+(1/t*(a3-a39))*x3 by XCMPLX_1:99
    .= (a1-a19)/t*x1+(a2-a29)/t*x2+(a3-a39)/t*x3 by XCMPLX_1:99;
  hence thesis by A7;
end;
