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 Th45:
  Z c= dom ((id Z)(#)sin) implies (id Z)(#)sin
is_differentiable_on Z & for x st x in Z holds (((id Z)(#)sin)`|Z).x =sin.x+x*
  cos.x
proof
A1: for x st x in Z holds (id Z).x = 1*x+0 by FUNCT_1:18;
  assume
A2: Z c= dom ((id Z)(#)sin);
  then Z c= dom (id Z) /\ dom sin by VALUED_1:def 4;
  then
A3: Z c= dom (id Z) by XBOOLE_1:18;
  then
A4: id Z is_differentiable_on Z by A1,FDIFF_1:23;
A5: sin is_differentiable_on Z by FDIFF_1:26,SIN_COS:68;
  now
    let x;
    assume
A6: x in Z;
    hence
    (((id Z)(#)sin)`|Z).x = (sin.x)*diff((id Z),x) + ((id Z).x)*diff(sin,
    x) by A2,A4,A5,FDIFF_1:21
      .=(sin.x)*((id Z)`|Z).x+ ((id Z).x)*diff(sin,x) by A4,A6,FDIFF_1:def 7
      .=(sin.x)*1+ ((id Z).x)*diff(sin,x) by A3,A1,A6,FDIFF_1:23
      .=(sin.x)*1+((id Z).x)*(cos.x) by SIN_COS:64
      .=sin.x+ x*cos.x by A6,FUNCT_1:18;
  end;
  hence thesis by A2,A4,A5,FDIFF_1:21;
end;
