reserve y for set;
reserve x,a,b,c for Real;
reserve n for Element of NAT;
reserve Z for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom ((1/n)(#)(( #Z n)*sin)) & n>0 implies (1/n)(#)(( #Z n)*sin)
is_differentiable_on Z & for x st x in Z holds (((1/n)(#)(( #Z n)*sin))`|Z).x =
  (sin.x) #Z (n-1) *cos.x
proof
  assume that
A1: Z c= dom ((1/n)(#)(( #Z n)*sin)) and
A2: n>0;
A3: now
    let x;
    assume x in Z;
    sin is_differentiable_in x by SIN_COS:64;
    hence ( #Z n)*sin is_differentiable_in x by TAYLOR_1:3;
  end;
  Z c= dom (( #Z n)*sin) by A1,VALUED_1:def 5;
  then
A4: ( #Z n)*sin is_differentiable_on Z by A3,FDIFF_1:9;
  for x st x in Z holds (((1/n)(#)(( #Z n)*sin))`|Z).x =(sin.x) #Z (n-1) *
  cos.x
  proof
    let x;
A5: sin is_differentiable_in x by SIN_COS:64;
    assume x in Z;
    then
    (((1/n)(#)(( #Z n)*sin))`|Z).x =(1/n)*diff((( #Z n)*sin),x) by A1,A4,
FDIFF_1:20
      .=(1/n)*(n*( (sin.x) #Z (n-1)) * diff(sin,x)) by A5,TAYLOR_1:3
      .=(1/n)*(n*( (sin.x) #Z (n-1)) *cos.x) by SIN_COS:64
      .=((1/n)*n)*( (sin.x) #Z (n-1)) *cos.x
      .=((n")*n)*( (sin.x) #Z (n-1)) *cos.x by XCMPLX_1:215
      .=1*( (sin.x) #Z (n-1)) *cos.x by A2,XCMPLX_0:def 7
      .=(sin.x) #Z (n-1) *cos.x;
    hence thesis;
  end;
  hence thesis by A1,A4,FDIFF_1:20;
end;
