reserve a, r, s for Real;

theorem Th2:
  r <= s implies ex B being Basis of Closed-Interval-TSpace(r,s) st
  (ex f being ManySortedSet of Closed-Interval-TSpace(r,s) st for y being Point
  of Closed-Interval-MSpace(r,s)
  holds f.y = {Ball(y,1/n) where n is Nat: n <> 0}
    & B = Union f) & for X being Subset of Closed-Interval-TSpace(r,s)
  st X in B holds X is connected
proof
  set L = Closed-Interval-TSpace(r,s), M = Closed-Interval-MSpace(r,s);
  assume
A1: r <= s;
  defpred P[object,object] means
ex x being Point of L, y being Point of M, B being
Basis of x st $1 = x & x = y & $2 = B &
 B = {Ball(y,1/n) where n is Nat: n <> 0};
A2: L = TopSpaceMetr(M) by TOPMETR:def 7;
A3: for i being object st i in the carrier of L ex j being object st P[i,j]
  proof
    let i be object;
    assume i in the carrier of L;
    then reconsider i as Point of L;
    reconsider m = i as Point of M by A2,TOPMETR:12;
    reconsider j = i as Element of TopSpaceMetr(M) by A2;
    set B = Balls(j);
A4: ex y being Point of M st y = j &
    B = { Ball(y,1/n) where n is Nat: n <> 0 } by FRECHET:def 1;
    reconsider B1 = B as Basis of i by A2;
    take B, i, m, B1;
    thus thesis by A4;
  end;
  consider f being ManySortedSet of the carrier of L such that
A5: for i being object st i in the carrier of L holds P[i,f.i] from PBOOLE:
  sch 3(A3);
  for x being Element of L holds f.x is Basis of x
  proof
    let x be Element of L;
    P[x,f.x] by A5;
    hence thesis;
  end;
  then reconsider B = Union f as Basis of L by TOPGEN_2:2;
  take B;
  hereby
    take f;
    let x be Point of M;
    the carrier of M = [.r,s.] by A1,TOPMETR:10
      .= the carrier of L by A1,TOPMETR:18;
    then P[x,f.x] by A5;
    hence f.x = {Ball(x,1/n) where n is Nat: n <> 0} & B = Union f;
  end;
  let X be Subset of L;
  assume X in B;
  then X in union rng f by CARD_3:def 4;
  then consider Z being set such that
A6: X in Z and
A7: Z in rng f by TARSKI:def 4;
  consider x being object such that
A8: x in dom f and
A9: f.x = Z by A7,FUNCT_1:def 3;
  consider
  x1 being Point of L, y being Point of M, B1 being Basis of x1 such
  that
  x = x1 and
  x1 = y and
A10: f.x = B1 & B1 = {Ball(y,1/n) where n is Nat: n <> 0} by A5,A8;
  consider n being Nat such that
A11: X = Ball(y,1/n) and
  n <> 0 by A6,A9,A10;
  reconsider X1 = X as Subset of R^1 by PRE_TOPC:11;
  Ball(y,1/n) = [.r,s.] or Ball(y,1/n) = [.r,y+1/n.[ or Ball(y,1/n) = ].y
  -1/n,s.] or Ball(y,1/n) = ].y-1/n,y+1/n.[ by A1,Th1;
  then X1 is connected by A11;
  hence thesis by CONNSP_1:23;
end;
