 reserve a,x for Real;
 reserve n for Element of NAT;
 reserve A for non empty closed_interval Subset of REAL;
 reserve f,h,f1,f2 for PartFunc of REAL,REAL;
 reserve Z for open Subset of REAL;

theorem Th54:
  Z c= dom ((id Z)^(#)arctan) & Z c= ]. -1,1 .[
  implies (-(id Z)^(#)arctan) is_differentiable_on Z &
  for x st x in Z holds
  ((-(id Z)^(#)arctan)`|Z).x = arctan.x/(x^2)-1/(x*(1+x^2))
proof
  set f = id Z;
  assume that
A1:Z c= dom (f^(#)arctan) and
A2: Z c= ]. -1,1 .[;
A3:Z c= dom (-f^(#)arctan) by A1,VALUED_1:8;
A4:for x st x in Z holds f.x=x by FUNCT_1:18;
    Z c= dom (f^) /\ dom arctan by A1,VALUED_1:def 4;then
A5: Z c= dom (f^) by XBOOLE_1:18;
A6:not 0 in Z
   proof
     assume A7: 0 in Z;
     dom ((id Z)^) = dom id Z \ (id Z)"{0} by RFUNCT_1:def 2
       .= dom id Z \ {0} by Lm1,A7; then
     not 0 in {0} by A7,A5,XBOOLE_0:def 5;
     hence thesis by TARSKI:def 1;
   end; then
A8:f^ is_differentiable_on Z & for x st x in Z holds
    ((f^)`|Z).x = -1/x^2 by FDIFF_5:4;
A9:arctan is_differentiable_on Z by A2,SIN_COS9:81;
A10:(f^(#)arctan) is_differentiable_on Z by A1,A2,A6,SIN_COS9:129;
then A11:(-1)(#)(f^(#)arctan) is_differentiable_on Z by A3,FDIFF_1:20;
  for x st x in Z holds ((-f^(#)arctan)`|Z).x = arctan.x/(x^2)-1/(x*(1+x^2))
    proof
      let x;
      assume
A12: x in Z;
then A13:(f^(#)arctan) is_differentiable_in x by A10,FDIFF_1:9;
A14:f^ is_differentiable_in x by A8,A12,FDIFF_1:9;
A15:arctan is_differentiable_in x by A9,A12,FDIFF_1:9;
 ((-f^(#)arctan)`|Z).x=diff(-f^(#)arctan,x) by A11,A12,FDIFF_1:def 7
          .=(-1)*(diff(f^(#)arctan,x)) by A13,FDIFF_1:15
          .=(-1)*((arctan.x)*diff(f^,x)+((f^).x)*diff(arctan,x))
      by A14,A15,FDIFF_1:16
          .=(-1)*((arctan.x)*((f^)`|Z).x+((f^).x)*diff(arctan,x))
      by A8,A12,FDIFF_1:def 7
          .=(-1)*((arctan.x)*(-1/x^2)+((f^).x)*diff(arctan,x))
      by A6,A12,FDIFF_5:4
          .=(-1)*(-(arctan.x)*(1/x^2)+((f^).x)*((arctan)`|Z).x)
      by A9,A12,FDIFF_1:def 7
          .=(-1)*(-((arctan.x)*1)/(x^2)+((f^).x)*(1/(1+x^2)))
      by A2,A12,SIN_COS9:81
          .=(-1)*(-arctan.x/(x^2)+(f.x)"*(1/(1+x^2)))
      by A5,A12,RFUNCT_1:def 2
          .=(-1)*(-arctan.x/(x^2)+(1/x)*(1/(1+x^2))) by A4,A12
          .=(-1)*(-arctan.x/(x^2)+(1*1)/(x*(1+x^2))) by XCMPLX_1:76
          .=arctan.x/(x^2)-1/(x*(1+x^2));
    hence thesis;
    end;
    hence thesis by A3,A10,FDIFF_1:20;
end;
