reserve x for Real,

  n for Element of NAT,
   y for set,
  Z for open Subset of REAL,

     g for PartFunc of REAL,REAL;

theorem
  Z c= dom ((1/n)(#)(( #Z n)*(arccot^))) & Z c= ].-1,1.[ & n>0 implies (
1/n)(#)(( #Z n)*(arccot^)) is_differentiable_on Z & for x st x in Z holds (((1/
  n)(#)(( #Z n)*(arccot^)))`|Z).x = 1/(((arccot.x) #Z (n+1))*(1+x^2))
proof
  assume that
A1: Z c= dom ((1/n)(#)(( #Z n)*(arccot^))) and
A2: Z c= ].-1,1.[ and
A3: n>0;
A4: Z c= dom (( #Z n)*(arccot^)) by A1,VALUED_1:def 5;
A5: for x st x in Z holds arccot.x<>0
  proof
    PI in ].0,4.[ by SIN_COS:def 28;
    then PI > 0 by XXREAL_1:4;
    then
A6: PI/4 > 0/4 by XREAL_1:74;
    let x;
    assume
A7: x in Z;
    assume
A8: arccot.x=0;
    ].-1,1.[ c= [.-1,1.] by XXREAL_1:25;
    then Z c= [.-1,1.] by A2,XBOOLE_1:1;
    then x in [.-1,1.] by A7;
    then 0 in arccot.:[.-1,1.] by A8,FUNCT_1:def 6,SIN_COS9:24;
    then 0 in [.PI/4,3/4*PI.] by RELAT_1:115,SIN_COS9:56;
    hence contradiction by A6,XXREAL_1:1;
  end;
A9: arccot^ is_differentiable_on Z by A2,Th68;
  for x st x in Z holds ( #Z n)*(arccot^) is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then arccot^ is_differentiable_in x by A9,FDIFF_1:9;
    hence thesis by TAYLOR_1:3;
  end;
  then
A10: ( #Z n)*(arccot^) is_differentiable_on Z by A4,FDIFF_1:9;
  for y being object st y in Z holds y in dom (arccot^) by A4,FUNCT_1:11;
  then
A11: Z c= dom (arccot^) by TARSKI:def 3;
  for x st x in Z holds (((1/n)(#)(( #Z n)*(arccot^)))`|Z).x = 1/(((
  arccot.x) #Z (n+1))*(1+x^2))
  proof
    let x;
    assume
A12: x in Z;
    then
A13: arccot^ is_differentiable_in x by A9,FDIFF_1:9;
A14: (arccot^).x = 1/arccot.x by A11,A12,RFUNCT_1:def 2;
    (((1/n)(#)(( #Z n)*(arccot^)))`|Z).x = (1/n)*diff((( #Z n)*(arccot^))
    ,x) by A1,A10,A12,FDIFF_1:20
      .= (1/n)*(n*(((arccot^).x) #Z (n-1))*diff(arccot^,x)) by A13,TAYLOR_1:3
      .= (1/n)*(n*(((arccot^).x) #Z (n-1))*((arccot^)`|Z).x) by A9,A12,
FDIFF_1:def 7
      .= (1/n)*(n*(((arccot^).x) #Z (n-1))*(1/((arccot.x)^2*(1+x^2)))) by A2
,A12,Th68
      .= ((1/n)*n)*(((arccot^).x) #Z (n-1))*(1/((arccot.x)^2*(1+x^2)))
      .= 1*(((arccot^).x) #Z (n-1))*(1/((arccot.x)^2*(1+x^2))) by A3,
XCMPLX_1:106
      .= ((1/arccot.x) #Z (n-1))*(1/(((arccot.x) #Z 2)*(1+x^2))) by A14,
FDIFF_7:1
      .= (1/((arccot.x) #Z (n-1)))/(((arccot.x) #Z 2)*(1+x^2)) by PREPOWER:42
      .= 1/(((arccot.x) #Z (n-1))*(((arccot.x) #Z 2)*(1+x^2))) by XCMPLX_1:78
      .= 1/(((arccot.x) #Z (n-1))*((arccot.x) #Z 2)*(1+x^2))
      .= 1/(((arccot.x) #Z ((n-1)+2))*(1+x^2)) by A5,A12,PREPOWER:44
      .= 1/(((arccot.x) #Z (n+1))*(1+x^2));
    hence thesis;
  end;
  hence thesis by A1,A10,FDIFF_1:20;
end;
