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 (ln*cos) & (for x st x in Z holds cos.x >0) implies ln*cos
  is_differentiable_on Z & for x st x in Z holds ((ln*cos)`|Z).x =- tan(x)
proof
  assume that
A1: Z c= dom (ln*cos) and
A2: for x st x in Z holds cos.x >0;
A3: cos is_differentiable_on Z by FDIFF_1:26,SIN_COS:67;
A4: for x st x in Z holds ln*cos is_differentiable_in x
  proof
    let x;
    assume x in Z;
    then cos is_differentiable_in x & cos.x >0 by A2,A3,FDIFF_1:9;
    hence thesis by TAYLOR_1:20;
  end;
  then
A5: ln*cos is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((ln*cos)`|Z).x =- tan(x)
  proof
    let x;
    assume
A6: x in Z;
    then cos is_differentiable_in x & cos.x >0 by A2,A3,FDIFF_1:9;
    then diff(ln*cos,x) =diff(cos,x)/(cos.x) by TAYLOR_1:20
      .=(-sin.x)/cos.x by SIN_COS:63
      .=- (sin.x/cos.x) by XCMPLX_1:187
      .=- (sin(x)/cos.x) by SIN_COS:def 17
      .=- (sin(x)/cos(x)) by SIN_COS:def 19
      .=- tan(x) by SIN_COS4:def 1;
    hence thesis by A5,A6,FDIFF_1:def 7;
  end;
  hence thesis by A1,A4,FDIFF_1:9;
end;
