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 Th8:
  (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) iff (for r st r<x0 ex g st r<g & g<x0 & g in
  dom f) & for r st x0<r ex g st g<r & x0<g & g in dom f
proof
  thus (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 (for r st r<x0 ex g st r<g & g<x0 & g in
  dom f) & for r st x0<r ex g st g<r & x0<g & g in dom f
  proof
    assume
A1: 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;
    thus for r st r<x0 ex g st r<g & g<x0 & g in dom f
    proof
A2:   x0<x0+1 by Lm1;
      let r;
      assume r<x0;
      then consider g1,g2 such that
A3:   r<g1 and
A4:   g1<x0 and
A5:   g1 in dom f and
      g2<x0+1 and
      x0<g2 and
      g2 in dom f by A1,A2;
      take g1;
      thus thesis by A3,A4,A5;
    end;
A6: x0-1<x0 by Lm1;
    let r;
    assume x0<r;
    then consider g1,g2 such that
    x0-1<g1 and
    g1<x0 and
    g1 in dom f and
A7: g2<r and
A8: x0<g2 and
A9: g2 in dom f by A1,A6;
    take g2;
    thus thesis by A7,A8,A9;
  end;
  assume that
A10: for r st r<x0 ex g st r<g & g<x0 & g in dom f and
A11: for r st x0<r ex g st g<r & x0<g & g in dom f;
  let r1,r2;
  assume that
A12: r1<x0 and
A13: x0<r2;
  consider g2 such that
A14: g2<r2 and
A15: x0<g2 and
A16: g2 in dom f by A11,A13;
  consider g1 such that
A17: r1<g1 and
A18: g1<x0 and
A19: g1 in dom f by A10,A12;
  take g1;
  take g2;
  thus thesis by A17,A18,A19,A14,A15,A16;
end;
