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/log(number_e,a))(#)((-(exp_R*f1))(#)f2)) & (for x st x in
  Z holds f1.x=-x*log(number_e,a) & f2.x=x+1/log(number_e,a)) & a>0 & a<>1
implies (1/log(number_e,a))(#)((-(exp_R*f1))(#)f2) is_differentiable_on Z & for
x st x in Z holds (((1/log(number_e,a))(#)((-(exp_R*f1))(#)f2))`|Z).x =x /a #R
  x
proof
  assume that
A1: Z c= dom ((1/log(number_e,a))(#)((-(exp_R*f1))(#)f2)) and
A2: for x st x in Z holds f1.x=-x*log(number_e,a) & f2.x=x+1/log(
  number_e,a) and
A3: a>0 and
A4: a<>1;
A5: for x st x in Z holds f2.x = 1*x+1/log(number_e,a) by A2;
A6: Z c= dom ((-(exp_R*f1))(#)f2) by A1,VALUED_1:def 5;
  then
A7: Z c= dom (-(exp_R*f1)) /\ dom f2 by VALUED_1:def 4;
  then
A8: Z c= dom (-(exp_R*f1)) by XBOOLE_1:18;
A9: for x st x in Z holds f1.x=-x*log(number_e,a) by A2;
  then
A10: -(exp_R*f1) is_differentiable_on Z by A3,A8,Th16;
A11: Z c= dom f2 by A7,XBOOLE_1:18;
  then
A12: f2 is_differentiable_on Z by A5,FDIFF_1:23;
  then
A13: (-(exp_R*f1))(#)f2 is_differentiable_on Z by A6,A10,FDIFF_1:21;
A14: log(number_e,a)<>0
  proof
A15: number_e<>1 by TAYLOR_1:11;
    assume log(number_e,a)=0;
    then log(number_e,a)=log(number_e,1) by SIN_COS2:13,TAYLOR_1:13;
    then a=(number_e) to_power log(number_e,1) by A3,A15,POWER:def 3
,TAYLOR_1:11
      .=1 by A15,POWER:def 3,TAYLOR_1:11;
    hence contradiction by A4;
  end;
  for x st x in Z holds (((1/log(number_e,a))(#)((-(exp_R*f1))(#)f2))`|Z)
  .x =x /a #R x
  proof
    let x;
    assume
A16: x in Z;
    then x in dom -(exp_R*f1) by A8;
    then
A17: x in dom (exp_R*f1) by VALUED_1:8;
A18: (-(exp_R*f1)).x=-((exp_R*f1).x) by VALUED_1:8
      .=-(exp_R.(f1.x)) by A17,FUNCT_1:12
      .=-(exp_R.(-x*log(number_e,a))) by A2,A16
      .=-a #R (-x) by A3,Th2;
    (((1/log(number_e,a))(#)((-(exp_R*f1))(#)f2))`|Z).x =(1/log(number_e,
    a))*diff((-(exp_R*f1))(#)f2,x) by A1,A13,A16,FDIFF_1:20
      .=(1/log(number_e,a))*(((-(exp_R*f1))(#)f2)`|Z).x by A13,A16,
FDIFF_1:def 7
      .=(1/log(number_e,a))*(f2.x*diff(-(exp_R*f1),x)+ (-(exp_R*f1)).x*diff(
    f2,x)) by A6,A10,A12,A16,FDIFF_1:21
      .=(1/log(number_e,a))*(f2.x*((-(exp_R*f1))`|Z).x+ (-(exp_R*f1)).x*diff
    (f2,x)) by A10,A16,FDIFF_1:def 7
      .=(1/log(number_e,a))*(f2.x*((-(exp_R*f1))`|Z).x+ (-(exp_R*f1)).x*(f2
    `|Z).x) by A12,A16,FDIFF_1:def 7
      .=(1/log(number_e,a))*(f2.x*(a #R (-x)*log(number_e,a)) +(-(exp_R*f1))
    .x*(f2`|Z).x) by A3,A9,A8,A16,Th16
      .=(1/log(number_e,a))*(f2.x*(a #R (-x)*log(number_e,a)) +(-(exp_R*f1))
    .x*1) by A11,A5,A16,FDIFF_1:23
      .=(1/log(number_e,a))*((f2.x*log(number_e,a)-1)*a #R (-x)) by A18
      .=(1/log(number_e,a))*(((x+1/log(number_e,a))* log(number_e,a)-1)*a #R
    (-x)) by A2,A16
      .=(1/log(number_e,a))* (x*log(number_e,a)+1/log(number_e,a)*log(
    number_e,a)-1)*a #R (-x)
      .=(1/log(number_e,a))*(x*log(number_e,a)+1-1)*a #R (-x) by A14,
XCMPLX_1:106
      .=(1/log(number_e,a))*log(number_e,a)*x*a #R (-x)
      .=1*x*a #R (-x) by A14,XCMPLX_1:106
      .=x*(1/a #R x) by A3,PREPOWER:76
      .=x/a #R x by XCMPLX_1:99;
    hence thesis;
  end;
  hence thesis by A1,A13,FDIFF_1:20;
end;
