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 Th54:
  for p1,p2,p3 st p2-p1,p3-p1 are_lindependent2 holds plane(p1,p2, p3)=REAL 2
proof
  let p1,p2,p3;
  assume
A1: p2-p1,p3-p1 are_lindependent2;
  the carrier of TOP-REAL 2=REAL 2 by EUCLID:22;
  hence plane(p1,p2,p3) c= REAL 2;
  let x be object;
  assume x in REAL 2;
  then reconsider p0=x as Point of TOP-REAL 2 by EUCLID:22;
  set q2=p2-p1,q3=p3-p1,p=p0-p1;
A2: q3<>0.TOP-REAL 2 by A1,Th50;
  now
    per cases by A2,EUCLID:53,54;
    case
A3:   q3`1<>0;
A4:   now
        assume q2`2*q3`1-q2`1*q3`2=0;
        then q2`2=q2`1*q3`2/q3`1 by A3,XCMPLX_1:89;
        then q2 = |[q2`1,q2`1*q3`2/q3`1]| by EUCLID:53
          .=|[q2`1*1,q2`1*q3`2*(q3`1)"]| by XCMPLX_0:def 9
          .=|[q2`1*1,q2`1*(q3`2*(q3`1)")]|
          .=(q2`1)*|[1,q3`2*(q3`1)"]| by EUCLID:58
          .=(q2`1)*|[(q3`1)"*q3`1,(q3`1)"*q3`2]| by A3,XCMPLX_0:def 7
          .=(q2`1)*((q3`1)"*|[q3`1,q3`2]|) by EUCLID:58
          .=(q2`1)*((q3`1)"*q3) by EUCLID:53
          .=(q2`1)*(q3`1)"*q3 by RLVECT_1:def 7;
        then q2+-((q2`1)*(q3`1)"*q3)=0.TOP-REAL 2 by RLVECT_1:5;
        then 1*q2+-((q2`1)*(q3`1)"*q3)=0.TOP-REAL 2 by RLVECT_1:def 8;
        then 1*q2+(-((q2`1)*(q3`1)"))*q3=0.TOP-REAL 2 by RLVECT_1:79;
        hence contradiction by A1;
      end;
      set a=(p`2*q3`1-q3`2*p`1)/(q2`2*q3`1-q2`1*q3`2);
      set b=(p`1-a*q2`1)/q3`1;
A5:   a*(q2`1)+b*(q3`1)=a*q2`1+(p`1-a*q2`1) by A3,XCMPLX_1:87
        .=p`1;
A6:   a*(q2`2)+b*(q3`2)=a*q2`2+(p`1/q3`1-a*q2`1/q3`1)*q3`2 by XCMPLX_1:120
        .=a*q2`2-a*q2`1/q3`1*q3`2+p`1/q3`1*q3`2
        .=a*q2`2-a*q2`1*(q3`1")*q3`2+p`1/q3`1*q3`2 by XCMPLX_0:def 9
        .=a*(q2`2-q2`1*(q3`1)"*q3`2)+p`1/q3`1*q3`2
        .=a*(q2`2-q2`1/(q3`1)*q3`2)+p`1/q3`1*q3`2 by XCMPLX_0:def 9
        .=a*(q2`2/q3`1*q3`1-q2`1/q3`1*q3`2)+p`1/q3`1*q3`2 by A3,XCMPLX_1:87
        .=a*((q3`1/q3`1)*q2`2-q2`1/q3`1*q3`2)+p`1/q3`1*q3`2 by XCMPLX_1:75
        .=a*(q3`1*(q3`1)"*q2`2-q2`1/(q3`1)*q3`2)+p`1/q3`1*q3`2 by
XCMPLX_0:def 9
        .=a*(q2`2*(q3`1*(q3`1)")-(q3`1)"*q2`1*q3`2)+p`1/q3`1*q3`2 by
XCMPLX_0:def 9
        .=a*(q2`2*q3`1-q2`1*q3`2)*(q3`1)"+p`1/q3`1*q3`2
        .=(p`2*q3`1-q3`2*p`1)*(q3`1)"+p`1/q3`1*q3`2 by A4,XCMPLX_1:87
        .=(p`2*q3`1-q3`2*p`1)*(q3`1)"+(q3`1)"*p`1*q3`2 by XCMPLX_0:def 9
        .=((p`2*q3`1-q3`2*p`1)+(q3`2*p`1))*(q3`1)"
        .=(p`2*q3`1)/(q3`1) by XCMPLX_0:def 9
        .=p`2 by A3,XCMPLX_1:89;
A7:   a*q2+b*q3=a*p2-a*p1+b*(p3-p1) by RLVECT_1:34
        .=a*p2+-a*p1+(b*p3-b*p1) by RLVECT_1:34
        .=a*p2+-a*p1+(b*p3+(-b)*p1) by RLVECT_1:79
        .=a*p2+(-a)*p1+((-b)*p1+b*p3) by RLVECT_1:79
        .=a*p2+(-a)*p1+(-b)*p1+b*p3 by RLVECT_1:def 3
        .=a*p2+((-a)*p1+(-b)*p1)+b*p3 by RLVECT_1:def 3
        .=(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 6;
      a*q2+b*q3=a*|[q2`1,q2`2]|+b*q3 by EUCLID:53
        .= a*|[q2`1,q2`2]|+b*|[q3`1,q3`2]| by EUCLID:53
        .= |[a*(q2`1),a*(q2`2)]|+b*|[q3`1,q3`2]| by EUCLID:58
        .= |[a*(q2`1),a*(q2`2)]|+|[b*(q3`1),b*(q3`2)]| by EUCLID:58
        .= |[a*(q2`1)+b*(q3`1),a*(q2`2)+b*(q3`2)]| by EUCLID:56
        .= p by A5,A6,EUCLID:53;
      then
A8:   p0=p1+((-a+-b)*p1+a*p2+b*p3) by A7,RLVECT_4:1
        .= p1+((-a+-b)*p1+a*p2)+b*p3 by RLVECT_1:def 3
        .= p1+(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 3
        .= 1*p1+(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 8
        .=(1+(-a+-b))*p1+a*p2+b*p3 by RLVECT_1:def 6;
      1+(-a+-b)+a+b=1;
      hence thesis by A8,Th52;
    end;
    case
A9:   q3`2<>0;
      now
        assume q2`2*q3`1-q2`1*q3`2=0;
        then q2`1=q2`2*q3`1/q3`2 by A9,XCMPLX_1:89;
        then q2 = |[q2`2*q3`1/q3`2,q2`2]| by EUCLID:53
          .=|[q2`2*q3`1*(q3`2)",q2`2*1]| by XCMPLX_0:def 9
          .=|[q2`2*(q3`1*(q3`2)"),q2`2*1]|
          .=(q2`2)*|[q3`1*(q3`2)",1]| by EUCLID:58
          .=(q2`2)*|[(q3`2)"*q3`1,(q3`2)"*q3`2]| by A9,XCMPLX_0:def 7
          .=(q2`2)*((q3`2)"*|[q3`1,q3`2]|) by EUCLID:58
          .=(q2`2)*((q3`2)"*q3) by EUCLID:53
          .=(q2`2)*(q3`2)"*q3 by RLVECT_1:def 7;
        then q2+-((q2`2)*(q3`2)"*q3)=0.TOP-REAL 2 by RLVECT_1:5;
        then 1*q2+-((q2`2)*(q3`2)"*q3)=0.TOP-REAL 2 by RLVECT_1:def 8;
        then 1*q2+(-((q2`2)*(q3`2)"))*q3=0.TOP-REAL 2 by RLVECT_1:79;
        hence contradiction by A1;
      end;
      then
A10:  -(q2`2*q3`1+-q2`1*q3`2)<> -0;
      set a=(p`1*q3`2-q3`1*p`2)/(q2`1*q3`2-q2`2*q3`1);
      set b=(p`2-a*q2`2)/q3`2;
A11:  a*(q2`2)+b*(q3`2)=a*q2`2+(p`2-a*q2`2) by A9,XCMPLX_1:87
        .=p`2;
A12:  a*(q2`1)+b*(q3`1)=a*q2`1+(p`2/q3`2-a*q2`2/q3`2)*q3`1 by XCMPLX_1:120
        .=a*q2`1-a*q2`2/q3`2*q3`1+p`2/q3`2*q3`1
        .=a*q2`1-a*q2`2*(q3`2")*q3`1+p`2/q3`2*q3`1 by XCMPLX_0:def 9
        .=a*(q2`1-q2`2*(q3`2)"*q3`1)+p`2/q3`2*q3`1
        .=a*(q2`1-q2`2/(q3`2)*q3`1)+p`2/q3`2*q3`1 by XCMPLX_0:def 9
        .=a*(q2`1/q3`2*q3`2-q2`2/q3`2*q3`1)+p`2/q3`2*q3`1 by A9,XCMPLX_1:87
        .=a*((q3`2/q3`2)*q2`1-q2`2/q3`2*q3`1)+p`2/q3`2*q3`1 by XCMPLX_1:75
        .=a*(q3`2*(q3`2)"*q2`1-q2`2/(q3`2)*q3`1)+p`2/q3`2*q3`1 by
XCMPLX_0:def 9
        .=a*(q2`1*(q3`2*(q3`2)")-(q3`2)"*q2`2*q3`1)+p`2/q3`2*q3`1 by
XCMPLX_0:def 9
        .=a*(q2`1*q3`2-q2`2*q3`1)*(q3`2)"+p`2/q3`2*q3`1
        .=(p`1*q3`2-q3`1*p`2)*(q3`2)"+p`2/q3`2*q3`1 by A10,XCMPLX_1:87
        .=(p`1*q3`2-q3`1*p`2)*(q3`2)"+(q3`2)"*p`2*q3`1 by XCMPLX_0:def 9
        .=((p`1*q3`2-q3`1*p`2)+(q3`1*p`2))*(q3`2)"
        .=(p`1*q3`2)/(q3`2) by XCMPLX_0:def 9
        .=p`1 by A9,XCMPLX_1:89;
A13:  a*q2+b*q3=a*p2-a*p1+b*(p3-p1) by RLVECT_1:34
        .=a*p2+-a*p1+(b*p3-b*p1) by RLVECT_1:34
        .=a*p2+-a*p1+(b*p3+(-b)*p1) by RLVECT_1:79
        .=a*p2+(-a)*p1+((-b)*p1+b*p3) by RLVECT_1:79
        .=a*p2+(-a)*p1+(-b)*p1+b*p3 by RLVECT_1:def 3
        .=a*p2+((-a)*p1+(-b)*p1)+b*p3 by RLVECT_1:def 3
        .=(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 6;
      a*q2+b*q3=a*|[q2`1,q2`2]|+b*q3 by EUCLID:53
        .= a*|[q2`1,q2`2]|+b*|[q3`1,q3`2]| by EUCLID:53
        .= |[a*(q2`1),a*(q2`2)]|+b*|[q3`1,q3`2]| by EUCLID:58
        .= |[a*(q2`1),a*(q2`2)]|+|[b*(q3`1),b*(q3`2)]| by EUCLID:58
        .= |[a*(q2`1)+b*(q3`1),a*(q2`2)+b*(q3`2)]| by EUCLID:56
        .= p by A11,A12,EUCLID:53;
      then
A14:  p0=p1+((-a+-b)*p1+a*p2+b*p3) by A13,RLVECT_4:1
        .= p1+((-a+-b)*p1+a*p2)+b*p3 by RLVECT_1:def 3
        .= p1+(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 3
        .= 1*p1+(-a+-b)*p1+a*p2+b*p3 by RLVECT_1:def 8
        .=(1+(-a+-b))*p1+a*p2+b*p3 by RLVECT_1:def 6;
      1+(-a+-b)+a+b=1;
      hence thesis by A14,Th52;
    end;
  end;
  hence thesis;
end;
