reserve S for non empty satisfying_CongruenceIdentity
              satisfying_SegmentConstruction
              satisfying_BetweennessIdentity
              satisfying_Pasch
              TarskiGeometryStruct;
reserve a,b for POINT of S;
reserve A for Subset of S;
reserve S for non empty satisfying_Tarski-model
              TarskiGeometryStruct;
reserve a,b,c,m,r,s for POINT of S;
reserve A for Subset of S;
reserve S         for non empty satisfying_Lower_Dimension_Axiom
                                satisfying_Tarski-model
                                TarskiGeometryStruct,
        a,b,c,d,m,p,q,r,s,x for POINT of S,
        A,A9,E              for Subset of S;

theorem Th59:
  p,q out s,r & p,r out s,q implies between q,Line(p,s),r
  proof
    assume that
A1: p,q out s,r and
A2: p,r out s,q;
    set A   = Line(p,q),
        A9  = Line(p,r),
        A99 = Line(p,s);
    Line(p,q) out s,r by A1;
    then
A3: ex x be POINT of S st between s,Line(p,q),x & between r,Line(p,q),x;
    Line(p,r) out s,q by A2;
    then
A4: ex x be POINT of S st between s,Line(p,r),x & between q,Line(p,r),x;
    per cases;
    suppose A = A9;
      hence thesis by A3,GTARSKI3:83;
    end;
    suppose
A5:   A <> A9;
A6:   A is_line & A9 is_line & A <> A9 & p in A9 & p in A
        by A1,A2,A5,GTARSKI3:83;
      consider r9 be POINT of S such that
A7:   between r,p,r9 and
A8:   p <> r9 by GTARSKI3:36;
      Collinear r,p,r9 by A7;
      then
A9:   r9 in {x where x is POINT of S : Collinear r,p,x};
A10:  not r9 in A
      proof
        assume r9 in A;
        then A is_line & A9 is_line & A <> A9 & p in A & r9 in A & p in A9 &
          r9 in A9 by A6,A9,GTARSKI3:def 10;
        hence contradiction by A8,GTARSKI3:89;
      end;
        A out r,s & between r,A,r9 by A3,A7,A10,GTARSKI3:83;
      then between s,A,r9 by Th14;
      then consider t be POINT of S such that
A11:  t in A and
A12:  between r9,t,s by GTARSKI3:14;
A13:  not r9 in A99
      proof
        assume r9 in Line(p,s);
        then A99 is_line & A9 is_line & r9 in A99 & r9 in A9 & A9 <> A99 &
          p in A99 & p in A9 by A6,A9,A4,GTARSKI3:def 10,83;
        hence contradiction by A8,GTARSKI3:89;
      end;
A14:  A9 <> A99
      proof
        assume
A15:    A9 = A99;
        Collinear p,r,r9 by A7,GTARSKI4:7;
        hence contradiction by A13,A15;
      end;
A16:  Collinear t,s,r9 by A12;
A17:  not t in A9
      proof
        assume
A18:    t in A9;
A19:    r9 in A9 by A9,GTARSKI3:def 10;
        per cases;
        suppose t = r9;
          hence thesis by A10,A11;
        end;
        suppose
A20:      t <> r9;
          Collinear t,r9,s by A16,GTARSKI3:45;
          then s in Line(t,r9);
          hence contradiction by A4,A20,A18,A19,GTARSKI3:87;
        end;
      end;
        now
          thus A99 is_line by A3,A6;
          thus p in A99 by GTARSKI3:83;
          A is_line & t in A & q in A & p in A by A1,A11,GTARSKI3:83;
          hence Collinear t,q,p by GTARSKI3:90;
               W1:A9 is_line by A2;
               W2: r9 in A9 by A9,GTARSKI3:def 10;
               W3:Collinear t,s,r9 by A12;
               W4:r9 out t,s by A11,A10,A12,GTARSKI1:def 10;
            A9 out t,s & A9 out s,q by A17,W1,W2,W3,W4,A2,Th29;
            then G1: A9 out t,q by Th19;
            G2: A9 is_line & p in A9 & A is_line & t in A  & q in A &
              p in A by A1,A2,A11,GTARSKI3:83;
            then Collinear t,q,p by GTARSKI3:90;
          hence p out t,q by G1,G2,Th29;
          thus not t in A99
          proof
            assume t in A99;
            then ex x be POINT of S st x = t & Collinear p,s,x;
            then Collinear p,t,s by GTARSKI3:45;
            then
A21:        s in Line(p,t);
            p in A & t in A & p <> t & A is_line by A1,A11,A17,GTARSKI3:83;
            hence contradiction by A21,A3,GTARSKI3:87;
          end;
        end;
        then G1: A99 out t,q by Th29;
            H1:A99 is_line by A3,A6;
            H3: not r in A99
            proof
              assume r in A99;
              then
A22:          p in A9 & p in A99 & r in A99 & r in A9 by GTARSKI3:83;
              A9 is_line & A99 is_line & A9 <> A99 by A3,A6,A14;
              then p = r by A22,GTARSKI3:89;
              hence contradiction by A3,GTARSKI3:83;
            end;
            p in A99 & between r9,p,r by A7,GTARSKI3:14,83;
          then T1: between r9,Line(p,s),r by H1,A13,H3;
          s out r9,t by A3,A11,A12,GTARSKI3:14,GTARSKI1:def 10;
        then between t,Line(p,s),r by T1,GTARSKI3:83,Th12;
      hence thesis by G1,Th14;
    end;
  end;
