reserve x,y for set;
reserve s,r for Real;
reserve r1,r2 for Real;
reserve n for Nat;
reserve p,q,q1,q2 for Point of TOP-REAL 2;

theorem
  for P being Subset of TOP-REAL 2,
  p1,p2 being Point of TOP-REAL 2 st P is_an_arc_of p1,p2 holds
  p1=x_Middle(P,p1,p2) iff p1`1=p2`1
proof
  let P be Subset of TOP-REAL 2, p1,p2 be Point of TOP-REAL 2;
  assume
A1: P is_an_arc_of p1,p2;
A2: now
    assume
A3: p1=x_Middle(P,p1,p2);
    deffunc F(Point of TOP-REAL 2)=$1;
    defpred P[Point of TOP-REAL 2] means $1`1=(p1`1+p2`1)/2;
    reconsider Q1={F(q):P[q]} as Subset of TOP-REAL 2 from DOMAIN_1:sch 8;
A4: P meets Q1 by A1,Th13;
A5: P /\ Q1 is closed by A1,Th13;
    x_Middle(P,p1,p2)=First_Point(P,p1,p2,Q1) by Def1;
    then p1 in P /\ Q1 by A1,A3,A4,A5,JORDAN5C:def 1;
    then p1 in Q1 by XBOOLE_0:def 4;
    then ex q st q=p1 & q`1=(p1`1+p2`1)/2;
    hence p1`1=p2`1;
  end;
  now
    assume
A6: p1`1=p2`1;
    for Q being Subset of TOP-REAL 2 st Q={q:q`1=(p1`1+p2`1)/2}
    holds p1=First_Point(P,p1,p2,Q)
    proof
      let Q be Subset of TOP-REAL 2;
      assume
A7:   Q={q:q`1=(p1`1+p2`1)/2};
      then
A8:   p1 in Q by A6;
      P /\ Q is closed by A1,A7,Th13;
      hence thesis by A1,A8,JORDAN5C:3;
    end;
    hence p1=x_Middle(P,p1,p2) by Def1;
  end;
  hence thesis by A2;
end;
