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 ((-1/r)(#)(arccot*f)-id Z) & (for x st x in Z holds f.x=r*x &
  r<>0 & f.x > -1 & f.x < 1) implies (-1/r)(#)(arccot*f)-id Z
is_differentiable_on Z & for x st x in Z holds (((-1/r)(#)(arccot*f)-id Z)`|Z).
  x = -(r*x)^2/(1+(r*x)^2)
proof
  assume that
A1: Z c= dom ((-1/r)(#)(arccot*f)-id Z) and
A2: for x st x in Z holds f.x=r*x & r<>0 & f.x > -1 & f.x < 1;
A3: for x st x in Z holds f.x=r*x+0 & f.x > -1 & f.x < 1 by A2;
  set g = (-1/r)(#)(arccot*f);
A4: for x st x in Z holds (id Z).x = 1*x+0 by FUNCT_1:18;
A5: Z c= dom ((-1/r)(#)(arccot*f)) /\ dom (id Z) by A1,VALUED_1:12;
  then
A6: Z c= dom ((-1/r)(#)(arccot*f)) by XBOOLE_1:18;
A7: Z c= dom (id Z) by A5,XBOOLE_1:18;
  then
A8: id Z is_differentiable_on Z by A4,FDIFF_1:23;
A9: Z c= dom (arccot*f) by A6,VALUED_1:def 5;
  then
A10: arccot*f is_differentiable_on Z by A3,Th88;
  then
A11: (-1/r)(#)(arccot*f) is_differentiable_on Z by A6,FDIFF_1:20;
  for x st x in Z holds (((-1/r)(#)(arccot*f)-id Z)`|Z).x = -(r*x)^2/(1+(
  r*x)^2)
  proof
    let x;
A12: 1+(r*x)^2 > 0 by XREAL_1:34,63;
    assume
A13: x in Z;
    then
A14: r <> 0 by A2;
    ((g-id Z)`|Z).x = diff(g,x)-diff(id Z,x) by A1,A11,A8,A13,FDIFF_1:19
      .= (g`|Z).x-diff(id Z,x) by A11,A13,FDIFF_1:def 7
      .= (-1/r)*diff(arccot*f,x)-diff(id Z,x) by A6,A10,A13,FDIFF_1:20
      .= (-1/r)*((arccot*f)`|Z).x-diff(id Z,x) by A10,A13,FDIFF_1:def 7
      .= (-1/r)*((arccot*f)`|Z).x-((id Z)`|Z).x by A8,A13,FDIFF_1:def 7
      .= (-1/r)*(-r/(1+(r*x+0)^2))-((id Z)`|Z).x by A3,A9,A13,Th88
      .= ((-1)/r)*((-r)/(1+(r*x)^2))-1 by A7,A4,A13,FDIFF_1:23
      .= ((-1)*(-r))/(r*(1+(r*x)^2))-1 by XCMPLX_1:76
      .= (1*r)/(r*(1+(r*x)^2))-1
      .= 1/(1+(r*x)^2)-1 by A14,XCMPLX_1:91
      .= 1/(1+(r*x)^2)-(1+(r*x)^2)/(1+(r*x)^2) by A12,XCMPLX_1:60
      .= -(r*x)^2/(1+(r*x)^2);
    hence thesis;
  end;
  hence thesis by A1,A11,A8,FDIFF_1:19;
end;
