 reserve n,m,i,p for Nat,
         h,k,r,r1,r2,x,x0,x1,x2,x3 for Real;
 reserve f,f1,f2,g for Function of REAL,REAL;

theorem
  x in dom tan & x+h in dom tan implies
  fD(tan(#)tan(#)cos,h).x = (tan(#)sin).(x+h)-(tan(#)sin).x
proof
  set f=tan(#)tan(#)cos;
  assume
A1:x in dom tan & x+h in dom tan;
  x in dom f & x+h in dom f
  proof
    set f1=tan(#)tan;
    set f2=cos;
A2: x in dom f1 & x+h in dom f1
    proof
      x in dom tan /\ dom tan & x+h in dom tan /\ dom tan by A1;
      hence thesis by VALUED_1:def 4;
    end;
    x in dom f1 /\ dom f2 & x+h in dom f1 /\ dom f2
                                        by A2,SIN_COS:24,XBOOLE_0:def 4;
    hence thesis by VALUED_1:def 4;
  end;
  then
  fD(f,h).x = (tan(#)tan(#)cos).(x+h)-(tan(#)tan(#)cos).x by DIFF_1:1
    .= (tan(#)tan).(x+h)*cos.(x+h)-(tan(#)tan(#)cos).x by VALUED_1:5
    .= tan.(x+h)*tan.(x+h)*cos.(x+h)-(tan(#)tan(#)cos).x by VALUED_1:5
    .= tan.(x+h)*tan.(x+h)*cos.(x+h)-(tan(#)tan).x*cos.x by VALUED_1:5
    .= tan.(x+h)*tan.(x+h)*cos.(x+h)-tan.x*tan.x*cos.x by VALUED_1:5
    .= (sin.(x+h)*(cos.(x+h))")*tan.(x+h)*cos.(x+h)-tan.x*tan.x*cos.x
                                                   by A1,RFUNCT_1:def 1
    .= (sin.(x+h)*(cos.(x+h))"*tan.(x+h)*cos.(x+h))
       -(sin.x*(cos.x)"*tan.x*cos.x) by A1,RFUNCT_1:def 1
    .= sin.(x+h)*tan.(x+h)*(cos.(x+h)*(1/cos.(x+h)))
       -sin.x*tan.x*(cos.x*(1/cos.x))
    .= sin.(x+h)*tan.(x+h)*1-sin.x*tan.x*(cos.x*(1/cos.x))
                                     by A1,FDIFF_8:1,XCMPLX_1:106
    .= sin.(x+h)*tan.(x+h)*1-sin.x*tan.x*1 by A1,FDIFF_8:1,XCMPLX_1:106
    .= (tan(#)sin).(x+h)-tan.x*sin.x by VALUED_1:5
    .= (tan(#)sin).(x+h)-(tan(#)sin).x by VALUED_1:5;
  hence thesis;
end;
