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 (arccot*cos) & (for x st x in Z holds cos.x > -1 & cos.x < 1)
implies arccot*cos is_differentiable_on Z & for x st x in Z holds ((arccot*cos)
  `|Z).x = sin.x/(1+(cos.x)^2)
proof
  assume that
A1: Z c= dom (arccot*cos) and
A2: for x st x in Z holds cos.x > -1 & cos.x < 1;
A3: for x st x in Z holds arccot*cos is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then
A4: cos.x > -1 & cos.x < 1 by A2;
    cos is_differentiable_in x by SIN_COS:63;
    hence thesis by A4,SIN_COS9:86;
  end;
  then
A5: arccot*cos is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((arccot*cos)`|Z).x = sin.x/(1+(cos.x)^2)
  proof
    let x;
A6: cos is_differentiable_in x by SIN_COS:63;
    assume
A7: x in Z;
    then
A8: cos.x > -1 & cos.x < 1 by A2;
    ((arccot*cos)`|Z).x = diff(arccot*cos,x) by A5,A7,FDIFF_1:def 7
      .= -diff(cos,x)/(1+(cos.x)^2) by A6,A8,SIN_COS9:86
      .= -(-sin.x)/(1+(cos.x)^2) by SIN_COS:63
      .= sin.x/(1+(cos.x)^2);
    hence thesis;
  end;
  hence thesis by A1,A3,FDIFF_1:9;
end;
