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/2)(#)(ln*f)) & f=(( #Z 2)*exp_R)+f1 & (for x st x in Z
  holds f1.x=1) implies (1/2)(#)(ln*f) is_differentiable_on Z & for x st x in Z
  holds (((1/2)(#)(ln*f))`|Z).x =exp_R(x)/(exp_R(x)+exp_R(-x))
proof
  assume that
A1: Z c= dom ((1/2)(#)(ln*f)) and
A2: f=(( #Z 2)*exp_R)+f1 and
A3: for x st x in Z holds f1.x=1;
A4: Z c= dom (ln*f) by A1,VALUED_1:def 5;
  then for y being object st y in Z holds y in dom f by FUNCT_1:11;
  then
A5: Z c= dom ((( #Z 2)*exp_R)+f1) by A2,TARSKI:def 3;
  then
A6: (( #Z 2)*exp_R)+f1 is_differentiable_on Z by A3,Th23;
  Z c= dom (( #Z 2)*exp_R) /\ dom f1 by A5,VALUED_1:def 1;
  then
A7: Z c= dom (( #Z 2)*exp_R) by XBOOLE_1:18;
A8: for x st x in Z holds f.x >0
  proof
    let x;
A9: (exp_R.x) #Z 2>0 by PREPOWER:39,SIN_COS:54;
    assume
A10: x in Z;
    then ((( #Z 2)*exp_R)+f1).x =(( #Z 2)*exp_R).x+f1.x by A5,VALUED_1:def 1
      .=( #Z 2).(exp_R.x)+f1.x by A7,A10,FUNCT_1:12
      .=(exp_R.x) #Z 2+f1.x by TAYLOR_1:def 1
      .=(exp_R.x) #Z 2+1 by A3,A10;
    hence thesis by A2,A9;
  end;
  for x st x in Z holds ln*f is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then f is_differentiable_in x & f.x >0 by A2,A6,A8,FDIFF_1:9;
    hence thesis by TAYLOR_1:20;
  end;
  then
A11: ln*f is_differentiable_on Z by A4,FDIFF_1:9;
  for x st x in Z holds (((1/2)(#)(ln*f))`|Z).x =exp_R(x)/(exp_R(x)+exp_R (-x))
  proof
    let x;
A12: exp_R(x)>0 by SIN_COS:55;
    assume
A13: x in Z;
    then
A14: f is_differentiable_in x & f.x >0 by A2,A6,A8,FDIFF_1:9;
A15: ((( #Z 2)*exp_R)+f1).x =(( #Z 2)*exp_R).x+f1.x by A5,A13,VALUED_1:def 1
      .=( #Z 2).(exp_R.x)+f1.x by A7,A13,FUNCT_1:12
      .=(exp_R.x) #Z 2+f1.x by TAYLOR_1:def 1
      .=(exp_R.x) #Z 2+1 by A3,A13
      .=(exp_R(x)) #Z (1+1)+1 by SIN_COS:def 23
      .=(exp_R(x)) #Z 1 * (exp_R(x)) #Z 1 +1 by A12,PREPOWER:44
      .=exp_R(x) * (exp_R(x)) #Z 1 +1 by PREPOWER:35
      .=exp_R(x) * exp_R(x) +1 by PREPOWER:35;
    (((1/2)(#)(ln*f))`|Z).x =(1/2)*diff((ln*f),x) by A1,A11,A13,FDIFF_1:20
      .=(1/2)*(diff(f,x)/f.x) by A14,TAYLOR_1:20
      .=(1/2)*((((( #Z 2)*exp_R)+f1)`|Z).x/((( #Z 2)*exp_R)+f1).x) by A2,A6,A13
,FDIFF_1:def 7
      .=(1/2)*((2*exp_R(2*x))/(exp_R(x) * exp_R(x) +1)) by A3,A5,A13,A15,Th23
      .=(1/2)*(2*exp_R(2*x))/(exp_R(x) * exp_R(x) +1) by XCMPLX_1:74
      .=(exp_R(x+x)/exp_R(x))/((exp_R(x) * exp_R(x)+1)/exp_R(x)) by A12,
XCMPLX_1:55
      .=((exp_R(x)*exp_R(x))/exp_R(x))/((exp_R(x) * exp_R(x)+1)/exp_R(x)) by
SIN_COS:50
      .=(exp_R(x)*exp_R(x)/exp_R(x))/(exp_R(x) * exp_R(x)/exp_R(x)+1/exp_R(x
    )) by XCMPLX_1:62
      .=exp_R(x)/(exp_R(x) * exp_R(x)/exp_R(x)+1/exp_R(x)) by A12,XCMPLX_1:89
      .=exp_R(x)/(exp_R(x)+1/exp_R(x)) by A12,XCMPLX_1:89
      .=exp_R(x)/(exp_R(x)+exp_R(-x)) by TAYLOR_1:4;
    hence thesis;
  end;
  hence thesis by A1,A11,FDIFF_1:20;
end;
