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 iff (for r ex g st g<r & g in dom f)
  & for g ex r st for r1 st r1<r & r1 in dom f holds f.r1<g
proof
  thus f is divergent_in-infty_to-infty implies (for r ex g st g<r & g in dom
  f) & for g ex r st for r1 st r1<r & r1 in dom f holds f.r1<g
  proof
    deffunc U(Nat) = -$1;
    assume
A1: f is divergent_in-infty_to-infty;
    assume not (for r ex g st g<r & g in dom f) or ex g st for r ex r1 st r1<
    r & r1 in dom f & f.r1>=g;
    then consider g such that
A2: for r ex r1 st r1<r & r1 in dom f & f.r1>=g by A1;
    defpred X[Nat,Real] means $2<-$1 & $2 in dom f & g <= f.
    $2;
A3: for n being Element of NAT ex r being Element of REAL st X[n,r]
     proof let n being Element of NAT ;
       consider r such that
A4:      X[n,r] by A2;
       reconsider r as Real;
       X[n,r] by A4;
      hence thesis;
     end;
    consider s be Real_Sequence such that
A5: for n being Element of NAT holds X[n,s.n] from FUNCT_2:sch 3(A3);
    now
      let x be object;
      assume x in rng s;
      then ex n being Element of NAT st s.n=x by FUNCT_2:113;
      hence x in dom f by A5;
    end;
    then
A6: rng s c=dom f;
    consider s1 be Real_Sequence such that
A7: for n holds s1.n=U(n) from SEQ_1:sch 1;
    now
      let n;
A8: n in NAT by ORDINAL1:def 12;
      s.n<-n by A5,A8;
      hence s.n<=s1.n by A7;
    end;
    then s is divergent_to-infty by A7,Th21,Th43;
    then f/*s is divergent_to-infty by A1,A6;
    then consider n such that
A9: for m st n<=m holds (f/*s).m<g;
A10: n in NAT by ORDINAL1:def 12;
    (f/*s).n<g by A9;
    then f.(s.n)<g by A6,FUNCT_2:108,A10;
    hence contradiction by A5,A10;
  end;
  assume that
A11: for r ex g st g<r & g in dom f and
A12: for g ex r st for r1 st r1<r & r1 in dom f holds f.r1<g;
  now
    let s be Real_Sequence such that
A13: s is divergent_to-infty and
A14: rng s c=dom f;
    now
      let g;
      consider r such that
A15:  for r1 st r1<r & r1 in dom f holds f.r1<g by A12;
      consider n such that
A16:  for m st n<=m holds s.m<r by A13;
      take n;
      let m;
A17:  s.m in rng s by VALUED_0:28;
A18: m in NAT by ORDINAL1:def 12;
      assume n<=m;
      then f.(s.m)<g by A14,A15,A16,A17;
      hence (f/*s).m<g by A14,FUNCT_2:108,A18;
    end;
    hence f/*s is divergent_to-infty;
  end;
  hence thesis by A11;
end;
