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