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

theorem Th39:
  Z c= dom (sin-cos) implies sin-cos is_differentiable_on Z & for
  x st x in Z holds ((sin-cos)`|Z).x =cos.x+sin.x
proof
A1: sin is_differentiable_on Z & cos is_differentiable_on Z by FDIFF_1:26
,SIN_COS:67,68;
  assume
A2: Z c= dom (sin-cos);
  now
    let x;
    assume x in Z;
    hence ((sin-cos)`|Z).x =diff(sin,x) - diff(cos,x) by A2,A1,FDIFF_1:19
      .=cos.x -diff(cos,x) by SIN_COS:64
      .=cos.x -(-sin.x) by SIN_COS:63
      .=cos.x+sin.x;
  end;
  hence thesis by A2,A1,FDIFF_1:19;
end;
