reserve r, s, t for Real;
reserve seq for Real_Sequence,
  X, Y for Subset of REAL;
reserve r3, r1, q3, p3 for Real;

theorem
  r3 in Cl X implies ex seq st rng seq c= X & seq is convergent & lim seq = r3
proof
  defpred P[object,object] means
  ex n being Nat st $1 = n & $2 = the Element of X/\].r3-1/(n+1),r3+1/(n+1).[;
  assume
A1: r3 in Cl X;
A2: now
    let x be object;
    assume x in NAT;
    then reconsider n = x as Element of NAT;
    set n1 = n+1;
    set oi = ].r3-1/n1,r3+1/n1.[;
    reconsider u = the Element of X/\oi as object;
    take u;
A3: r3 < r3+1/n1 by XREAL_1:29;
    then r3-1/n1 < r3 by XREAL_1:19;
    then r3 in oi by A3;
    then X/\oi is non empty by A1,Th63;
    then u in X/\oi;
    hence u in REAL;
    thus P[x,u];
  end;
  consider seq being Function such that
A4: dom seq = NAT & rng seq c= REAL and
A5: for x being object st x in NAT holds P[x,seq.x] from FUNCT_1:sch 6(A2);
  reconsider seq as Real_Sequence by A4,FUNCT_2:def 1,RELSET_1:4;
  take seq;
  thus rng seq c= X
  proof
    let y be object;
    assume y in rng seq;
    then consider x being object such that
A6: x in dom seq and
A7: seq.x = y by FUNCT_1:def 3;
    consider n being Nat such that
    x = n and
A8: seq.x = the Element of X/\].r3-1/(n+1),r3+1/(n+1).[ by A5,A6;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    set n1 = n+1;
    set oi = ].r3-1/n1,r3+1/n1.[;
A9: r3 < r3+1/n1 by XREAL_1:29;
    then r3-1/n1 < r3 by XREAL_1:19;
    then r3 in oi by A9;
    then X/\oi is non empty by A1,Th63;
    hence thesis by A7,A8,XBOOLE_0:def 4;
  end;
A10: now
    let p be Real;
    set cp = [/ 1/p \];
A11: 1/p <= cp by INT_1:def 7;
    assume
A12: 0<p;
    then
A13: 0 < cp by INT_1:def 7;
    then reconsider cp as Element of NAT by INT_1:3;
    reconsider n = cp as Nat;
    take n;
    n < n+1 by NAT_1:13;
    then
A14: 1/(n+1) < 1/n by A13,XREAL_1:88;
    1/(1/p) >= 1/cp by A12,A11,XREAL_1:85; then
A15: 1/(n+1) < p by A14,XXREAL_0:2;
    let m be Nat;
    assume n<=m;
    then
A16: n+1 <= m+1 by XREAL_1:6;
    set m1 = m+1;
    1/m1 <= 1/(n+1) by A16,XREAL_1:85;
    then
A17: 1/m1 < p by A15,XXREAL_0:2;
    set oi = ].r3-1/m1,r3+1/m1.[;
A18: r3 < r3+1/m1 by XREAL_1:29;
    then r3-1/m1 < r3 by XREAL_1:19;
    then r3 in oi by A18;
    then
A19: X/\oi is non empty by A1,Th63;
    m in NAT by ORDINAL1:def 12;
    then ex m9 being Nat
   st m9 = m & seq.m = the Element of X/\].r3-1/(m9+ 1),r3+1/(m9+1).[ by A5;
    then seq.m in oi by A19,XBOOLE_0:def 4;
    then consider s such that
A20: seq.m = s and
A21: r3-1/m1 < s & s < r3+1/m1;
    -1/m1 < s-r3 & s-r3 < 1/m1 by A21,XREAL_1:19,20;
    then |.s-r3.| < 1/m1 by SEQ_2:1;
    hence |.seq.m-r3.|<p by A20,A17,XXREAL_0:2;
  end;
  hence seq is convergent;
  hence thesis by A10,SEQ_2:def 7;
end;
