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 (f1(#)(exp_R*f2)) & (for x st x in Z holds f1.x=-x-1 & f2.x=-
x) implies f1(#)(exp_R*f2) is_differentiable_on Z & for x st x in Z holds ((f1
  (#)(exp_R*f2))`|Z).x = x/exp_R(x)
proof
  assume that
A1: Z c= dom (f1(#)(exp_R*f2)) and
A2: for x st x in Z holds f1.x=-x-1 & f2.x=-x;
A3: Z c= dom f1 /\ dom (exp_R*f2) by A1,VALUED_1:def 4;
  then
A4: Z c= dom f1 by XBOOLE_1:18;
A5: Z c= dom (exp_R*f2) by A3,XBOOLE_1:18;
A6: for x st x in Z holds f1.x=(-1)*x+-1
  proof
    let x;
    assume x in Z;
    then f1.x=-x-1 by A2
      .=(-1)*x+-1;
    hence thesis;
  end;
  then
A7: f1 is_differentiable_on Z by A4,FDIFF_1:23;
A8: for x st x in Z holds f2.x=-x by A2;
  then
A9: exp_R*f2 is_differentiable_on Z by A5,Th14;
  for x st x in Z holds ((f1(#)(exp_R*f2))`|Z).x = x/exp_R(x)
  proof
    let x;
    assume
A10: x in Z;
    then
A11: (exp_R*f2).x=exp_R.(f2.x) by A5,FUNCT_1:12
      .=exp_R.(-x) by A2,A10
      .=exp_R(-x) by SIN_COS:def 23;
    ((f1(#)(exp_R*f2))`|Z).x =((exp_R*f2).x)*diff(f1,x) + (f1.x)*diff(
    exp_R*f2,x) by A1,A7,A9,A10,FDIFF_1:21
      .=exp_R(-x)*diff(f1,x) + (-x-1)*diff(exp_R*f2,x) by A2,A10,A11
      .=exp_R(-x)*(f1`|Z).x + (-x-1)*diff(exp_R*f2,x) by A7,A10,FDIFF_1:def 7
      .=exp_R(-x)*(f1`|Z).x + (-x-1)*((exp_R*f2)`|Z).x by A9,A10,FDIFF_1:def 7
      .=exp_R(-x)*(-1) + (-x-1)*((exp_R*f2)`|Z).x by A4,A6,A10,FDIFF_1:23
      .=exp_R(-x)*(-1) + (-x-1)*(-exp_R(-x)) by A8,A5,A10,Th14
      .=x*exp_R(-x)
      .=x*(1/exp_R(x)) by TAYLOR_1:4
      .=x/exp_R(x) by XCMPLX_1:99;
    hence thesis;
  end;
  hence thesis by A1,A7,A9,FDIFF_1:21;
end;
