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

theorem
  Z c= dom ((sin*((id Z)^))(#)(cos*((id Z)^))) & not 0 in Z implies (sin
*((id Z)^))(#)(cos*((id Z)^)) is_differentiable_on Z & for x st x in Z holds ((
(sin*((id Z)^))(#)(cos*((id Z)^)))`|Z).x = (1/x^2)*((sin.(1/x))^2-(cos.(1/x))^2
  )
proof
  set f = id Z;
  assume that
A1: Z c= dom ((sin*(f^))(#)(cos*(f^))) and
A2: not 0 in Z;
A3: sin*(f^) is_differentiable_on Z by A2,Th5;
A4: Z c= dom (sin*(f^)) /\ dom (cos*(f^)) by A1,VALUED_1:def 4;
  then
A5: Z c= dom (cos*(f^)) by XBOOLE_1:18;
  then
A6: cos*(f^) is_differentiable_on Z by A2,Th6;
A7: Z c= dom (sin*(f^)) by A4,XBOOLE_1:18;
  then for y being object st y in Z holds y in dom (f^) by FUNCT_1:11;
  then
A8: Z c= dom (f^);
  now
    let x;
    assume
A9: x in Z;
    then (((sin*(f^))(#)(cos*(f^)))`|Z).x = ((cos*(f^)).x)*diff((sin*(f^)),x)
    + ((sin*(f^)).x)*diff(cos*(f^),x) by A1,A6,A3,FDIFF_1:21
      .=((cos*(f^)).x)*((sin*(f^))`|Z).x+ ((sin*(f^)).x)*diff(cos*(f^),x) by A3
,A9,FDIFF_1:def 7
      .=((cos*(f^)).x)*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*diff(cos*(f^),x)
    by A2,A9,Th5
      .=((cos*(f^)).x)*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*(((cos*(f^))`|Z).
    x) by A6,A9,FDIFF_1:def 7
      .=((cos*(f^)).x)*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*((1/x^2)*sin.(1/x
    )) by A2,A5,A9,Th6
      .=(cos.((f^).x))*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*((1/x^2)*sin.(1/x
    )) by A5,A9,FUNCT_1:12
      .=(cos.((f.x)"))*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*((1/x^2)*sin.(1/x
    )) by A8,A9,RFUNCT_1:def 2
      .=(cos.(1*x"))*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*((1/x^2)*sin.(1/x))
    by A9,FUNCT_1:18
      .=cos.(1/x)*(-(1/x^2)*cos.(1/x))+((sin*(f^)).x)*((1/x^2)*sin.(1/x)) by
XCMPLX_0:def 9
      .=cos.(1/x)*(-(1/x^2)*cos.(1/x))+(sin.((f^).x))*((1/x^2)*sin.(1/x)) by A7
,A9,FUNCT_1:12
      .=cos.(1/x)*(-(1/x^2)*cos.(1/x))+(sin.((f.x)"))*((1/x^2)*sin.(1/x)) by A8
,A9,RFUNCT_1:def 2
      .=cos.(1/x)*(-(1/x^2)*cos.(1/x))+(sin.(1*x"))*((1/x^2)*sin.(1/x)) by A9,
FUNCT_1:18
      .=-cos.(1/x)*(1/x^2)*cos.(1/x)+sin.(1/x)*((1/x^2)*sin.(1/x)) by
XCMPLX_0:def 9
      .=(1/x^2)*((sin.(1/x))^2-(cos.(1/x))^2);
    hence
    (((sin*(f^))(#)(cos*(f^)))`|Z).x = (1/x^2)*((sin.(1/x))^2-(cos.(1/x)) ^2);
  end;
  hence thesis by A1,A6,A3,FDIFF_1:21;
end;
