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