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

theorem
  Z c= dom (id Z - (a+b)(#)f) & f = ln*f1 & (for x st x in Z holds f1.x=
x+b & f1.x>0) implies (id Z - (a+b)(#)f) is_differentiable_on Z & for x st x in
  Z holds ((id Z -(a+b)(#)f)`|Z).x = (x-a)/(x+b)
proof
  assume that
A1: Z c= dom (id Z - (a+b)(#)f) and
A2: f = ln*f1 and
A3: for x st x in Z holds f1.x=x+b & f1.x>0;
A4: for x st x in Z holds f1.x=b+x & f1.x>0 by A3;
A5: Z c= dom id Z /\ dom ((a+b)(#)f) by A1,VALUED_1:12;
  then
A6: Z c= dom ((a+b)(#)f) by XBOOLE_1:18;
  then
A7: Z c= dom (ln*f1) by A2,VALUED_1:def 5;
  then
A8: f is_differentiable_on Z by A2,A4,Th1;
  then
A9: (a+b)(#)f is_differentiable_on Z by A6,FDIFF_1:20;
A10: for x st x in Z holds (id Z).x = 1*x+0 by FUNCT_1:18;
A11: Z c= dom id Z by A5,XBOOLE_1:18;
  then
A12: id Z is_differentiable_on Z by A10,FDIFF_1:23;
A13: for x st x in Z holds (((a+b)(#)f)`|Z).x =(a+b)/(x+b)
  proof
    let x;
    assume
A14: x in Z;
    hence (((a+b)(#)f)`|Z).x=(a+b)*diff(f,x) by A6,A8,FDIFF_1:20
      .=(a+b)*(f`|Z).x by A8,A14,FDIFF_1:def 7
      .=(a+b)*(1/(x+b)) by A2,A7,A4,A14,Th1
      .=(a+b)/(x+b) by XCMPLX_1:99;
  end;
  for x st x in Z holds ((id Z - (a+b)(#)f)`|Z).x = (x-a)/(x+b)
  proof
    let x;
    assume
A15: x in Z;
    then
A16: f1.x=x+b & f1.x>0 by A3;
    ((id Z - (a+b)(#)f)`|Z).x = diff(id Z,x) - diff((a+b)(#)f,x) by A1,A12,A9
,A15,FDIFF_1:19
      .=((id Z)`|Z).x - diff((a+b)(#)f,x) by A12,A15,FDIFF_1:def 7
      .=((id Z)`|Z).x - (((a+b)(#)f)`|Z).x by A9,A15,FDIFF_1:def 7
      .=1 - (((a+b)(#)f)`|Z).x by A11,A10,A15,FDIFF_1:23
      .=1 - (a+b)/(x+b) by A13,A15
      .=(1*(x+b) - (a+b))/(x+b) by A16,XCMPLX_1:127
      .=(x-a)/(x+b);
    hence thesis;
  end;
  hence thesis by A1,A12,A9,FDIFF_1:19;
end;
