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

theorem
  Z c= dom (((id Z)^)(#)ln) & (for x st x in Z holds x >0) implies ((id
Z)^)(#)ln is_differentiable_on Z & for x st x in Z holds ((((id Z)^)(#)ln)`|Z).
  x = (1/x^2)*(1-ln.x)
proof
  set f = id Z, g = ln;
  assume that
A1: Z c= dom ((f^)(#)g) and
A2: for x st x in Z holds x >0;
A3: not 0 in Z by A2;
  then
A4: f^ is_differentiable_on Z by Th4;
A5: Z c= dom (f^) /\ dom g by A1,VALUED_1:def 4;
  then
A6: Z c= dom g by XBOOLE_1:18;
  then
A7: g is_differentiable_on Z by Th19;
A8: Z c= dom (f^) by A5,XBOOLE_1:18;
  now
    let x;
    assume
A9: x in Z;
    then (((f^)(#)g)`|Z).x = (g.x)*diff((f^),x)+((f^).x)*diff(g,x) by A1,A4,A7,
FDIFF_1:21
      .=(g.x)*((f^)`|Z).x+ ((f^).x)*diff(g,x) by A4,A9,FDIFF_1:def 7
      .=(g.x)*(-1/x^2)+ ((f^).x)*diff(g,x) by A3,A9,Th4
      .=(g.x)*(-1/x^2)+ ((f^).x)*((g`|Z).x) by A7,A9,FDIFF_1:def 7
      .=(g.x)*(-1/x^2)+((f^).x)*(1/x) by A6,A9,Th19
      .=(g.x)*(-1/x^2)+((f.x)")*(1/x) by A8,A9,RFUNCT_1:def 2
      .=(g.x)*(-1/x^2)+(1*x")*(1/x) by A9,FUNCT_1:18
      .=-(1/x^2)*(g.x)+(1/x)*(1/x) by XCMPLX_0:def 9
      .=-(1/x^2)*(ln.x)+1/(x^2) by XCMPLX_1:102
      .=(1/x^2)*(1-ln.x);
    hence (((f^)(#)g)`|Z).x =(1/x^2)*(1-ln.x);
  end;
  hence thesis by A1,A4,A7,FDIFF_1:21;
end;
