reserve r,r1,r2,g,g1,g2,x0,t for Real;
reserve n,k,m for Element of NAT;
reserve seq for Real_Sequence;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem Th20:
  (ex r st f|].x0-r,x0.[ is non-decreasing & f|].x0,x0+r.[ is
  non-increasing & not f|].x0-r,x0.[ is bounded_above & not f|].x0,x0+r.[ is
bounded_above) & (for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in
  dom f & g2<r2 & x0<g2 & g2 in dom f) implies f is_divergent_to+infty_in x0
proof
  given r such that
A1: f|].x0-r,x0.[ is non-decreasing and
A2: f|].x0,x0+r.[ is non-increasing and
A3: not f|].x0-r,x0.[ is bounded_above and
A4: not f|].x0,x0+r.[ is bounded_above;
  assume
A5: for r1,r2 st r1<x0 & x0<r2 ex g1,g2 st r1<g1 & g1<x0 & g1 in dom f &
  g2<r2 & x0<g2 & g2 in dom f;
  then for r st x0<r ex g st g<r & x0<g & g in dom f by Th8;
  then
A6: f is_right_divergent_to+infty_in x0 by A2,A4,LIMFUNC2:29;
  for r st r<x0 ex g st r<g & g<x0 & g in dom f by A5,Th8;
  then f is_left_divergent_to+infty_in x0 by A1,A3,LIMFUNC2:25;
  hence thesis by A6,Th12;
end;
