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

theorem Th70:
  Z c= dom (-cosec) implies -cosec is_differentiable_on Z & for x
  st x in Z holds ( (-cosec)`|Z).x = cos.x/(sin.x)^2
proof
A1: sin is_differentiable_on Z by FDIFF_1:26,SIN_COS:68;
  assume
A2: Z c= dom (-cosec);
  then
A3: Z c= dom cosec by VALUED_1:8;
  then for x st x in Z holds sin.x<>0 by RFUNCT_1:3;
  then
A4: cosec is_differentiable_on Z by A1,FDIFF_2:22;
A5: for x st x in Z holds ( (-cosec)`|Z).x= cos.x/(sin.x)^2
  proof
    let x;
    assume
A6: x in Z;
    then
A7: sin.x<>0 & sin is_differentiable_in x by A3,A1,FDIFF_1:9,RFUNCT_1:3;
    ((-cosec)`|Z).x = (-1)*diff(sin^,x) by A2,A4,A6,FDIFF_1:20
      .= (-1)*(- diff(sin,x)/(sin.x)^2) by A7,FDIFF_2:15
      .= cos.x/(sin.x)^2 by SIN_COS:64;
    hence thesis;
  end;
  (-1)(#)cosec is_differentiable_on Z by A2,A4,FDIFF_1:20;
  hence thesis by A5;
end;
