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 ((1/(a-b))(#)f) & f=ln*(f1/f2) & (for x st x in Z holds f1.x=
  x-a & f1.x >0 & f2.x=x-b & f2.x >0 & a-b<>0) implies (1/(a-b))(#)f
is_differentiable_on Z & for x st x in Z holds (((1/(a-b))(#)f)`|Z).x =1/((x-a)
  *(x-b))
proof
  assume that
A1: Z c= dom ((1/(a-b))(#)f) and
A2: f=ln*(f1/f2) and
A3: for x st x in Z holds f1.x=x-a & f1.x >0 & f2.x=x-b & f2.x >0 & a-b <>0;
A4: ( for x st x in Z holds f1.x=x-a & f1.x >0 & f2.x=x-b & f2.x >0)& Z c=
  dom f by A1,A3,VALUED_1:def 5;
  then
A5: f is_differentiable_on Z by A2,Th24;
  for x st x in Z holds (((1/(a-b))(#)f)`|Z).x =1/((x-a)*(x-b))
  proof
    let x;
    assume
A6: x in Z;
    then
A7: a-b<>0 by A3;
    (((1/(a-b))(#)f)`|Z).x =(1/(a-b))*diff(f,x) by A1,A5,A6,FDIFF_1:20
      .=(1/(a-b))*(f`|Z).x by A5,A6,FDIFF_1:def 7
      .=(1/(a-b))*((a-b)/((x-a)*(x-b))) by A2,A4,A6,Th24
      .=(1/(a-b))*(a-b)/((x-a)*(x-b)) by XCMPLX_1:74
      .=1/((x-a)*(x-b)) by A7,XCMPLX_1:106;
    hence thesis;
  end;
  hence thesis by A1,A5,FDIFF_1:20;
end;
