 reserve a,x for Real;
 reserve n for Nat;
 reserve A for non empty closed_interval Subset of REAL;
 reserve f,f1 for PartFunc of REAL,REAL;
 reserve Z for open Subset of REAL;

theorem
A c= Z & Z c= dom (ln*sec) & Z = dom tan & tan|A is continuous
implies integral(tan,A)=(ln*sec).(upper_bound A)-(ln*sec).(lower_bound A)
proof
  assume
A1:A c= Z & Z c= dom (ln*sec) & Z = dom tan & tan|A is continuous;
   then
A2:tan is_integrable_on A & tan|A is bounded by INTEGRA5:10,11;
A3:ln*sec is_differentiable_on Z by A1,FDIFF_9:18;
A4:for x st x in Z holds cos.x<>0
  proof
    let x;
    assume x in Z;
    then x in dom sec by A1,FUNCT_1:11;
    hence thesis by RFUNCT_1:3;
  end;
A5:for x being Element of REAL
   st x in dom ((ln*sec)`|Z) holds ((ln*sec)`|Z).x = tan.x
   proof
     let x be Element of REAL;
     assume x in dom ((ln*sec)`|Z);then
A6:  x in Z by A3,FDIFF_1:def 7;then
A7:  cos.x<>0 by A4;
     ((ln*sec)`|Z).x = tan x by A1,A6,FDIFF_9:18
                 .=tan.x by A7,SIN_COS9:15;
     hence thesis;
   end;
  dom ((ln*sec)`|Z)=dom tan by A1,A3,FDIFF_1:def 7;
  then ((ln*sec)`|Z)= tan by A5,PARTFUN1:5;
  hence thesis by A1,A2,A3,INTEGRA5:13;
end;
