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
  not 0 in Z & Z c= dom (arctan*((id Z)^)) & (for x st x in Z holds ((id
Z)^).x > -1 & ((id Z)^).x < 1) implies (arctan*((id Z)^)) is_differentiable_on
  Z & for x st x in Z holds ((arctan*((id Z)^))`|Z).x = -1/(1+x^2)
proof
  set f = id Z;
  assume that
A1: not 0 in Z and
A2: Z c= dom (arctan*((id Z)^)) and
A3: for x st x in Z holds ((id Z)^).x > -1 & ((id Z)^).x < 1;
  dom (arctan*(f^)) c= dom (f^) by RELAT_1:25;
  then
A4: Z c= dom(f^) by A2;
A5: f^ is_differentiable_on Z by A1,FDIFF_5:4;
A6: for x st x in Z holds arctan*(f^) is_differentiable_in x
  proof
    let x;
    assume
A7: x in Z;
    then
A8: (f^).x > -1 by A3;
A9: (f^).x < 1 by A3,A7;
    f^ is_differentiable_in x by A5,A7,FDIFF_1:9;
    hence thesis by A8,A9,Th85;
  end;
  then
A10: arctan*(f^) is_differentiable_on Z by A2,FDIFF_1:9;
  for x st x in Z holds ((arctan*(f^))`|Z).x = -1/(1+x^2)
  proof
    let x;
    assume
A11: x in Z;
    then
A12: f^ is_differentiable_in x by A5,FDIFF_1:9;
A13: (f^).x < 1 by A3,A11;
A14: (f^).x > -1 by A3,A11;
    f.x = x by A11,FUNCT_1:18;
    then x <> 0 by A4,A11,RFUNCT_1:3;
    then
A15: x^2 <> 0;
    ((arctan*(f^))`|Z).x = diff((arctan)*(f^),x) by A10,A11,FDIFF_1:def 7
      .= diff((f^),x)/(1+((f^).x)^2) by A12,A14,A13,Th85
      .= ((f^)`|Z).x/(1+((f^).x)^2) by A5,A11,FDIFF_1:def 7
      .= (-1/x^2)/(1+((f^).x)^2) by A1,A11,FDIFF_5:4
      .= (-1/x^2)/(1+((f.x)")^2) by A4,A11,RFUNCT_1:def 2
      .= (-1/x^2)/(1+(1/x)^2) by A11,FUNCT_1:18
      .= -(1/x^2)/(1+(1/x)^2)
      .= -1/((x^2)*(1+(1/x)^2)) by XCMPLX_1:78
      .= -1/((x^2)*1+(x^2)*(1/x)^2)
      .= -1/((x^2)+(x^2)*(1/(x*x))) by XCMPLX_1:102
      .= -1/((x^2)+((x^2)*1)/(x^2))
      .= -1/(1+x^2) by A15,XCMPLX_1:60;
    hence thesis;
  end;
  hence thesis by A2,A6,FDIFF_1:9;
end;
