reserve x for Real,

  Z for open Subset of REAL;

theorem
  sin*sin is_differentiable_on Z & for x st x in Z holds((sin*sin)`|Z).x
  = cos.(sin.x)*cos.x
proof
A1: for x st x in Z holds sin*sin is_differentiable_in x
  proof
    let x;
    assume x in Z;
A2: sin is_differentiable_in sin.x by SIN_COS:64;
    sin is_differentiable_in x by SIN_COS:64;
    hence thesis by A2,FDIFF_2:13;
  end;
  rng sin c= REAL;
  then
A3: dom (sin*sin) = REAL by RELAT_1:27,SIN_COS:24;
  then
A4: sin*sin is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds((sin*sin)`|Z).x = cos.(sin.x)*cos.x
  proof
    let x;
    assume
A5: x in Z;
A6: sin is_differentiable_in sin.x by SIN_COS:64;
    sin is_differentiable_in x by SIN_COS:64;
    then diff(sin*sin,x) = diff(sin,sin.x)*diff(sin,x) by A6,FDIFF_2:13
      .=cos.(sin.x)*diff(sin,x) by SIN_COS:64
      .=cos.(sin.x)*cos.x by SIN_COS:64;
    hence thesis by A4,A5,FDIFF_1:def 7;
  end;
  hence thesis by A3,A1,FDIFF_1:9;
end;
