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

theorem
  Z c= dom (cos*ln) & (for x st x in Z holds x>0) implies cos*ln
  is_differentiable_on Z & for x st x in Z holds ((cos*ln)`|Z).x =-sin.(ln.x)/x
proof
  assume that
A1: Z c= dom (cos*ln) and
A2: for x st x in Z holds x>0;
A3: for x st x in Z holds cos*ln is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then
A4: ln is_differentiable_in x by A2,TAYLOR_1:18;
    cos is_differentiable_in ln.x by SIN_COS:63;
    hence thesis by A4,FDIFF_2:13;
  end;
  then
A5: cos*ln is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((cos*ln)`|Z).x =-sin.(ln.x)/x
  proof
    let x;
A6: cos is_differentiable_in ln.x by SIN_COS:63;
    assume
A7: x in Z;
    then x>0 by A2;
    then
A8: x in right_open_halfline(0) by Lm3;
    ln is_differentiable_in x by A2,A7,TAYLOR_1:18;
    then diff(cos*ln,x) = diff(cos,ln.x)*diff(ln,x) by A6,FDIFF_2:13
      .=(-sin.(ln.x))*diff(ln,x) by SIN_COS:63
      .=(-sin.(ln.x))*(1/x) by A8,TAYLOR_1:18
      .=(-sin.(ln.x))/x by XCMPLX_1:99
      .=-sin.(ln.x)/x by XCMPLX_1:187;
    hence thesis by A5,A7,FDIFF_1:def 7;
  end;
  hence thesis by A1,A3,FDIFF_1:9;
end;
