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
  -1 <= r & r <= 1 implies arccot r = PI - arccot(-r)
proof
  set x = arccot(-r);
  assume that
A1: -1 <= r and
A2: r <= 1;
A3: -r >= -1 by A2,XREAL_1:24;
A4: --1 >= -r by A1,XREAL_1:24;
  then -r = cot x by A3,Th52;
  then
A5: r = -cot x .= -(cos x/sin x) by SIN_COS4:def 2
    .= cos x/(-(sin x)) by XCMPLX_1:188
    .= cos x/sin(-x) by SIN_COS:31
    .= cos(-x)/sin(-x) by SIN_COS:31
    .= cot(-x) by SIN_COS4:def 2;
  -r in [.-1,1.] by A4,A3,XXREAL_1:1;
  then
A6: x in [.PI/4,3/4*PI.] by Th50;
  then x <= 3/4*PI by XXREAL_1:1;
  then -x >= -3/4*PI by XREAL_1:24;
  then
A7: PI+(-x) >= PI+(-3/4*PI) by XREAL_1:6;
  PI/4 <= x by A6,XXREAL_1:1;
  then -PI/4 >= -x by XREAL_1:24;
  then PI+(-PI/4) >= PI+(-x) by XREAL_1:6;
  then
A8: PI+(-x) in [.PI/4,3/4*PI.] by A7,XXREAL_1:1;
A9: [.PI/4,3/4*PI.] c= ].0,PI.[ by Lm9,Lm10,XXREAL_2:def 12;
  then
A10: PI+(-x) < PI by A8,XXREAL_1:4;
A11: cot(PI+(-x)) = cos(PI+(-x))/sin(PI+(-x)) by SIN_COS4:def 2
    .= (-cos(-x))/sin(PI+(-x)) by SIN_COS:79
    .= (-cos(-x))/(-sin(-x)) by SIN_COS:79
    .= cos(-x)/sin(-x) by XCMPLX_1:191
    .= cot(-x)by SIN_COS4:def 2;
  0 < PI+(-x) by A8,A9,XXREAL_1:4;
  hence thesis by A5,A10,A11,Th36;
end;
