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
  f1 is_right_divergent_to+infty_in x0 & f2
  is_right_divergent_to+infty_in x0 & (for r st x0<r ex g st g<r & x0<g & g in
  dom f1 /\ dom f2) implies f1+f2 is_right_divergent_to+infty_in x0 & f1(#)f2
  is_right_divergent_to+infty_in x0
proof
  assume that
A1: f1 is_right_divergent_to+infty_in x0 and
A2: f2 is_right_divergent_to+infty_in x0 and
A3: for r st x0<r ex g st g<r & x0<g & g in dom f1/\dom f2;
A4: now
    let seq;
    assume that
A5: seq is convergent and
A6: lim seq=x0 and
A7: rng seq c=dom(f1+f2)/\right_open_halfline(x0);
    rng seq c=dom f2/\right_open_halfline(x0) by A7,Lm4;
    then
A8: f2/*seq is divergent_to+infty by A2,A5,A6;
    rng seq c=dom f1/\right_open_halfline(x0) by A7,Lm4;
    then f1/*seq is divergent_to+infty by A1,A5,A6;
    then
A9: f1/*seq+f2/*seq is divergent_to+infty by A8,LIMFUNC1:8;
A10: dom(f1+f2)=dom f1/\dom f2 by A7,Lm4;
    rng seq c=dom(f1+f2) by A7,Lm4;
    hence (f1+f2)/*seq is divergent_to+infty by A10,A9,RFUNCT_2:8;
  end;
A11: now
    let seq;
    assume that
A12: seq is convergent and
A13: lim seq=x0 and
A14: rng seq c=dom(f1(#)f2)/\right_open_halfline(x0);
    rng seq c=dom f2/\right_open_halfline(x0) by A14,Lm2;
    then
A15: f2/*seq is divergent_to+infty by A2,A12,A13;
    rng seq c=dom f1/\right_open_halfline(x0) by A14,Lm2;
    then f1/*seq is divergent_to+infty by A1,A12,A13;
    then
A16: (f1/*seq)(#)(f2/*seq) is divergent_to+infty by A15,LIMFUNC1:10;
A17: dom(f1(#)f2)=dom f1/\dom f2 by A14,Lm2;
    rng seq c=dom(f1(#)f2) by A14,Lm2;
    hence (f1(#)f2)/*seq is divergent_to+infty by A17,A16,RFUNCT_2:8;
  end;
  now
    let r;
    assume x0<r;
    then consider g such that
A18: g<r and
A19: x0<g and
A20: g in dom f1/\dom f2 by A3;
    take g;
    thus g<r & x0<g & g in dom(f1+f2) by A18,A19,A20,VALUED_1:def 1;
  end;
  hence f1+f2 is_right_divergent_to+infty_in x0 by A4;
  now
    let r;
    assume x0<r;
    then consider g such that
A21: g<r and
A22: x0<g and
A23: g in dom f1/\dom f2 by A3;
    take g;
    thus g<r & x0<g & g in dom(f1(#)f2) by A21,A22,A23,VALUED_1:def 4;
  end;
  hence thesis by A11;
end;
