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

theorem Th7:
  Z c= dom ((id Z)^(#)sec)
  implies (-(id Z)^(#)sec) is_differentiable_on Z & for x st x in Z holds
  ((-(id Z)^(#)sec)`|Z).x = 1/cos.x/x^2-sin.x/x/(cos.x)^2
proof
  assume
A1:Z c= dom ((id Z)^(#)sec);
then A2:Z c= dom (-(id Z)^(#)sec) by VALUED_1:8;
   Z c= dom ((id Z)^) /\ dom sec by A1,VALUED_1:def 4;then
A3:Z c= dom ((id Z)^) by XBOOLE_1:18;
A4:not 0 in Z
   proof
     assume A5: 0 in Z;
     dom ((id Z)^) = dom id Z \ (id Z)"{0} by RFUNCT_1:def 2
                  .= dom id Z \ {0} by Lm1,A5; then
     not 0 in {0} by A5,A3,XBOOLE_0:def 5;
     hence thesis by TARSKI:def 1;
   end;
then A6:((id Z)^(#)sec) is_differentiable_on Z by A1,FDIFF_9:32;
then A7:(-1)(#)((id Z)^(#)sec) is_differentiable_on Z by A2,FDIFF_1:20;
 for x st x in Z holds ((-(id Z)^(#)sec)`|Z).x = 1/cos.x/x^2-sin.x/x/(cos.x)^2
   proof
     let x;
     assume
A8:  x in Z;
     ((-(id Z)^(#)sec)`|Z).x
   = ((-1)(#)(((id Z)^(#)sec)`|Z)).x by A6,FDIFF_2:19
  .= (-1)*((((id Z)^(#)sec)`|Z).x) by VALUED_1:6
  .= (-1)*(-1/cos.x/x^2+sin.x/x/(cos.x)^2) by A1,A4,A8,FDIFF_9:32
  .= 1/cos.x/x^2-sin.x/x/(cos.x)^2;
     hence thesis;
   end;
   hence thesis by A7;
end;
