reserve x,x0, r,r1,r2 for Real,
      th for Real,

  rr for set,

  rseq for Real_Sequence;

theorem Th8:
  cosec is_differentiable_on ].0,PI/2.[ & for x st x in ].0,PI/2.[
  holds diff(cosec,x) = -cos.x/(sin.x)^2
proof
  set Z = ].0,PI/2.[;
  ].0,PI/2.] = Z \/ {PI/2} by XXREAL_1:132;
  then Z c= ].0,PI/2.] by XBOOLE_1:7;
  then
A1: Z c= dom cosec by Th4;
  then
A2: cosec is_differentiable_on Z by FDIFF_9:5;
  for x st x in Z holds diff(cosec,x) = -cos.x/(sin.x)^2
  proof
    let x;
    assume
A3: x in Z;
    then diff(cosec,x) = ((cosec)`|Z).x by A2,FDIFF_1:def 7
      .= -cos.x/(sin.x)^2 by A1,A3,FDIFF_9:5;
    hence thesis;
  end;
  hence thesis by A1,FDIFF_9:5;
end;
