reserve x,x0,x1,x2,y,y0,y1,y2,r,r1,s,p,p1 for Real;
reserve z,z0 for Element of REAL 2;
reserve n,m,k for Element of NAT;
reserve Z for Subset of REAL 2;
reserve s1 for Real_Sequence;
reserve f,f1,f2 for PartFunc of REAL 2,REAL;
reserve R,R1,R2 for RestFunc;
reserve L,L1,L2 for LinearFunc;

theorem
  for z0 being Element of REAL 2 for N being Neighbourhood of proj(1,2).
  z0 st f is_partial_differentiable_in z0,1 & N c= dom SVF1(1,f,z0) holds for h
be 0-convergent non-zero Real_Sequence,
c be constant Real_Sequence st rng c = {proj(
1,2).z0} & rng (h+c) c= N holds h"(#)(SVF1(1,f,z0)/*(h+c) - SVF1(1,f,z0)/*c) is
convergent & partdiff(f,z0,1) = lim (h"(#)(SVF1(1,f,z0)/*(h+c) - SVF1(1,f,z0)/*
  c))
proof
  let z0 be Element of REAL 2;
  let N be Neighbourhood of proj(1,2).z0;
  assume that
A1: f is_partial_differentiable_in z0,1 and
A2: N c= dom SVF1(1,f,z0);
  consider x0,y0 being Real such that
A3: z0 = <*x0,y0*> and
A4: ex N1 being Neighbourhood of x0 st N1 c= dom SVF1(1,f,z0) & ex L,R
st for x st x in N1 holds SVF1(1,f,z0).x - SVF1(1,f,z0).x0 = L.(x-x0) + R.(x-x0
  ) by A1,Th9;
  consider N1 be Neighbourhood of x0 such that
  N1 c= dom SVF1(1,f,z0) and
A5: ex L,R st for x st x in N1 holds SVF1(1,f,z0).x - SVF1(1,f,z0).x0 =
  L.(x-x0) + R.(x-x0) by A4;
A6: proj(1,2).z0 = x0 by A3,Th1;
  then consider N2 be Neighbourhood of x0 such that
A7: N2 c= N and
A8: N2 c= N1 by RCOMP_1:17;
A9: N2 c= dom SVF1(1,f,z0) by A2,A7;
  let h be 0-convergent non-zero Real_Sequence,
  c be constant Real_Sequence such
  that
A10: rng c = {proj(1,2).z0} and
A11: rng (h+c) c= N;
  consider g be Real such that
