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

theorem
  Z c= dom ((-1/2)(#)(cos*f)) & (for x st x in Z holds f.x=2*x) implies
(-1/2)(#)(cos*f) is_differentiable_on Z & for x st x in Z holds (((-1/2)(#)(cos
  *f))`|Z).x =sin(2*x)
proof
  assume that
A1: Z c= dom ((-1/2)(#)(cos*f)) and
A2: for x st x in Z holds f.x=2*x;
A3: Z c= dom (cos*f) & for x st x in Z holds f.x=2*x+0 by A1,A2,VALUED_1:def 5;
  then
A4: cos*f is_differentiable_on Z by FDIFF_4:38;
  for x st x in Z holds (((-1/2)(#)(cos*f))`|Z).x =sin(2*x)
  proof
    let x;
    assume
A5: x in Z;
    then (((-1/2)(#)(cos*f))`|Z).x =(-1/2)*diff((cos*f),x) by A1,A4,FDIFF_1:20
      .=(-1/2)*((cos*f)`|Z).x by A4,A5,FDIFF_1:def 7
      .=(-1/2)*(-2* sin.(2*x+0)) by A3,A5,FDIFF_4:38
      .=sin(2*x) by SIN_COS:def 17;
    hence thesis;
  end;
  hence thesis by A1,A4,FDIFF_1:20;
end;
