 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 Th34:
  Z c= dom (tan*((id Z)^)) implies (-tan*((id Z)^)) is_differentiable_on Z &
  for x st x in Z holds ((-tan*((id Z)^))`|Z).x = 1/(x^2*(cos.(1/x))^2)
proof
  set f = id Z;
  assume
A1:Z c= dom (tan*((id Z)^));
 dom (tan*(f^)) c= dom (f^) by RELAT_1:25; then
A2:Z c= dom (f^) by A1;
A3:not 0 in Z
   proof
     assume A4: 0 in Z;
     dom ((id Z)^) = dom id Z \ (id Z)"{0} by RFUNCT_1:def 2
       .= dom id Z \ {0} by Lm1,A4; then
     not 0 in {0} by A4,A2,XBOOLE_0:def 5;
     hence thesis by TARSKI:def 1;
   end;
A5:Z c= dom (-tan*((id Z)^)) by A1,VALUED_1:8;
A6:(tan*((id Z)^)) is_differentiable_on Z by A1,A3,FDIFF_8:8; then
A7:(-1)(#)(tan*((id Z)^)) is_differentiable_on Z by A5,FDIFF_1:20;
A8:f^ is_differentiable_on Z &
  for x st x in Z holds ((f^)`|Z).x = -1/x^2 by A3,FDIFF_5:4;
A9: for x st x in Z holds (cos.((f^).x))<>0
  proof
    let x;
    assume x in Z;
    then f^.x in dom (sin/cos) by A1,FUNCT_1:11;
    hence thesis by FDIFF_8:1;
  end;
 for x st x in Z holds ((-tan*(f^))`|Z).x = 1/(x^2*(cos.(1/x))^2)
  proof
    let x;
    assume
A10: x in Z; then
A11: f^ is_differentiable_in x by A8,FDIFF_1:9;
A12: cos.((f^).x)<>0 by A9,A10;then
A13:tan is_differentiable_in (f^).x by FDIFF_7:46;
A14:tan*(f^) is_differentiable_in x by A6,A10,FDIFF_1:9;
  ((-tan*(f^))`|Z).x=diff(-tan*(f^),x) by A7,A10,FDIFF_1:def 7
                   .=(-1)*(diff(tan*(f^),x)) by A14,FDIFF_1:15
                   .=(-1)*(diff(tan,(f^).x)*diff((f^),x))
by A11,A13,FDIFF_2:13
                   .=(-1)*((1/(cos.((f^).x))^2) * diff((f^),x))
by A12,FDIFF_7:46
                   .=(-1)*(diff((f^),x)/(cos.((f.x)"))^2)
by A2,A10,RFUNCT_1:def 2
                   .=(-1)*(diff((f^),x)/(cos.(1*x"))^2) by A10,FUNCT_1:18
                   .=(-1)*(((f^)`|Z).x/(cos.(1*x"))^2)
by A8,A10,FDIFF_1:def 7
                   .=(-1)*((-1/x^2)/(cos.(1*x"))^2) by A10,A3,FDIFF_5:4
                   .=(-1)*((-1)/x^2/(cos.(1/x))^2)
                   .=(-1)*((-1)/(x^2*(cos.(1/x))^2)) by XCMPLX_1:78
                   .=1/(x^2*(cos.(1/x))^2);
    hence thesis;
  end;
  hence thesis by A7;
end;
