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 Th12:
  f is_differentiable_in x0 & diff(f,x0) = g 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 &
  lim (h"(#)(f/*(h+c) - f/*c)) = g
proof
  thus f is_differentiable_in x0 & diff(f,x0) = g 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 & lim (h"(#)(f/*(h+c) - f/*c))
  = g
  proof
    assume that
A1: f is_differentiable_in x0 and
A2: diff(f,x0) = g;
    thus ex N be Neighbourhood of x0 st N c= dom f by A1;
A3: for h,c st rng c = {x0} & rng (h + c) c= dom f holds h"(#)(f/*(h+c) -
    f /*c) is convergent by A1,Th11;
    ex N be Neighbourhood of x0 st N c= dom f by A1;
    hence thesis by A2,A3,Lm1;
  end;
  assume that
A4: ex N be Neighbourhood of x0 st N c= dom f and
A5: for h,c st rng c = {x0} & rng (h + c) c= dom f holds h"(#)(f/*(h+c)
  - f/*c) is convergent & lim (h"(#)(f/*(h+c) - f/*c)) = g;
A6: for h,c holds rng c = {x0} & rng (h + c) c= dom f implies h"(#)(f/*(h+c)
  - f/*c) is convergent by A5;
  hence f is_differentiable_in x0 by A4,Lm1;
  consider h,c such that
A7: rng c = {x0} and
A8: rng (h+c) c= dom f and
  {x0} c= dom f by A4,Th8;
  lim (h"(#)(f/*(h+c) - f/*c)) = g by A5,A7,A8;
  hence thesis by A4,A6,A7,A8,Lm1;
end;
