reserve y for set,
  x,r,a,b for Real,
  n for Element of NAT,
  Z for open Subset of REAL,
  f,f1,f2,f3 for PartFunc of REAL,REAL;

theorem
  Z c= dom ((id Z)(#)(arccos)-( #R (1/2))*f) & Z c= ]. -1,1 .[ & f=f1-f2
  & f2=#Z 2 & (for x st x in Z holds f1.x=1 & f.x >0 & x<>0) implies (id Z)(#)(
  arccos)-( #R (1/2))*f is_differentiable_on Z & for x st x in Z holds (((id Z)
  (#)(arccos)-( #R (1/2))*f)`|Z).x =arccos.x
proof
  assume that
A1: Z c= dom ((id Z)(#)(arccos)-( #R (1/2))*f) and
A2: Z c= ]. -1,1 .[ and
A3: f=f1-f2 and
A4: f2=#Z 2 and
A5: for x st x in Z holds f1.x=1 & f.x >0 & x<>0;
A6: Z c= dom ((id Z)(#)(arccos)) /\ dom (( #R (1/2))*f) by A1,VALUED_1:12;
  then
A7: Z c= dom (( #R (1/2))*f) by XBOOLE_1:18;
A8: Z c= dom ((id Z)(#)(arccos)) by A6,XBOOLE_1:18;
  then
A9: (id Z)(#)(arccos) is_differentiable_on Z by A2,Th17;
A10: for x st x in Z holds f1.x=1 & f.x >0 by A5;
  then
A11: (( #R (1/2))*f) is_differentiable_on Z by A3,A4,A7,Th22;
A12: for x st x in Z holds x*(1-x #Z 2) #R (-1/2)=x/sqrt(1-x^2)
  proof
    let x;
    assume
A13: x in Z;
    then x in dom (f1-f2) by A3,A7,FUNCT_1:11;
    then
A14: (f1-f2).x=f1.x - f2.x by VALUED_1:13
      .=1 -(f2.x) by A5,A13
      .=1 -(x #Z 2) by A4,TAYLOR_1:def 1;
    f.x >0 by A5,A13;
    then
A15: 1-x^2>0 by A3,A14,Th1;
    (1-x #Z 2) #R (-1/2)=(1-x^2) #R (-1/2) by Th1
      .=1/sqrt(1-x^2) by A15,Th3;
    hence thesis by XCMPLX_1:99;
  end;
  for x st x in Z holds (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z).x =arccos. x
  proof
    let x;
    assume
A16: x in Z;
    hence (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z).x =diff((id Z)(#)(arccos),x)-
    diff(( #R (1/2))*f,x) by A1,A9,A11,FDIFF_1:19
      .=(((id Z)(#)(arccos))`|Z).x-diff(( #R (1/2))*f,x) by A9,A16,
FDIFF_1:def 7
      .=(((id Z)(#)(arccos))`|Z).x-((( #R (1/2))*f)`|Z).x by A11,A16,
FDIFF_1:def 7
      .=arccos.x-x/sqrt(1-x^2)-((( #R (1/2))*f)`|Z).x by A2,A8,A16,Th17
      .=arccos.x-x/sqrt(1-x^2)--x*(1-x #Z 2) #R (-1/2) by A3,A4,A10,A7,A16,Th22
      .=arccos.x-x/sqrt(1-x^2)+x*(1-x #Z 2) #R (-1/2)
      .=arccos.x-x/sqrt(1-x^2)+x/sqrt(1-x^2) by A12,A16
      .=arccos.x;
  end;
  hence thesis by A1,A9,A11,FDIFF_1:19;
end;
