
theorem Th5:
for f be PartFunc of REAL,REAL, x0 be Real
 st f is_right_convergent_in x0 or f is_right_divergent_to+infty_in x0 or
    f is_right_divergent_to-infty_in x0
 ex seq be Real_Sequence st seq is convergent & lim seq = x0
  & rng seq c= dom f /\ right_open_halfline x0
proof
    let f be PartFunc of REAL,REAL, x0 be Real;
    assume
A1:  f is_right_convergent_in x0 or f is_right_divergent_to+infty_in x0 or
     f is_right_divergent_to-infty_in x0;
    defpred F[Nat,Real] means x0<$2 & $2<x0+1/($1+1) & $2 in dom f;
A2: for n be Element of NAT ex r be Element of REAL st F[n,r]
    proof
     let n be Element of NAT;
     consider r be Real such that
A3:   r < x0+1/(n+1) & x0 < r & r in dom f
        by A1,XREAL_1:29,LIMFUNC2:def 4,def 5,def 6;
     thus ex r be Element of REAL st
      x0 < r & r < x0+1/(n+1) & r in dom f by A3;
    end;
    consider seq be Real_Sequence such that
A4:  for n be Element of NAT holds F[n,seq.n] from FUNCT_2:sch 3(A2);
    take seq;
    for n be Nat holds x0<seq.n & seq.n<x0+1/(n+1) & seq.n in dom f
    proof
     let n be Nat;
     n is Element of NAT by ORDINAL1:def 12;
     hence thesis by A4;
    end;
    hence thesis by LIMFUNC2:6;
end;
