
theorem Th10:
for f be PartFunc of REAL,REAL, x0 be Real st
 f is_right_convergent_in x0 holds
  (ex r be Real st 0<r & f|(].x0,x0+r.[) is bounded_below) &
  (ex r be Real st 0<r & f|(].x0,x0+r.[) is bounded_above)
proof
    let f be PartFunc of REAL,REAL, x0 be Real;
    assume
A1:  f is_right_convergent_in x0;
    consider g be Real such that
A2:  for g1 be Real st 0 < g1 ex r be Real st x0<r & for r1 be Real st
       r1<r & x0<r1 & r1 in dom f holds |.f.r1-g.| < g1 by A1,LIMFUNC2:10;
    consider r be Real such that
A3:  x0 < r and
A4:  for r1 be Real st r1<r & x0<r1 & r1 in dom f holds |.f.r1-g.| < 1
       by A2;
    set R = r-x0;

    for r1 be object st r1 in dom(f|(].x0,x0+R.[))
     holds -1+g < (f|(].x0,x0+R.[)).r1
    proof
     let r1 be object;
     assume A5: r1 in dom(f|(].x0,x0+R.[)); then
     reconsider r1 as Real;
     r1 in dom f /\ ].x0,x0+R.[ by A5,RELAT_1:61; then
A6:  r1 in dom f & r1 in ].x0,x0+R.[ by XBOOLE_0:def 4; then
A7:  x0 < r1 & r1 < x0+R by XXREAL_1:4; then
     |. f.r1 - g .| < 1 by A4,A6; then
A8:  -1 <= f.r1 - g by ABSVALUE:5;
     now assume -1 = f.r1 - g; then
      |. f.r1 - g .| = -(-1) by ABSVALUE:def 1;
      hence contradiction by A7,A4,A6;
     end; then
     -1 < f.r1-g by A8,XXREAL_0:1; then
     -1+g < f.r1 by XREAL_1:20;
     hence thesis by A6,FUNCT_1:49;
    end; then
    f|(].x0,x0+R.[) is bounded_below by SEQ_2:def 2;
    hence ex r be Real st 0<r & f|(].x0,x0+r.[) is bounded_below
      by A3,XREAL_1:50;

    consider r be Real such that
A9:  x0 < r and
A10:  for r1 be Real st r1<r & x0<r1 & r1 in dom f holds |.f.r1-g.| < 1
       by A2;
    set R = r-x0;

    for r1 be object st r1 in dom(f|(].x0,x0+R.[))
     holds (f|(].x0,x0+R.[)).r1 < g+1
    proof
     let r1 be object;
     assume A11: r1 in dom(f|(].x0,x0+R.[)); then
     reconsider r1 as Real;
     r1 in dom f /\ ].x0,x0+R.[ by A11,RELAT_1:61; then
A12:  r1 in dom f & r1 in ].x0,x0+R.[ by XBOOLE_0:def 4; then
     x0 < r1 & r1 < x0+R by XXREAL_1:4; then
     |. f.r1 - g .| < 1 by A10,A12; then
     f.r1-g < 1 by ABSVALUE:def 1; then
     f.r1 < g+1 by XREAL_1:19;
     hence thesis by A12,FUNCT_1:49;
    end; then
    f|(].x0,x0+R.[) is bounded_above by SEQ_2:def 1;
    hence ex r be Real st 0<r & f|(].x0,x0+r.[) is bounded_above
      by A9,XREAL_1:50;
end;
