reserve x,x0, r, s, h for Real,

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

  f, f1, f2 for PartFunc of REAL,REAL;

theorem
  Z c= dom (-arccot-id Z) & Z c= ].-1,1.[ implies -arccot-id Z
is_differentiable_on Z & for x st x in Z holds ((-arccot-id Z)`|Z).x = -x^2/(1+
  x^2)
proof
  assume that
A1: Z c= dom (-arccot-id Z) and
A2: Z c= ].-1,1.[;
A3: arccot is_differentiable_on Z by A2,Th82;
A4: Z c= dom (-arccot) /\ dom (id Z) by A1,VALUED_1:12;
  then
A5: Z c= dom (id Z) by XBOOLE_1:18;
A6: for x st x in Z holds (id Z).x = 1*x+0 by FUNCT_1:18;
  then
A7: id Z is_differentiable_on Z by A5,FDIFF_1:23;
A8: Z c= dom ((-1)(#)arccot) by A4,XBOOLE_1:18;
  then
A9: -arccot is_differentiable_on Z by A3,FDIFF_1:20;
  for x st x in Z holds ((-arccot-id Z)`|Z).x = -x^2/(1+x^2)
  proof
    let x;
A10: 1+x^2 > 0 by XREAL_1:34,63;
    assume
A11: x in Z;
    then ((-arccot-id Z)`|Z).x = diff(-arccot,x)-diff(id Z,x) by A1,A7,A9,
FDIFF_1:19
      .= ((-arccot)`|Z).x-diff(id Z,x) by A9,A11,FDIFF_1:def 7
      .= (-1)*diff(arccot,x)-diff(id Z,x) by A8,A3,A11,FDIFF_1:20
      .= (-1)*((arccot)`|Z).x-diff(id Z,x) by A3,A11,FDIFF_1:def 7
      .= (-1)*(-1/(1+x^2))-diff(id Z,x) by A2,A11,Th82
      .= 1/(1+x^2)-((id Z)`|Z).x by A7,A11,FDIFF_1:def 7
      .= 1/(1+x^2)-1 by A5,A6,A11,FDIFF_1:23
      .= 1/(1+x^2)-(1+x^2)/(1+x^2) by A10,XCMPLX_1:60
      .= -x^2/(1+x^2);
    hence thesis;
  end;
  hence thesis by A1,A7,A9,FDIFF_1:19;
end;
