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

theorem
  (f is_divergent_to+infty_in x0 & r>0 implies r(#) f
is_divergent_to+infty_in x0)& (f is_divergent_to+infty_in x0 & r<0 implies r(#)
f is_divergent_to-infty_in x0)& (f is_divergent_to-infty_in x0 & r>0 implies r
  (#) f is_divergent_to-infty_in x0)& (f is_divergent_to-infty_in x0 & r<0
  implies r(#)f is_divergent_to+infty_in x0)
proof
  thus f is_divergent_to+infty_in x0 & r>0 implies r(#)f
  is_divergent_to+infty_in x0
  proof
    assume that
A1: f is_divergent_to+infty_in x0 and
A2: r>0;
    thus for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in dom(r(#)
    f) & g2<r2 & x0<g2 & g2 in dom(r (#)f)
    proof
      let r1,r2;
      assume that
A3:   r1<x0 and
A4:   x0<r2;
      consider g1,g2 such that
A5:   r1<g1 and
A6:   g1<x0 and
A7:   g1 in dom f and
A8:   g2<r2 and
A9:   x0<g2 and
A10:  g2 in dom f by A1,A3,A4;
      take g1;
      take g2;
      thus thesis by A5,A6,A7,A8,A9,A10,VALUED_1:def 5;
    end;
    let seq;
    assume that
A11: seq is convergent and
A12: lim seq=x0 and
A13: rng seq c=dom(r(#)f)\{x0};
A14: rng seq c=dom f\{x0} by A13,VALUED_1:def 5;
    then f/*seq is divergent_to+infty by A1,A11,A12;
    then r(#)(f/*seq) is divergent_to+infty by A2,LIMFUNC1:13;
    hence thesis by A14,RFUNCT_2:9,XBOOLE_1:1;
  end;
  thus f is_divergent_to+infty_in x0 & r<0 implies r(#)f
  is_divergent_to-infty_in x0
  proof
    assume that
A15: f is_divergent_to+infty_in x0 and
A16: r<0;
    thus for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in dom(r(#)
    f) & g2<r2 & x0<g2 & g2 in dom(r (#)f)
    proof
      let r1,r2;
      assume that
A17:  r1<x0 and
A18:  x0<r2;
      consider g1,g2 such that
A19:  r1<g1 and
A20:  g1<x0 and
A21:  g1 in dom f and
A22:  g2<r2 and
A23:  x0<g2 and
A24:  g2 in dom f by A15,A17,A18;
      take g1;
      take g2;
      thus thesis by A19,A20,A21,A22,A23,A24,VALUED_1:def 5;
    end;
    let seq;
    assume that
A25: seq is convergent and
A26: lim seq=x0 and
A27: rng seq c=dom(r(#)f)\{x0};
A28: rng seq c=dom f\{x0} by A27,VALUED_1:def 5;
    then f/*seq is divergent_to+infty by A15,A25,A26;
    then r(#)(f/*seq) is divergent_to-infty by A16,LIMFUNC1:13;
    hence thesis by A28,RFUNCT_2:9,XBOOLE_1:1;
  end;
  thus f is_divergent_to-infty_in x0 & r>0 implies r(#)f
  is_divergent_to-infty_in x0
  proof
    assume that
A29: f is_divergent_to-infty_in x0 and
A30: r>0;
    thus for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in dom(r(#)
    f) & g2<r2 & x0<g2 & g2 in dom(r (#)f)
    proof
      let r1,r2;
      assume that
A31:  r1<x0 and
A32:  x0<r2;
      consider g1,g2 such that
A33:  r1<g1 and
A34:  g1<x0 and
A35:  g1 in dom f and
A36:  g2<r2 and
A37:  x0<g2 and
A38:  g2 in dom f by A29,A31,A32;
      take g1;
      take g2;
      thus thesis by A33,A34,A35,A36,A37,A38,VALUED_1:def 5;
    end;
    let seq;
    assume that
A39: seq is convergent and
A40: lim seq=x0 and
A41: rng seq c=dom(r(#)f)\{x0};
A42: rng seq c=dom f\{x0} by A41,VALUED_1:def 5;
    then f/*seq is divergent_to-infty by A29,A39,A40;
    then r(#)(f/*seq) is divergent_to-infty by A30,LIMFUNC1:14;
    hence thesis by A42,RFUNCT_2:9,XBOOLE_1:1;
  end;
  assume that
A43: f is_divergent_to-infty_in x0 and
A44: r<0;
  thus for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in dom(r(#)f)
  & g2<r2 & x0<g2 & g2 in dom(r (#)f)
  proof
    let r1,r2;
    assume that
A45: r1<x0 and
A46: x0<r2;
    consider g1,g2 such that
A47: r1<g1 and
A48: g1<x0 and
A49: g1 in dom f and
A50: g2<r2 and
A51: x0<g2 and
A52: g2 in dom f by A43,A45,A46;
    take g1;
    take g2;
    thus thesis by A47,A48,A49,A50,A51,A52,VALUED_1:def 5;
  end;
  let seq;
  assume that
A53: seq is convergent and
A54: lim seq=x0 and
A55: rng seq c=dom(r(#)f)\{x0};
A56: rng seq c=dom f\{x0} by A55,VALUED_1:def 5;
  then f/*seq is divergent_to-infty by A43,A53,A54;
  then r(#)(f/*seq) is divergent_to+infty by A44,LIMFUNC1:14;
  hence thesis by A56,RFUNCT_2:9,XBOOLE_1:1;
end;
