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
  f is_left_divergent_to-infty_in x0 iff (for r st r<x0 ex g st r<g & g<
  x0 & g in dom f) & for g1 ex r st r<x0 & for r1 st r<r1 & r1<x0 & r1 in dom f
  holds f.r1<g1
proof
  thus f is_left_divergent_to-infty_in x0 implies (for r st r<x0 ex g st r<g &
g<x0 & g in dom f) & for g1 ex r st r<x0 & for r1 st r<r1 & r1<x0 & r1 in dom f
  holds f.r1<g1
  proof
    assume that
A1: f is_left_divergent_to-infty_in x0 and
A2: (not for r st r<x0 ex g st r<g & g<x0 & g in dom f) or ex g1 st
    for r st r<x0 ex r1 st r<r1 & r1<x0 & r1 in dom f & g1<=f.r1;
    consider g1 such that
A3: for r st r<x0 ex r1 st r<r1 & r1<x0 & r1 in dom f & g1<=f.r1 by A1,A2;
    defpred X[Nat,Real] means x0-1/($1+1)<$2 & $2<x0 & $2 in
    dom f & g1<=f.($2);
A4: now
      let n be Element of NAT;
      x0-1/(n+1)<x0 by Lm3;
      then consider g2 such that
A5:   x0-1/(n+1)<g2 and
A6:   g2<x0 and
A7:   g2 in dom f and
A8:   g1<=f.g2 by A3;
       reconsider g2 as Element of REAL by XREAL_0:def 1;
      take g2;
      thus X[n,g2] by A5,A6,A7,A8;
    end;
    consider s be Real_Sequence such that
A9: for n being Element of NAT holds X[n,s.n] from FUNCT_2:sch 3(A4);
A10: for n being Nat holds X[n,s.n]
     proof let n;
      n in NAT by ORDINAL1:def 12;
      hence thesis by A9;
     end;
A11: rng s c=dom f/\left_open_halfline(x0) by A10,Th5;
A12: lim s=x0 by A10,Th5;
    s is convergent by A10,Th5;
    then f/*s is divergent_to-infty by A1,A12,A11;
    then consider n such that
A13: for k st n<=k holds (f/*s).k<g1;
A14: (f/*s).n<g1 by A13;
A15: n in NAT by ORDINAL1:def 12;
    rng s c=dom f by A10,Th5;
    then f.(s.n)<g1 by A14,FUNCT_2:108,A15;
    hence contradiction by A10;
  end;
  assume that
A16: for r st r<x0 ex g st r<g & g<x0 & g in dom f and
A17: for g1 ex r st r<x0 & for r1 st r<r1 & r1<x0 & r1 in dom f holds f. r1<g1;
  now
    let s be Real_Sequence such that
A18: s is convergent and
A19: lim s=x0 and
A20: rng s c=dom f/\left_open_halfline(x0);
A21: dom f/\left_open_halfline(x0)c=dom f by XBOOLE_1:17;
    now
      let g1;
      consider r such that
A22:  r<x0 and
A23:  for r1 st r<r1 & r1<x0 & r1 in dom f holds f.r1<g1 by A17;
      consider n such that
A24:  for k st n<=k holds r<s.k by A18,A19,A22,Th1;
      take n;
      let k;
      assume
A25:  n<=k;
A26:  s.k in rng s by VALUED_0:28;
      then s.k in left_open_halfline(x0) by A20,XBOOLE_0:def 4;
      then s.k in {g2: g2<x0} by XXREAL_1:229;
      then
A27:  ex g2 st g2=s.k & g2<x0;
A28: k in NAT by ORDINAL1:def 12;
      s.k in dom f by A20,A26,XBOOLE_0:def 4;
      then f.(s.k)<g1 by A23,A24,A25,A27;
      hence (f/*s).k<g1 by A20,A21,FUNCT_2:108,XBOOLE_1:1,A28;
    end;
    hence f/*s is divergent_to-infty;
  end;
  hence thesis by A16;
end;
