reserve r,x,x0,a,b for Real;
reserve n,m for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;
reserve f, f1, f2, f3 for PartFunc of REAL, REAL;

theorem
  A c= Z & 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) & dom arccos=Z & Z c= dom ((id Z)(#)(arccos)-( #R (1/2)
)*f) implies integral(arccos,A)
 = ((id Z)(#)(arccos)-( #R (1/2))*f).(upper_bound A) -((
  id Z)(#)(arccos)-( #R (1/2))*f).(lower_bound A)
proof
  assume that
A1: A c= Z and
A2: 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 ) and
A3: dom arccos=Z and
A4: Z c= dom ((id Z)(#)(arccos)-( #R (1/2))*f);
A5: arccos|A is bounded by A1,A3,INTEGRA5:10;
A6: ((id Z)(#)(arccos)-( #R (1/2))*f) is_differentiable_on Z by A2,A4,
FDIFF_7:24;
A7: for x being Element of REAL
st x in dom (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z) holds (((id Z)
  (#)(arccos)-( #R (1/2))*f)`|Z).x = arccos.x
  proof
    let x be Element of REAL;
    assume x in dom (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z);
    then x in Z by A6,FDIFF_1:def 7;
    hence thesis by A2,A4,FDIFF_7:24;
  end;
  dom (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z) = dom arccos by A3,A6,
FDIFF_1:def 7;
  then (((id Z)(#)(arccos)-( #R (1/2))*f)`|Z) = arccos by A7,PARTFUN1:5;
  hence thesis by A1,A3,A5,A6,INTEGRA5:11,13;
end;
