reserve x for object;
reserve x0,r,r1,r2,g,g1,g2,p,y0 for Real;
reserve n,m,k,l for Element of NAT;
reserve a,b,d for Real_Sequence;
reserve h,h1,h2 for non-zero 0-convergent Real_Sequence;
reserve c,c1 for constant Real_Sequence;
reserve A for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;
reserve L for LinearFunc;
reserve R for RestFunc;

theorem Th8:
  (ex N be Neighbourhood of r st N c= dom f) implies ex h,c st rng
  c = {r} & rng (h+c) c= dom f & {r} c= dom f
proof
  given N be Neighbourhood of r such that
A1: N c= dom f;
  reconsider r0 =r as Element of REAL by XREAL_0:def 1;
  set a = seq_const r;
  consider g be Real such that
A2: 0 < g and
A3: N = ].r - g, r + g.[ by RCOMP_1:def 6;
  reconsider a as constant Real_Sequence;
  deffunc G(Nat) = g/($1+2);
  consider b such that
A4: for n being Nat holds b.n = G(n) from SEQ_1:sch 1;
A5: lim b = 0 by A4,SEQ_4:31;
A6: b is convergent by A4,SEQ_4:31;
  now
    let n be Nat;
    0 < g/(n+2) by A2;
    hence 0 <> b.n by A4;
  end;
  then b is non-zero by SEQ_1:5;
  then reconsider b as 0-convergent non-zero Real_Sequence
    by A6,A5,FDIFF_1:def 1;
  take b,a;
  thus rng a = {r}
  proof
    thus rng a c= {r}
    proof
      let x be object;
      assume x in rng a;
      then ex n st x = a.n by FUNCT_2:113;
      then x = r by SEQ_1:57;
      hence thesis by TARSKI:def 1;
    end;
    let x be object;
    assume x in {r};
    then x = r by TARSKI:def 1
      .= a.0 by SEQ_1:57;
    hence thesis by VALUED_0:28;
  end;
  thus rng (b+a) c= dom f
  proof
    let x be object;
    assume x in rng (b+a);
    then consider n such that
A7: x = (b+a).n by FUNCT_2:113;
    0+1 < n + 2 by XREAL_1:8;
    then g*1 < g*(n+2) by A2,XREAL_1:97;
    then g * (n+2)" < g*(n + 2)*((n + 2)") by XREAL_1:68;
    then g * ((n+2)") < g*((n + 2)*(n + 2)");
    then g * (n+2)" < g * 1 by XCMPLX_0:def 7;
    then g/(n+2) < g by XCMPLX_0:def 9;
    then
A8: r + g/(n+2) < r + g by XREAL_1:6;
A9: r - g < r - 0 by A2,XREAL_1:15;
    r + 0 < r + g/(n+2) by A2,XREAL_1:8;
    then r - g < r + g/(n+2) by A9,XXREAL_0:2;
    then
A10: r + g/(n+2) in {g1: r - g < g1 & g1 < r + g} by A8;
    x = b.n +a.n by A7,SEQ_1:7
      .= g/(n+2) + a.n by A4
      .= g/(n+2) + r by SEQ_1:57;
    then x in N by A3,A10,RCOMP_1:def 2;
    hence thesis by A1;
  end;
  let x be object;
  assume x in {r};
  then x = r by TARSKI:def 1;
  then x in N by RCOMP_1:16;
  hence thesis by A1;
end;
