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= ].-1,1.[ implies r(#)arccot is_differentiable_on Z & for x st x
  in Z holds ((r(#)arccot)`|Z).x = -r/(1+x^2)
proof
  assume
A1: Z c= ].-1,1.[;
  ].-1,1.[ c= [.-1,1.] by XXREAL_1:25;
  then ].-1,1.[ c= dom arccot by Th24;
  then Z c= dom arccot by A1;
  then
A2: Z c= dom (r(#)arccot) by VALUED_1:def 5;
A3: arccot is_differentiable_on Z by A1,Th82;
  for x st x in Z holds ((r(#)arccot)`|Z).x = -r/(1+x^2)
  proof
    let x;
    assume
A4: x in Z;
    then
A5: -1 < x by A1,XXREAL_1:4;
A6: x < 1 by A1,A4,XXREAL_1:4;
    ((r(#)arccot)`|Z).x = r*diff(arccot,x) by A2,A3,A4,FDIFF_1:20
      .= r*(-1/(1+x^2)) by A5,A6,Th76
      .= -r/(1+x^2);
    hence thesis;
  end;
  hence thesis by A2,A3,FDIFF_1:20;
end;
