reserve x,r,a,x0,p for Real;
reserve n,i,m for Element of NAT;
reserve Z for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;
reserve k for Nat;

theorem
  x in Z implies (diff(a(#) #Z n,Z).n).x = a*(n!)
proof
  assume
A1: x in Z;
   reconsider xx=x as Element of REAL by XREAL_0:def 1;
  per cases;
  suppose
    n>0;
    then 0<0+n;
    then 1<=n by NAT_1:19;
    then reconsider m=n-1 as Element of NAT by INT_1:5;
A2: dom(a(#)diff( #Z n,Z).n) = dom(diff( #Z n,Z).n) by VALUED_1:def 5;
    #Z n is_differentiable_on n, Z by Th38;
    then
A3: (diff( #Z n,Z).m) is_differentiable_on Z;
A4: dom(diff( #Z n,Z).n) = dom(diff( #Z n,Z).(m+1))
      .= dom( (diff( #Z n,Z).m)`| Z) by TAYLOR_1:def 5
      .=Z by A3,FDIFF_1:def 7;
    (diff(a(#) #Z n,Z).n).x = (a(#)diff( #Z n,Z).n).x by Th21,Th38
      .=a*(diff( #Z n,Z).n).x by A1,A4,A2,VALUED_1:def 5
      .=a*(n!) by A1,Th37;
    hence thesis;
  end;
  suppose
A5: n=0;
    dom( #Z 0)=REAL by FUNCT_2:def 1;
    then
A6: dom(a(#) #Z 0)=REAL by VALUED_1:def 5;
    (diff(a(#) #Z n,Z).n).x =(a(#)diff( #Z 0,Z).0).x by A5,Th21,Th38
      .=(a(#) #Z 0|Z).x by TAYLOR_1:def 5
      .=((a(#) #Z 0)|Z).x by RFUNCT_1:49
      .=(a(#) #Z 0).x by A1,FUNCT_1:49
      .=a*( #Z 0).xx by A6,VALUED_1:def 5
      .=a*x #Z 0 by TAYLOR_1:def 1
      .=a*(n!) by A5,NEWTON:12,PREPOWER:34;
    hence thesis;
  end;
end;
