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 (cot*arccot) & Z c= ].-1,1.[ implies cot*arccot
is_differentiable_on Z & for x st x in Z holds ((cot*arccot)`|Z).x = 1/((sin.(
  arccot.x))^2*(1+x^2))
proof
  assume that
A1: Z c= dom (cot*arccot) and
A2: Z c= ].-1,1.[;
A3: for x st x in Z holds cot*arccot is_differentiable_in x
  proof
    let x;
    assume
A4: x in Z;
    then arccot.x in dom cot by A1,FUNCT_1:11;
    then sin.(arccot.x) <> 0 by FDIFF_8:2;
    then
A5: cot is_differentiable_in arccot.x by FDIFF_7:47;
    arccot is_differentiable_on Z by A2,SIN_COS9:82;
    then arccot is_differentiable_in x by A4,FDIFF_1:9;
    hence thesis by A5,FDIFF_2:13;
  end;
  then
A6: cot*arccot is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((cot*arccot)`|Z).x = 1/((sin.(arccot.x))^2*(1+x ^2))
  proof
    let x;
    assume
A7: x in Z;
    then arccot.x in dom cot by A1,FUNCT_1:11;
    then
A8: sin.(arccot.x) <> 0 by FDIFF_8:2;
    then
A9: cot is_differentiable_in arccot.x by FDIFF_7:47;
A10: arccot is_differentiable_on Z by A2,SIN_COS9:82;
    then
A11: arccot is_differentiable_in x by A7,FDIFF_1:9;
    ((cot*arccot)`|Z).x = diff(cot*arccot,x) by A6,A7,FDIFF_1:def 7
      .= diff(cot,arccot.x)*diff(arccot,x) by A11,A9,FDIFF_2:13
      .= (-1/(sin.(arccot.x))^2)*diff(arccot,x) by A8,FDIFF_7:47
      .= -(1/(sin.(arccot.x))^2)*diff(arccot,x)
      .= -(1/(sin.(arccot.x))^2)*((arccot)`|Z).x by A7,A10,FDIFF_1:def 7
      .= -(1/(sin.(arccot.x))^2)*(-1/(1+x^2)) by A2,A7,SIN_COS9:82
      .= (1/(sin.(arccot.x))^2)*(1/(1+x^2))
      .= 1/((sin.(arccot.x))^2*(1+x^2)) by XCMPLX_1:102;
    hence thesis;
  end;
  hence thesis by A1,A3,FDIFF_1:9;
end;
