reserve r,r1,r2,g,g1,g2,x0,t for Real;
reserve n,k for Nat;
reserve seq for Real_Sequence;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem Th58:
  f is_right_convergent_in x0 & lim_right(f,x0)<>0 & (for r st x0<
  r ex g st g<r & x0<g & g in dom f & f.g<>0) implies f^ is_right_convergent_in
  x0 & lim_right(f^,x0)=(lim_right(f,x0))"
proof
  assume that
A1: f is_right_convergent_in x0 and
A2: lim_right(f,x0)<>0 and
A3: for r st x0<r ex g st g<r & x0<g & g in dom f & f.g<>0;
A4: dom f\f"{0}=dom(f^) by RFUNCT_1:def 2;
A5: now
A6: dom(f^) c=dom f by A4,XBOOLE_1:36;
    let seq such that
A7: seq is convergent and
A8: lim seq=x0 and
A9: rng seq c=dom(f^)/\right_open_halfline(x0);
A10: dom(f^)/\right_open_halfline(x0)c=dom(f^) by XBOOLE_1:17;
    then
A11: f/*seq is non-zero by A9,RFUNCT_2:11,XBOOLE_1:1;
    rng seq c=dom(f^) by A9,A10,XBOOLE_1:1;
    then
A12: rng seq c=dom f by A6,XBOOLE_1:1;
    dom(f^)/\right_open_halfline(x0)c=right_open_halfline(x0) by XBOOLE_1:17;
    then rng seq c=right_open_halfline(x0) by A9,XBOOLE_1:1;
    then
A13: rng seq c=dom f/\right_open_halfline(x0) by A12,XBOOLE_1:19;
    then
A14: lim(f/*seq)=lim_right(f,x0) by A1,A7,A8,Def8;
A15: (f/*seq)"=(f^)/*seq by A9,A10,RFUNCT_2:12,XBOOLE_1:1;
A16: f/*seq is convergent by A1,A7,A8,A13;
    hence (f^)/*seq is convergent by A2,A14,A11,A15,SEQ_2:21;
    thus lim((f^)/*seq)=(lim_right(f,x0))" by A2,A16,A14,A11,A15,SEQ_2:22;
  end;
  now
    let r;
    assume x0<r;
    then consider g such that
A17: g<r and
A18: x0<g and
A19: g in dom f and
A20: f.g<>0 by A3;
    take g;
    not f.g in {0} by A20,TARSKI:def 1;
    then not g in f"{0} by FUNCT_1:def 7;
    hence g<r & x0<g & g in dom(f^) by A4,A17,A18,A19,XBOOLE_0:def 5;
  end;
  hence f^ is_right_convergent_in x0 by A5;
  hence thesis by A5,Def8;
end;
