reserve OAS for OAffinSpace;
reserve a,a9,b,b9,c,c9,d,d1,d2,e1,e2,e3,e4,e5,e6,p,p9,q,r,x,y,z for Element of
  OAS;

theorem Th19:
  Mid p,c,b implies ex x st Mid p,x,a & b,a // c,x
proof
A1: b=c implies Mid p,a,a & b,a // c,a by DIRAF:1,10;
  assume
A2: Mid p,c,b;
A3: now
    assume p=b;
    then p=c by A2,DIRAF:8;
    hence Mid p,p,a & b,a // c,p by DIRAF:4,10;
  end;
A4: p,c // c,b by A2,DIRAF:def 3;
A5: now
    assume that
A6: p<>c and
A7: p<>b and
A8: b<>c;
    Mid b,c,p by A2,DIRAF:9;
    then
A9: b,c // c,p by DIRAF:def 3;
    then
A10: b,c // b,p by ANALOAF:def 5;
    then
A11: b,p // c,p by A8,A9,ANALOAF:def 5;
A12: now
A13:  now
        assume
A14:    Mid p,a,b;
A15:    now
          Mid b,a,p by A14,DIRAF:9;
          then b,a // a,p by DIRAF:def 3;
          then
A16:      a,p // b,a by DIRAF:2;
          assume Mid p,a,c;
          then Mid c,a,p by DIRAF:9;
          then c,a // a,p by DIRAF:def 3;
          then
A17:      a,p // c,a by DIRAF:2;
A18:      b,a // c,a implies Mid p,a,a & b,a // c,a by DIRAF:10;
          a=p implies Mid p,p,a & b,a // c,p by A8,A9,A10,ANALOAF:def 5
,DIRAF:10;
          hence thesis by A17,A16,A18,ANALOAF:def 5;
        end;
        Mid p,c,a implies Mid p,c,a & b,a // c,c by DIRAF:4;
        hence thesis by A2,A14,A15,DIRAF:17;
      end;
A19:  now
        assume Mid a,p,b;
        then Mid b,p,a by DIRAF:9;
        then b,p // p,a by DIRAF:def 3;
        then b,p // b,a by ANALOAF:def 5;
        hence Mid p,p,a & b,a // c,p by A7,A11,ANALOAF:def 5,DIRAF:10;
      end;
A20:  now
A21:    p,c // p,b by A4,ANALOAF:def 5;
        assume
A22:    Mid p,b,a;
        then p,b // b,a by DIRAF:def 3;
        then p,c // b,a by A7,A21,DIRAF:3;
        then b,a // c,b by A4,A6,ANALOAF:def 5;
        hence thesis by A22;
      end;
      assume p,a,b are_collinear;
      hence thesis by A13,A19,A20,DIRAF:29;
    end;
    now
A23:  p,b // p,c by A2,DIRAF:7;
      assume
A24:  not p,a,b are_collinear;
      then p<>b by DIRAF:31;
      then consider x such that
A25:  p,a // p,x and
A26:  b,a // c,x by A23,Th18;
A27:  p,x // p,a by A25,DIRAF:2;
      c,x // b,a by A26,DIRAF:2;
      hence thesis by A2,A6,A24,A26,A27,Th15;
    end;
    hence thesis by A12;
  end;
  p=c implies Mid p,p,a & b,a // c,p by DIRAF:4,10;
  hence thesis by A3,A1,A5;
end;
