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 Th11:
  f is_differentiable_in x0 iff (ex N be Neighbourhood of x0 st N
c= dom f) & for h,c st rng c = {x0} & rng (h + c) c= dom f holds h"(#)(f/*(h+c)
  - f/*c) is convergent
proof
  thus f is_differentiable_in x0 implies (ex N be Neighbourhood of x0 st N c=
dom f) & for h,c st rng c = {x0} & rng (h + c) c= dom f holds h"(#)(f/*(h+c) -
  f/*c) is convergent
  proof
    assume
A1: f is_differentiable_in x0;
    then consider N be Neighbourhood of x0 such that
A2: N c= dom f and
    ex L be LinearFunc, R be RestFunc st
    for g st g in N holds f.g - f.x0 = L.(g -
    x0) + R.(g - x0);
    thus ex N be Neighbourhood of x0 st N c= dom f by A2;
    let h,c such that
A3: rng c = {x0} and
A4: rng (h + c) c= dom f;
A5: lim h = 0;
    consider r be Real such that
A6: 0 < r and
A7: N = ].x0 - r,x0 + r.[ by RCOMP_1:def 6;
    consider k being Nat such that
A8: for n being Nat st k <= n holds |.h.n - 0.| < r by A5,A6,SEQ_2:def 7;
    set h1 = h^\k;
    rng (h1 + c) c= N
    proof
      let x be object;
      assume x in rng (h1 + c);
      then consider n such that
A9:   x = (h1 + c).n by FUNCT_2:113;
      c.n in rng c by VALUED_0:28;
      then c.n = x0 by A3,TARSKI:def 1;
      then
A10:  x = h1.n + x0 by A9,SEQ_1:7
        .= h.(n+k) + x0 by NAT_1:def 3;
      |.h.(n+k) - 0.| < r by A8,NAT_1:12;
      then h.(n+k) in ].0 - r, 0 + r.[ by RCOMP_1:1;
      then h.(n+k) in {g: -r < g & g < r} by RCOMP_1:def 2;
      then
A11:  ex g st g = h.(n+k) & -r < g & g < r;
      then
A12:  h.(n+k) + x0 < x0 + r by XREAL_1:6;
      x0 + -r < h.(n+k) + x0 by A11,XREAL_1:6;
      then h.(n+k) + x0 in {g: x0 - r < g & g < x0 + r} by A12;
      hence thesis by A7,A10,RCOMP_1:def 2;
    end;
    then
A13: h1"(#)(f/*(h1+c) - f/*c) is convergent by A1,A2,A3,FDIFF_1:12;
A14: {x0} c= dom f
    proof
      let x be object;
      assume x in {x0};
      then
A15:  x = x0 by TARSKI:def 1;
      x0 in N by RCOMP_1:16;
      hence thesis by A2,A15;
    end;
    c^\k = c by VALUED_0:26;
    then h1"(#)(f/*(h1+c) - f/*c) = h1"(#)(f/*((h+c)^\k) - f/*(c^\k)) by
SEQM_3:15
      .= h1"(#)(((f/*(h+c))^\k) - f/*(c^\k)) by A4,VALUED_0:27
      .= h1"(#)(((f/*(h+c))^\k) - ((f/*c)^\k)) by A3,A14,VALUED_0:27
      .= h1"(#)((f/*(h+c) - (f/*c))^\k) by SEQM_3:17
      .= ((h")^\k)(#)((f/*(h+c) - (f/*c))^\k) by SEQM_3:18
      .= ((h")(#)(f/*(h+c) - (f/*c)))^\k by SEQM_3:19;
    hence thesis by A13,SEQ_4:21;
  end;
  assume that
A16: ex N be Neighbourhood of x0 st N c= dom f and
A17: for h,c st rng c = {x0} & rng (h + c) c= dom f holds h"(#)(f/*(h+c)
  - f/*c) is convergent;
  thus thesis by A16,A17,Lm1;
end;
