reserve y for set;
reserve x,a,b,c for Real;
reserve n for Element of NAT;
reserve Z for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem
  (for x st x in Z holds cos.x<>0) implies cos^ is_differentiable_on Z &
  for x st x in Z holds ( (cos^)`|Z).x= sin.x/(cos.x)^2
proof
  assume
A1: for x st x in Z holds cos.x<>0;
A2: cos is_differentiable_on Z by FDIFF_1:26,SIN_COS:67;
  then
A3: cos^ is_differentiable_on Z by A1,FDIFF_2:22;
  for x st x in Z holds ( (cos^)`|Z).x= sin.x/(cos.x)^2
  proof
    let x;
A4: cos is_differentiable_in x by SIN_COS:63;
    assume
A5: x in Z;
    then
A6: cos.x<>0 by A1;
    ( (cos^)`|Z).x= diff(cos^,x) by A3,A5,FDIFF_1:def 7
      .= - diff(cos,x)/(cos.x)^2 by A6,A4,FDIFF_2:15
      .=- (-sin.x)/(cos.x)^2 by SIN_COS:63
      .=- -(sin.x/(cos.x)^2) by XCMPLX_1:187
      .=sin.x/(cos.x)^2;
    hence thesis;
  end;
  hence thesis by A1,A2,FDIFF_2:22;
end;
