reserve r,r1,r2, s,x for Real,
  i for Integer;

theorem
  arccos is_differentiable_on ].-1,1.[ & (-1 < r & r < 1 implies diff(
  arccos,r) = -1 / sqrt(1-r^2))
proof
  set g = arccos|].-1,1.[;
  set h = cos|[.0,PI.];
  set f = cos|].0,PI.[;
A1: dom f = ].0,PI.[ /\ REAL by RELAT_1:61,SIN_COS:24
    .= ].0,PI.[ by XBOOLE_1:28;
  set x = arccos.r;
  set s = sqrt(1-r^2);
A2: ].-1,1.[ c= dom arccos by Th86,XXREAL_1:25;
A3: cos is_differentiable_on ].0,PI.[ by FDIFF_1:26,SIN_COS:67;
  then
A4: f is_differentiable_on ].0,PI.[ by FDIFF_2:16;
A5: now
    let x0 be Real such that
A6: x0 in ].0,PI.[;
A7: --sin.x0 > 0 by A6,COMPTRIG:7;
    diff(f,x0) = (f`|].0,PI.[).x0 by A4,A6,FDIFF_1:def 7
      .= (cos`|].0,PI.[).x0 by A3,FDIFF_2:16
      .= diff(cos,x0) by A3,A6,FDIFF_1:def 7
      .= -sin.x0 by SIN_COS:67;
    hence 0 > diff(f,x0) by A7;
  end;
A8: f" = (h|].0,PI.[)" by RELAT_1:74,XXREAL_1:25
    .= h"|(h.:].0,PI.[) by RFUNCT_2:17
    .= g by Th50,RELAT_1:129,XXREAL_1:25;
  then
A9: f|].0,PI.[ = f & dom (f") = ].-1,1.[ by Th86,RELAT_1:62,72,XXREAL_1:25;
  then
A10: g is_differentiable_on ].-1,1.[ by A8,A4,A1,A5,FDIFF_2:48;
  then for x st x in ].-1,1.[ holds g is_differentiable_in x by
FDIFF_1:9;
  hence
A11: arccos is_differentiable_on ].-1,1.[ by A2,FDIFF_1:def 6;
  assume
A12: -1 < r & r < 1;
  then
A13: r in ].-1,1.[ by XXREAL_1:4;
  then
A14: g.r = x by FUNCT_1:49;
  x = arccos r;
  then 0 < x & x < PI by A12,Th100;
  then
A15: x in ].0,PI.[ by XXREAL_1:4;
  then
A16: diff(f,x) = (f`|].0,PI.[).x by A4,FDIFF_1:def 7
    .= (cos`|].0,PI.[).x by A3,FDIFF_2:16
    .= diff(cos,x) by A3,A15,FDIFF_1:def 7
    .= -sin.x by SIN_COS:67
    .= -sin arccos r by SIN_COS:def 17
    .= -s by A12,Th104;
  thus diff(arccos,r) = (arccos`|].-1,1.[).r by A11,A13,FDIFF_1:def 7
    .= (g`|].-1,1.[).r by A11,FDIFF_2:16
    .= diff(g,r) by A10,A13,FDIFF_1:def 7
    .= 1 / -s by A8,A9,A4,A1,A5,A13,A14,A16,FDIFF_2:48
    .= (-1)/s by XCMPLX_1:192
    .= -1/s by XCMPLX_1:187;
end;
