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 & f=f1-f2 & f2=#Z 2 & (for x st x in Z holds f1.x=a^2 & f.x >0
  & f3.x=x/a & f3.x > -1 & f3.x < 1 & x<>0 & a>0) & dom ((arcsin)*f3)=Z & Z c=
  dom ((id Z)(#)((arcsin)*f3)+( #R (1/2))*f) & ((arcsin)*f3)|A is continuous
implies integral((arcsin)*f3,A) =
 ((id Z)(#)((arcsin)*f3)+( #R (1/2))*f).(upper_bound A
  ) -((id Z)(#)((arcsin)*f3)+( #R (1/2))*f).(lower_bound A)
proof
  assume that
A1: A c= Z and
A2: f=f1-f2 & f2=#Z 2 and
A3: for x st x in Z holds f1.x=a^2 & f.x >0 & f3.x=x/a & f3.x > -1 & f3
  .x < 1 & x<>0 & a>0 and
A4: dom ((arcsin)*f3)=Z and
A5: Z c= dom ((id Z)(#)((arcsin)*f3)+( #R (1/2))*f) and
A6: ((arcsin)*f3)|A is continuous;
A7: (arcsin)*f3 is_integrable_on A by A1,A4,A6,INTEGRA5:11;
A8: ((id Z)(#)((arcsin)*f3)+( #R (1/2))*f) is_differentiable_on Z by A2,A3,A5,
FDIFF_7:28;
A9: for x being Element of REAL
st x in dom (((id Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z) holds (((id
  Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z).x = ((arcsin)*f3).x
  proof
    let x be Element of REAL;
    assume x in dom (((id Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z);
    then
A10: x in Z by A8,FDIFF_1:def 7;
    then
    (((id Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z).x = arcsin.(x/a) by A2,A3,A5,
FDIFF_7:28
      .= arcsin.(f3.x) by A3,A10
      .= ((arcsin)*f3).x by A4,A10,FUNCT_1:12;
    hence thesis;
  end;
  dom (((id Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z) = dom ((arcsin)*f3) by A4,A8,
FDIFF_1:def 7;
  then (((id Z)(#)((arcsin)*f3)+( #R (1/2))*f)`|Z) = (arcsin)*f3 by A9,
PARTFUN1:5;
  hence thesis by A1,A4,A6,A7,A8,INTEGRA5:10,13;
end;
