
theorem Th16:
for f1,f2 be PartFunc of REAL,REAL, x0 be Real st
 f1 is_right_divergent_to-infty_in x0 &
 (for r be Real st x0<r ex g be Real st g<r & x0<g & g in dom(f1+f2)) &
 (ex r be Real st 0<r & f2|(].x0,x0+r.[) is bounded_above)
holds
  f1+f2 is_right_divergent_to-infty_in x0
proof
    let f1,f2 be PartFunc of REAL,REAL, x0 be Real;
    assume that
A1:  f1 is_right_divergent_to-infty_in x0 and
A2:  for r be Real st x0<r ex g be Real st g<r & x0<g & g in dom(f1+f2);
  given r be Real such that
A3: 0<r and
A4: f2|(].x0,x0+r.[) is bounded_above;
  now
    let seq be Real_Sequence such that
A5: seq is convergent and
A6: lim seq=x0 and
A7: rng seq c=dom(f1+f2)/\right_open_halfline(x0);
    x0<x0+r by A3,Lm2;
    then consider k be Nat such that
A8: for n be Nat st k<=n holds seq.n<x0+r by A5,A6,LIMFUNC2:2;
A9: dom(f1+f2)/\right_open_halfline(x0) c=dom(f1+f2) by XBOOLE_1:17;

A10: rng(seq^\k)c=rng seq by VALUED_0:21;
    then
A11: rng(seq^\k)c=dom(f1+f2)/\right_open_halfline(x0) by A7;

A12: rng(seq^\k)c=dom(f1+f2) by A10,A7,A9;

    dom(f1+f2)=dom f1/\dom f2 by VALUED_1:def 1;
    then
A13:dom(f1+f2)c=dom f1 & dom(f1+f2)c=dom f2 by XBOOLE_1:17;
    then
A14:rng(seq^\k)c=dom f1 & rng(seq^\k)c=dom f2 by A9,A11;
    then rng(seq^\k)c=dom f1/\dom f2 by XBOOLE_1:19;
    then
A15: f1/*(seq^\k)+f2/*(seq^\k)=(f1+f2)/*(seq^\k) by RFUNCT_2:8
      .=((f1+f2)/*seq)^\k by A7,A9,VALUED_0:27,XBOOLE_1:1;
A16: dom(f1+f2)/\ right_open_halfline(x0) c=right_open_halfline(x0) by
XBOOLE_1:17;
    then rng(seq^\k)c=right_open_halfline(x0) by A10,A7;
    then
A17: rng(seq^\k)c=dom f1/\right_open_halfline(x0) by A14,XBOOLE_1:19;
    now
      consider r1 be Real such that
A18:  for g being object st g in ].x0,x0+r.[/\dom f2 holds f2.g<=r1 by A4,
RFUNCT_1:70;
      take r2=r1+1;
      let n be Nat;
A19: n in NAT by ORDINAL1:def 12;
      seq.(n+k)<x0+r by A8,NAT_1:12;
      then
A20:  (seq^\k).n<x0+r by NAT_1:def 3;
A21:  (seq^\k).n in rng(seq^\k) by VALUED_0:28;
      then (seq^\k).n in right_open_halfline(x0) by A10,A7,A16;
      then (seq^\k).n in {g1 where g1 is Real: x0<g1} by XXREAL_1:230;
      then ex g be Real st g=(seq^\k).n & x0<g;
      then (seq^\k).n in {g2 where g2 is Real: x0<g2 & g2<x0+r} by A20;
      then (seq^\k).n in ].x0,x0+r.[ by RCOMP_1:def 2;
      then (seq^\k).n in ].x0,x0+r.[/\dom f2 by A14,A21,XBOOLE_0:def 4;
      then f2.((seq^\k).n)<r1+1 by A18,XREAL_1:39;
      hence (f2/*(seq^\k)).n<r2 by A12,A13,FUNCT_2:108,XBOOLE_1:1,A19;
    end;
    then
A22: f2/*(seq^\k) is bounded_above by SEQ_2:def 3;
    lim(seq^\k)=x0 by A5,A6,SEQ_4:20;
    then f1/*(seq^\k)+f2/*(seq^\k) is divergent_to-infty
      by A22,A1,A5,A17,LIMFUNC2:def 6,LIMFUNC1:12;
    hence (f1+f2)/*seq is divergent_to-infty by A15,LIMFUNC1:7;
  end;
  hence thesis by A2,LIMFUNC2:def 6;
end;
