reserve P,P1,P2,R for Subset of TOP-REAL 2,
  p,p1,p2,p3,p11,p22,q,q1,q2,q3,q4 for Point of TOP-REAL 2,
  f,h for FinSequence of TOP-REAL 2,
  r for Real,
  u for Point of Euclid 2,
  n,m,i,j,k for Nat,
  x,y for set;

theorem Th23:
  for R,p,p1,p2,P,r,u st p<>p1 & P is_S-P_arc_joining p1,p2 & P c=
  R & p in Ball(u,r) & p2 in Ball(u,r) & Ball(u,r) c= R ex P1 being Subset of
  TOP-REAL 2 st P1 is_S-P_arc_joining p1,p & P1 c= R
proof
  let R,p,p1,p2,P,r,u;
  assume that
A1: p<>p1 and
A2: P is_S-P_arc_joining p1,p2 and
A3: P c= R and
A4: p in Ball(u,r) and
A5: p2 in Ball(u,r) and
A6: Ball(u,r) c= R;
  consider f such that
A7: f is being_S-Seq and
A8: P = L~f and
A9: p1=f/.1 and
A10: p2=f/.len f by A2;
  now
    per cases;
    suppose
      p1 in Ball(u,r);
      then consider P1 such that
A11:  P1 is_S-P_arc_joining p1,p & P1 c= Ball(u,r) by A1,A4,Th10;
      reconsider P1 as Subset of TOP-REAL 2;
      take P1;
      thus P1 is_S-P_arc_joining p1,p & P1 c= R by A6,A11;
    end;
    suppose
A12:  not p1 in Ball(u,r);
      now
        per cases;
        suppose
          p in P;
          then consider h such that
          h is being_S-Seq and
          h/.1=p1 and
          h/.len h=p and
A13:      L~h is_S-P_arc_joining p1,p & L~h c= L~f by A1,A7,A8,A9,Th18;
          reconsider P1=L~h as Subset of TOP-REAL 2;
          take P1;
          thus P1 is_S-P_arc_joining p1,p & P1 c= R by A3,A8,A13;
        end;
        suppose
          not p in P;
          then consider h such that
A14:      L~h is_S-P_arc_joining p1,p and
A15:      L~h c= L~f \/ Ball(u,r) by A4,A5,A7,A8,A9,A10,A12,Th22;
          reconsider P1=L~h as Subset of TOP-REAL 2;
          take P1;
          thus P1 is_S-P_arc_joining p1,p by A14;
          L~f \/ Ball(u,r) c= R by A3,A6,A8,XBOOLE_1:8;
          hence P1 c= R by A15;
        end;
      end;
      hence thesis;
    end;
  end;
  hence thesis;
end;
