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