reserve n for Nat,
        p,q,u,w for Point of TOP-REAL n,
        S for Subset of TOP-REAL n,
        A, B for convex Subset of TOP-REAL n,
        r for Real;

theorem Th2:
  u in halfline(p,q) & w in halfline(p,q) & |.u-p.| = |.w-p.| implies u = w
  proof
    set r1=u,r2=w;
    assume that
A1:   r1 in halfline(p,q) and
A2:   r2 in halfline(p,q) and
A3:   |.r1-p.|=|.r2-p.|;
    per cases;
      suppose p<>q;
        then
A4:       |.q-p.|<>0 by TOPRNS_1:28;
        consider a1 be Real such that
A5:       r1=(1-a1)*p+a1*q and
A6:       a1>=0 by A1;
A7:     |.a1.|=a1 by A6,ABSVALUE:def 1;
        a1 in REAL & r1-p=a1*(q-p) by A5,Lm1,XREAL_0:def 1;
        then
A8:       |.r1-p.|=|.a1.|*|.q-p.| by TOPRNS_1:7;
        consider a2 be Real such that
A9:      r2=(1-a2)*p+a2*q and
A10:      a2>=0 by A2;
        a2 in REAL & r2-p=a2*(q-p) by A9,Lm1,XREAL_0:def 1;
        then
A11:      |.r2-p.|=|.a2.|*|.q-p.| by TOPRNS_1:7;
        |.a2.|=a2 by A10,ABSVALUE:def 1;
        then a1=a2 by A3,A4,A8,A11,A7,XCMPLX_1:5;
        hence thesis by A5,A9;
      end;
      suppose
A12:      p=q;
        then r1 in {p} by A1,TOPREAL9:29;
        then
A13:      r1=p by TARSKI:def 1;
        r2 in {p} by A2,A12,TOPREAL9:29;
        hence thesis by A13,TARSKI:def 1;
      end;
  end;
