 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 cot & x-h in dom cot implies
  bD(cot(#)cot(#)sin,h).x = (cot(#)cos).x-(cot(#)cos).(x-h)
proof
  set f=cot(#)cot(#)sin;
  assume
A1:x in dom cot & x-h in dom cot;
  x in dom f & x-h in dom f
  proof
    set f1=cot(#)cot;
    set f2=sin;
A2: x in dom f1 & x-h in dom f1
    proof
      x in dom cot /\ dom cot & x-h in dom cot /\ dom cot 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
  bD(f,h).x = (cot(#)cot(#)sin).x-(cot(#)cot(#)sin).(x-h) by DIFF_1:38
    .= (cot(#)cot).x*sin.x-(cot(#)cot(#)sin).(x-h) by VALUED_1:5
    .= cot.x*cot.x*sin.x-(cot(#)cot(#)sin).(x-h) by VALUED_1:5
    .= cot.x*cot.x*sin.x-(cot(#)cot).(x-h)*sin.(x-h) by VALUED_1:5
    .= cot.x*cot.x*sin.x-cot.(x-h)*cot.(x-h)*sin.(x-h) by VALUED_1:5
    .= (cos.x*(sin.x)")*cot.x*sin.x-cot.(x-h)*cot.(x-h)*sin.(x-h)
                                                by A1,RFUNCT_1:def 1
    .= (cos.x*(sin.x)"*cot.x*sin.x)
       -(cos.(x-h)*(sin.(x-h))"*cot.(x-h)*sin.(x-h)) by A1,RFUNCT_1:def 1
    .= cot.x*cos.x*(sin.x*(1/sin.x))
       -cot.(x-h)*cos.(x-h)*(sin.(x-h)*(1/sin.(x-h)))
    .= cot.x*cos.x*1-cot.(x-h)*cos.(x-h)*(sin.(x-h)*(1/sin.(x-h)))
                                           by A1,FDIFF_8:2,XCMPLX_1:106
    .= cot.x*cos.x*1-cot.(x-h)*cos.(x-h)*1 by A1,FDIFF_8:2,XCMPLX_1:106
    .= (cot(#)cos).x-cot.(x-h)*cos.(x-h) by VALUED_1:5
    .= (cot(#)cos).x-(cot(#)cos).(x-h) by VALUED_1:5;
  hence thesis;
end;
