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
  A is_line & p in A & Collinear a,b,p implies
  (between a,A,b iff between a,p,b & not a in A & not b in A)
  proof
    assume that
A1: A is_line and
A2: p in A and
A3: Collinear a,b,p;
    hereby
      assume
A4:   between a,A,b;
      then consider t be POINT of S such that
A5:   t in A and
A6:   between a,t,b;
      a <> b by A4,GTARSKI1:def 10;
      then
A7:   Line(a,b) is_line;
      per cases;
      suppose p = t;
        hence between a,p,b & not a in A & not b in A by A4,A6;
      end;
      suppose
A8:     p <> t;
        then
A9:     Line(p,t) = A by A1,A2,A5,GTARSKI3:87;
        between a,p,b
        proof
          per cases by A3;
          suppose between a,b,p;
            then between p,b,a & between b,t,a by A6,GTARSKI3:14;
            then Collinear p,b,t by GTARSKI3:17;
            then Collinear p,t,b by GTARSKI3:45;
            hence thesis by A9,A4;
          end;
          suppose between b,p,a;
            hence thesis by GTARSKI3:14;
          end;
          suppose between p,a,b;
            then Collinear a,b,p & Collinear a,b,t by A6,GTARSKI3:14;
            then p in {x where x is POINT of S:Collinear a,b,x} &
            t in {x where x is POINT of S:Collinear a,b,x};
            then Line(a,b) = Line(p,t) by A7,A8,GTARSKI3:87
                          .= A by A8,A1,A2,A5,GTARSKI3:87;
            hence thesis by A4,GTARSKI3:83;
          end;
        end;
        hence between a,p,b & not a in A & not b in A by A4;
      end;
    end;
    assume between a,p,b & not a in A & not b in A;
    hence thesis by A1,A2;
  end;