A12: 0 < g and
A13: N2 = ].x0-g,x0+g.[ by RCOMP_1:def 6;
  x0 + 0 < x0 + g & x0 - g < x0 - 0 by A12,XREAL_1:8,44;
  then
A14: x0 in N2 by A13;
A15: rng c c= dom SVF1(1,f,z0)
  proof
    let y be object;
    assume y in rng c;
    then y = x0 by A10,A6,TARSKI:def 1;
    then y in N by A7,A14;
    hence thesis by A2;
  end;
  ex n st rng (c^\n) c= N2 & rng ((h+c)^\n) c= N2
  proof
    x0 in rng c by A10,A6,TARSKI:def 1;
    then
A16: lim c = x0 by SEQ_4:25;
    lim h = 0;
    then lim (h+c) = 0+x0 by A16,SEQ_2:6
      .= x0;
    then consider n being Nat such that
A17: for m being Nat st n <= m holds |.(h+c).m-x0.| < g by A12,
SEQ_2:def 7;
     reconsider n as Element of NAT by ORDINAL1:def 12;
    take n;
A18: rng (c^\n) = {x0} by A10,A6,VALUED_0:26;
    thus rng (c^\n) c= N2
    by A14,A18,TARSKI:def 1;
    let y be object;
    assume y in rng ((h+c)^\n);
    then consider m such that
A19: y = ((h+c)^\n).m by FUNCT_2:113;
    n + 0 <= n+m by XREAL_1:7;
    then
A20: |.(h+c).(n+m)-x0.|<g by A17;
    then (h+c).(m+n) - x0 < g by SEQ_2:1;
    then ((h+c)^\n).m - x0 < g by NAT_1:def 3;
    then
A21: ((h+c)^\n).m < x0 + g by XREAL_1:19;
    -g < (h+c).(m+n) - x0 by A20,SEQ_2:1;
    then -g < ((h+c)^\n).m - x0 by NAT_1:def 3;
    then x0 +-g < ((h+c)^\n).m by XREAL_1:20;
    hence thesis by A13,A19,A21;
  end;
  then consider n such that
  rng (c^\n) c= N2 and
A22: rng ((h+c)^\n) c= N2;
  consider L,R such that
A23: for x st x in N1 holds SVF1(1,f,z0).x - SVF1(1,f,z0).x0 = L.(x-x0) +
  R.(x-x0) by A5;
A24: rng (c^\n) c= dom SVF1(1,f,z0)
  proof
    let y be object;
    assume
A25: y in rng (c^\n);
    rng (c^\n) = rng c by VALUED_0:26;
    then y = x0 by A10,A6,A25,TARSKI:def 1;
    then y in N by A7,A14;
    hence thesis by A2;
  end;
A26: L is total by FDIFF_1:def 3;
A27: (L/*(h^\n) + R/*(h^\n))(#)(h^\n)" is convergent & lim ((L/*(h^\n) + R/*
  (h^\n))(#)(h^\n)") = L.1
  proof
    deffunc F(Nat) = L.1 + ((R/*(h^\n))(#)(h^\n)").$1;
    consider s1 such that
A28: for k being Nat holds s1.k = F(k) from SEQ_1:sch 1;
A29: now
A30:  ((h^\n)")(#)(R/*(h^\n)) is convergent & lim (((h^\n)")(#)(R/*(h^\n)
      )) = 0 by FDIFF_1:def 2;
      let r be Real;
      assume 0 < r;
      then consider m being Nat such that
A31:  for k being Nat st m <= k holds |.(((h^\n)")(#)(R/*(h^\n))).k-0.| < r
          by A30,
SEQ_2:def 7;
      take n1 = m;
      let k be Nat such that
A32:  n1 <= k;
      |.s1.k-L.1.| = |.L.1+((R/*(h^\n))(#)(h^\n)").k-L.1 .| by A28
        .= |.(((h^\n)")(#)(R/*(h^\n))).k-0 .|;
      hence |.s1.k-L.1.| < r by A31,A32;
    end;
    consider s such that
A33: for p1 holds L.p1 = s*p1 by FDIFF_1:def 3;
A34: L.1 = s*1 by A33
      .= s;
    now
      let m;
A35:  (h^\n).m <> 0 by SEQ_1:5;
      thus ((L/*(h^\n) + R/*(h^\n))(#)(h^\n)").m = ((L/*(h^\n) + R/*(h^\n)).m)
      *((h^\n)").m by SEQ_1:8
        .= ((L/*(h^\n)).m + (R/*(h^\n)).m) * ((h^\n)").m by SEQ_1:7
        .= ((L/*(h^\n)).m)*((h^\n)").m + ((R/*(h^\n)).m)*((h^\n)").m
        .= ((L/*(h^\n)).m)*((h^\n)").m + ((R/*(h^\n))(#)(h^\n)").m by SEQ_1:8
        .= ((L/*(h^\n)).m)*((h^\n).m)" + ((R/*(h^\n))(#)(h^\n)").m by
VALUED_1:10
        .= (L.((h^\n).m))*((h^\n).m)" + ((R/*(h^\n))(#)(h^\n)").m by A26,
FUNCT_2:115
        .= (s*((h^\n).m))*((h^\n).m)" + ((R/*(h^\n))(#)(h^\n)").m by A33
        .= s*(((h^\n).m)*((h^\n).m)") + ((R/*(h^\n))(#)(h^\n)").m
        .= s*1 + ((R/*(h^\n))(#)(h^\n)").m by A35,XCMPLX_0:def 7
        .= s1.m by A28,A34;
    end;
    then
A36: (L/*(h^\n) + R/*(h^\n))(#)(h^\n)" = s1 by FUNCT_2:63;
    hence (L/*(h^\n)+R/*(h^\n))(#)(h^\n)" is convergent by A29,SEQ_2:def 6;
    hence thesis by A36,A29,SEQ_2:def 7;
  end;
A37: rng ((h+c)^\n) c= dom SVF1(1,f,z0)
  by A22,A7,A2;
A38: rng (h+c) c= dom SVF1(1,f,z0)
  by A11,A2;
A39: for k holds SVF1(1,f,z0).(((h+c)^\n).k) - SVF1(1,f,z0).((c^\n).k) = L.(
  (h^\n).k) + R.((h^\n).k)
  proof
    let k;
    ((h+c)^\n).k in rng ((h+c)^\n) by VALUED_0:28;
    then
A40: ((h+c)^\n).k in N2 by A22;
    (c^\n).k in rng (c^\n) & rng (c^\n) = rng c by VALUED_0:26,28;
    then
A41: (c^\n).k = x0 by A10,A6,TARSKI:def 1;
    ((h+c)^\n).k - (c^\n).k = (h^\n + c^\n).k - (c^\n).k by SEQM_3:15
      .= (h^\n).k + (c^\n).k - (c^\n).k by SEQ_1:7
      .= (h^\n).k;
    hence thesis by A23,A8,A40,A41;
  end;
A42: R is total by FDIFF_1:def 2;
  now
    let k;
    thus (SVF1(1,f,z0)/*((h+c)^\n) - SVF1(1,f,z0)/*(c^\n)).k = (SVF1(1,f,z0)/*
    ((h+c)^\n)).k - (SVF1(1,f,z0)/*(c^\n)).k by RFUNCT_2:1
      .= SVF1(1,f,z0).(((h+c)^\n).k) - (SVF1(1,f,z0)/*(c^\n)).k by A37,
FUNCT_2:108
      .= SVF1(1,f,z0).(((h+c)^\n).k) - SVF1(1,f,z0).((c^\n).k) by A24,
FUNCT_2:108
      .= L.((h^\n).k) + R.((h^\n).k) by A39
      .= (L/*(h^\n)).k + R.((h^\n).k) by A26,FUNCT_2:115
      .= (L/*(h^\n)).k + (R/*(h^\n)).k by A42,FUNCT_2:115
      .= (L/*(h^\n) + R/*(h^\n)).k by SEQ_1:7;
  end;
  then
  SVF1(1,f,z0)/*((h+c)^\n) - SVF1(1,f,z0)/*(c^\n) = L/*(h^\n) + R/*(h^\n)
  by FUNCT_2:63;
  then
A43: ((L/*(h^\n)+R/*(h^\n))(#)(h^\n)") = ((((SVF1(1,f,z0)/*(h+c))^\n)-SVF1(1
  ,f,z0)/*(c^\n))(#)(h^\n)") by A38,VALUED_0:27
    .= ((((SVF1(1,f,z0)/*(h+c))^\n)-((SVF1(1,f,z0)/*c)^\n))(#)(h^\n)") by A15,
VALUED_0:27
    .= ((((SVF1(1,f,z0)/*(h+c))-(SVF1(1,f,z0)/*c))^\n)(#)(h^\n)") by SEQM_3:17
    .= ((((SVF1(1,f,z0)/*(h+c))-(SVF1(1,f,z0)/*c))^\n)(#)((h")^\n)) by
SEQM_3:18
    .= ((((SVF1(1,f,z0)/*(h+c))-(SVF1(1,f,z0)/*c))(#) h")^\n) by SEQM_3:19;
  then
A44: L
.1 = lim ((h")(#)((SVF1(1,f,z0)/*(h+c))-(SVF1(1,f,z0)/*c))) by A27,SEQ_4:22;
  thus h"(#)(SVF1(1,f,z0)/*(h+c)-SVF1(1,f,z0)/*c) is convergent by A27,A43,
SEQ_4:21;
  for x st x in N2 holds SVF1(1,f,z0).x - SVF1(1,f,z0).x0 = L.(x-x0) + R.
  (x-x0) by A23,A8;
  hence thesis by A1,A3,A9,A44,Th11;
end;
