reserve x,x0, r, s, h for Real,

  n for Element of NAT,
  rr, y for set,
  Z for open Subset of REAL,

  f, f1, f2 for PartFunc of REAL,REAL;

theorem Th72:
  arccot is_differentiable_on cot.:].0,PI.[
proof
  set f = cot|].0,PI.[;
A1: dom(f") = rng (cot|].0,PI.[) by FUNCT_1:33
    .= cot.:].0,PI.[ by RELAT_1:115;
  dom f = dom cot /\ ].0,PI.[ by RELAT_1:61;
  then
A2: ].0,PI.[ c= dom f by Th2,XBOOLE_1:19;
A3: f is_differentiable_on ].0,PI.[ by Lm2,FDIFF_2:16;
A4: now
A5: for x0 st x0 in ].0,PI.[ holds -1/(sin.x0)^2 < 0
    proof
      let x0;
      assume x0 in ].0,PI.[;
      then 0 < sin.x0 by COMPTRIG:7;
      then (sin.x0)^2 > 0;
      then 1/(sin.x0)^2 > 0 /(sin.x0)^2;
      then -1/(sin.x0)^2 < -0;
      hence thesis;
    end;
    let x0 such that
A6: x0 in ].0,PI.[;
    diff(f,x0) = (f`|].0,PI.[).x0 by A3,A6,FDIFF_1:def 7
      .= (cot`|].0,PI.[).x0 by Lm2,FDIFF_2:16
      .= diff(cot,x0) by A6,Lm2,FDIFF_1:def 7
      .= -1/(sin.x0)^2 by A6,Lm4;
    hence diff(f,x0) < 0 by A6,A5;
  end;
  f|].0,PI.[ = f by RELAT_1:72;
  hence thesis by A1,A2,A3,A4,FDIFF_2:48;
end;
