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 Th16:
  Z c= dom -(exp_R*f) & (for x st x in Z holds f.x=-x*log(number_e
,a)) & a>0 implies -(exp_R*f) is_differentiable_on Z & for x st x in Z holds ((
  -(exp_R*f))`|Z).x =a #R (-x)*log(number_e,a)
proof
  assume that
A1: Z c= dom -(exp_R*f) and
A2: for x st x in Z holds f.x=-x*log(number_e,a) and
A3: a>0;
A4: Z c= dom (exp_R*f) by A1,VALUED_1:8;
  then for y being object st y in Z holds y in dom f by FUNCT_1:11;
  then
A5: Z c= dom f by TARSKI:def 3;
A6: for x st x in Z holds f.x = (-log(number_e,a))*x+0
  proof
    let x;
    assume x in Z;
    then f.x=-log(number_e,a)*x by A2
      .=(-log(number_e,a))*x+0;
    hence thesis;
  end;
  then
A7: f is_differentiable_on Z by A5,FDIFF_1:23;
  for x st x in Z holds exp_R*f is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then f is_differentiable_in x by A7,FDIFF_1:9;
    hence thesis by TAYLOR_1:19;
  end;
  then
A8: exp_R*f is_differentiable_on Z by A4,FDIFF_1:9;
A9: for x st x in Z holds ((-(exp_R*f))`|Z).x = a #R (-x)*log(number_e,a)
  proof
    let x;
    assume
A10: x in Z;
    then
A11: f is_differentiable_in x by A7,FDIFF_1:9;
    ((-(exp_R*f))`|Z).x=(-1)*diff(exp_R*f,x) by A1,A8,A10,FDIFF_1:20
      .=(-1)*(exp_R.(f.x)*diff(f,x)) by A11,TAYLOR_1:19
      .=(-1)*(exp_R.(f.x)*(f`|Z).x ) by A7,A10,FDIFF_1:def 7
      .=(-1)*(exp_R.(f.x)*(-log(number_e,a))) by A5,A6,A10,FDIFF_1:23
      .=(-1)*(exp_R.(-x*log(number_e,a))*(-log(number_e,a))) by A2,A10
      .=(-1)*(a #R (-x)*(-log(number_e,a))) by A3,Th2
      .=a #R (-x)*log(number_e,a);
    hence thesis;
  end;
  Z c= dom ((-1)(#)(exp_R*f)) by A1;
  hence thesis by A8,A9,FDIFF_1:20;
end;
