reserve r,r1,g for Real,
  n,m,k for Nat,
  seq,seq1, seq2 for Real_Sequence,
  f,f1,f2 for PartFunc of REAL,REAL,
  x for set;
reserve r,r1,r2,g,g1,g2 for Real;

theorem
  (f is divergent_in-infty_to+infty & r>0 implies r(#)f is
divergent_in-infty_to+infty) & (f is divergent_in-infty_to+infty & r<0 implies
r(#)f is divergent_in-infty_to-infty) & (f is divergent_in-infty_to-infty & r>0
  implies r(#)f is divergent_in-infty_to-infty) & (f is
divergent_in-infty_to-infty & r<0 implies r(#)f is divergent_in-infty_to+infty)
proof
  thus f is divergent_in-infty_to+infty & r>0 implies r(#)f is
  divergent_in-infty_to+infty
  proof
    assume that
A1: f is divergent_in-infty_to+infty and
A2: r>0;
A3: now
      let seq;
      assume that
A4:   seq is divergent_to-infty and
A5:   rng seq c=dom(r(#)f);
A6:   rng seq c=dom f by A5,VALUED_1:def 5;
      then f/*seq is divergent_to+infty by A1,A4;
      then r(#)(f/*seq) is divergent_to+infty by A2,Th13;
      hence (r(#)f)/*seq is divergent_to+infty by A6,RFUNCT_2:9;
    end;
    now
      let r1;
      consider g such that
A7:   g<r1 & g in dom f by A1;
      take g;
      thus g<r1 & g in dom(r(#)f) by A7,VALUED_1:def 5;
    end;
    hence thesis by A3;
  end;
  thus f is divergent_in-infty_to+infty & r<0 implies r(#)f is
  divergent_in-infty_to-infty
  proof
    assume that
A8: f is divergent_in-infty_to+infty and
A9: r<0;
A10: now
      let seq;
      assume that
A11:  seq is divergent_to-infty and
A12:  rng seq c=dom(r(#)f);
A13:  rng seq c=dom f by A12,VALUED_1:def 5;
      then f/*seq is divergent_to+infty by A8,A11;
      then r(#)(f/*seq) is divergent_to-infty by A9,Th13;
      hence (r(#)f)/*seq is divergent_to-infty by A13,RFUNCT_2:9;
    end;
    now
      let r1;
      consider g such that
A14:  g<r1 & g in dom f by A8;
      take g;
      thus g<r1 & g in dom(r(#)f) by A14,VALUED_1:def 5;
    end;
    hence thesis by A10;
  end;
  thus f is divergent_in-infty_to-infty & r>0 implies r(#)f is
  divergent_in-infty_to-infty
  proof
    assume that
A15: f is divergent_in-infty_to-infty and
A16: r>0;
A17: now
      let seq;
      assume that
A18:  seq is divergent_to-infty and
A19:  rng seq c=dom(r(#)f);
A20:  rng seq c=dom f by A19,VALUED_1:def 5;
      then f/*seq is divergent_to-infty by A15,A18;
      then r(#)(f/*seq) is divergent_to-infty by A16,Th14;
      hence (r(#)f)/*seq is divergent_to-infty by A20,RFUNCT_2:9;
    end;
    now
      let r1;
      consider g such that
A21:  g<r1 & g in dom f by A15;
      take g;
      thus g<r1 & g in dom(r(#)f) by A21,VALUED_1:def 5;
    end;
    hence thesis by A17;
  end;
  assume that
A22: f is divergent_in-infty_to-infty and
A23: r<0;
A24: now
    let seq;
    assume that
A25: seq is divergent_to-infty and
A26: rng seq c=dom(r(#)f);
A27: rng seq c=dom f by A26,VALUED_1:def 5;
    then f/*seq is divergent_to-infty by A22,A25;
    then r(#)(f/*seq) is divergent_to+infty by A23,Th14;
    hence (r(#)f)/*seq is divergent_to+infty by A27,RFUNCT_2:9;
  end;
  now
    let r1;
    consider g such that
A28: g<r1 & g in dom f by A22;
    take g;
    thus g<r1 & g in dom(r(#)f) by A28,VALUED_1:def 5;
  end;
  hence thesis by A24;
end;
