reserve a,b,r for Real;
reserve A for non empty set;
reserve X,x for set;
reserve f,g,F,G for PartFunc of REAL,REAL;
reserve n for Element of NAT;

theorem
  for H be Functional_Sequence of REAL,REAL, rseq be Real_Sequence st
  a < b & (for n be Element of NAT holds H.n is_integrable_on [' a,b '] &
  (H.n)|['a,b '] is bounded & rseq.n = integral(H.n,a,b)) &
  H is_unif_conv_on [' a,b '] holds
  lim(H,[' a,b '])|[' a,b '] is bounded &
  lim(H,[' a,b ']) is_integrable_on [' a,b '] & rseq is convergent &
    lim rseq = integral(lim(H,[' a,b ']),a,b)
proof
  let H be Functional_Sequence of REAL,REAL, rseq be Real_Sequence;
  set AB = [' a,b '];
  assume that
A1: a < b and
A2: for n be Element of NAT holds H.n is_integrable_on AB & (H.n)|AB is
  bounded & rseq.n =integral(H.n,a,b) and
A3: H is_unif_conv_on AB;
  consider T being DivSequence of AB such that
A4: delta T is convergent & lim delta T = 0 by INTEGRA4:11;
A5: for n be Nat holds H.n is_integrable_on AB & (H.n)|AB is
  bounded & rseq.n =integral(H.n,a,b)
   proof let n be Nat;
     n in NAT by ORDINAL1:def 12;
    hence thesis by A2;
   end;
A6: AB common_on_dom H by A3,SEQFUNC:43;
A7: for n be Element of NAT holds (H.n)||AB is Function of AB,REAL & (H.n)
||AB|AB is bounded & lower_sum((H.n)||AB,T) is convergent & lim lower_sum((H.n)
  ||AB,T) = lower_integral((H.n)||AB) & upper_sum((H.n)||AB,T) is convergent &
lim upper_sum((H.n)||AB,T) = upper_integral((H.n)||AB) & lower_integral((H.n)||
  AB) = upper_integral((H.n)||AB) & rseq.n =integral((H.n)||AB)
  proof
    let n be Element of NAT;
    AB c= dom (H.n) by A6,SEQFUNC:def 9;
    hence
A8: (H.n)||AB is Function of AB,REAL by FUNCT_2:68,INTEGRA5:6;
    thus (H.n)||AB|AB is bounded by A2;
    hence lower_sum((H.n)||AB,T) is convergent & lim lower_sum((H.n)||AB,T) =
    lower_integral((H.n)||AB) & upper_sum((H.n)||AB,T) is convergent & lim
    upper_sum((H.n)||AB,T) = upper_integral((H.n)||AB) by A4,A8,INTEGRA4:8,9;
    (H.n) is_integrable_on AB by A2;
    then (H.n)||AB is integrable;
    hence lower_integral((H.n)||AB) = upper_integral((H.n)||AB);
    rseq.n = integral(H.n,a,b) by A2;
    then rseq.n = integral(H.n,AB) by A1,INTEGRA5:def 4;
    hence thesis;
  end;
  set L1 = lower_integral(lim(H,AB)||AB);
  set K1 = upper_integral(lim(H,AB)||AB);
A9: 0 < b-a by A1,XREAL_1:50;
  reconsider jj=1 as Real;
  consider K be Nat such that
A10: for n be Nat,x be Element of REAL st n >= K & x in AB
  holds |.(H.n).x-(lim(H,AB)).x.| < jj by A3,SEQFUNC:43;
  (H.K)|AB is bounded by A5;
  then consider r be Real such that
A11: for c be object st c in AB /\ dom(H.K) holds |.(H.K).c.| <= r
   by RFUNCT_1:73;
  set H0 = lim(H,AB)||AB;
  H is_point_conv_on AB by A3,SEQFUNC:22;
  then
A12: dom lim(H,AB) = AB by SEQFUNC:21;
  then
A13: H0 is Function of AB,REAL by FUNCT_2:68,INTEGRA5:6;
  dom lim(H,AB) c= dom(H.K) by A6,A12,SEQFUNC:def 9;
  then
A14: AB /\ dom lim(H,AB) c= AB /\ dom(H.K) by XBOOLE_1:26;
  now
    let c be object;
    (lim(H,AB)).c = (H.K).c - ((H.K).c - (lim(H,AB)).c);
    then
A15: |.(lim(H,AB)).c.| <= |.(H.K).c.| + |.(H.K).c-(lim(H,AB)).c.| by
COMPLEX1:57;
    assume
A16: c in AB /\ dom lim(H,AB);
    then c in AB by XBOOLE_0:def 4;
    then
A17: |.(H.K).c - (lim(H,AB)).c.| < 1 by A10;
    |.(H.K).c.| <= r by A11,A14,A16;
    then |.(H.K).c.| + |.(H.K).c-(lim(H,AB)).c.| <= r+1 by A17,XREAL_1:7;
    hence |.(lim(H,AB)).c.| <= r+1 by A15,XXREAL_0:2;
  end;
  hence
A18: lim(H,AB)|AB is bounded by RFUNCT_1:73;
  then
A19: H0|AB is bounded_above;
A20: H0|AB is bounded_below by A18;
  then
A21: upper_sum(H0,T) is convergent by A4,A19,A13,INTEGRA4:9;
A22: for e be Real st 0 < e ex N be Element of NAT st for n,k be
Element of NAT st N<=n holds |.upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k.| <=
  e*(b-a)
  proof
    let e be Real;
    assume 0 < e;
    then consider N be Nat such that
A23: for n be Nat,x be Element of REAL st n>=N & x in AB
    holds |.(H.n).x-(lim(H,AB)).x.|<e by A3,SEQFUNC:43;
     reconsider N as Element of NAT by ORDINAL1:def 12;
    take N;
      let n,k be Element of NAT;
      reconsider Tk=T.k as Division of AB;
      set l0 = len Tk;
A24:  dom Tk = Seg l0 by FINSEQ_1:def 3;
      set Hn = (H.n)||AB;
      len upper_volume(Hn,T.k) = l0 by INTEGRA1:def 6;
      then reconsider
      R1=upper_volume(Hn,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
      len upper_volume(H0,T.k) = l0 by INTEGRA1:def 6;
      then reconsider
      R2=upper_volume(H0,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
      upper_sum(H0,T).k-upper_sum(Hn,T).k = upper_sum(H0,T.k)-upper_sum(
      Hn,T).k by INTEGRA2:def 2;
      then upper_sum(H0,T).k-upper_sum(Hn,T).k = upper_sum(H0,T.k)-upper_sum(
      Hn,T.k) by INTEGRA2:def 2;
      then
A25:  upper_sum(H0,T).k-upper_sum(Hn,T).k = Sum(R2-R1) by RVSUM_1:90;
      consider H1 be Function of AB,REAL such that
A26:  rng H1 = {e} and
A27:  H1|AB is bounded by INTEGRA4:5;
      len upper_volume(H1,T.k) = l0 by INTEGRA1:def 6;
      then reconsider
      R3=upper_volume(H1,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
A28:  vol AB = b-a by A1,INTEGRA6:5;
      upper_bound rng H1 = e by A26,SEQ_4:9;
      then
A29:  upper_sum(H1,T.k) <= e*(b-a) by A27,A28,INTEGRA1:27;
      assume
A30:  N<= n;
A31:  for i be Element of NAT st i in dom Tk holds (R1-R2).i <= R3.i & (
      R2-R1).i <= R3.i
      proof
        let i be Element of NAT;
A32:    0 <= vol divset(T.k,i) by INTEGRA1:9;
        assume
A33:    i in dom Tk;
A34:    upper_bound rng(Hn|divset(T.k,i)) - upper_bound rng(H0|divset(T.k
,i)) <= upper_bound rng(H1|divset(T.k,i)) & upper_bound rng(H0|divset(T.k,i)) -
        upper_bound rng(Hn|divset(T.k,i)) <= upper_bound rng(H1|divset(T.k,i))
        proof
A35:      divset(T.k,i) c= AB by A33,INTEGRA1:8;
          then reconsider
          g = H0|divset(T.k,i) as Function of divset(T.k,i),REAL by A13,
FUNCT_2:32;
          consider x0 be object such that
A36:      x0 in divset(T.k,i) by XBOOLE_0:def 1;
          Hn is Function of AB, REAL by A7;
          then reconsider
          f = Hn|divset(T.k,i) as Function of divset(T.k,i),REAL by A35,
FUNCT_2:32;
A37:      for x be set st x in divset(T.k,i) holds |.f.x-g.x.| <=e
          proof
            let x be set;
            assume
A38:        x in divset(T.k,i);
            then |.f.x-g.x.| = |.Hn.x-g.x.| by FUNCT_1:49;
            then |.f.x-g.x.| = |.Hn.x-H0.x.| by A38,FUNCT_1:49;
            then |.f.x-g.x.| = |.(H.n).x-H0.x.| by A35,A38,FUNCT_1:49;
            then |.f.x-g.x.| = |.(H.n).x-(lim(H,AB)).x.| by A35,A38,
FUNCT_1:49;
            hence thesis by A23,A30,A35,A38;
          end;
          Hn|AB is bounded by A7;
          then f|divset(T.k,i) is bounded_above by A33,INTEGRA1:8,INTEGRA2:5;
          then
A39:      rng f is bounded_above by INTEGRA1:13;
          H1.x0 in {e} by A26,A35,A36,FUNCT_2:4;
          then H1.x0 = e by TARSKI:def 1;
          then
A40:      (H1|divset(T.k,i)).x0 = e by A36,FUNCT_1:49;
          H1|divset(T.k,i) is Function of divset(T.k,i),REAL by A35,FUNCT_2:32;
          then e in rng(H1|divset(T.k,i)) by A36,A40,FUNCT_2:4;
          then
A41:      {e} c= rng(H1|divset(T.k,i)) by ZFMISC_1:31;
          rng (H1|divset(T.k,i)) c= {e} by A26,RELAT_1:70;
          then rng(H1|divset(T.k,i)) = {e} by A41,XBOOLE_0:def 10;
          then
A42:      e=upper_bound rng(H1|divset(T.k,i)) by SEQ_4:9;
          g|divset(T.k,i) is bounded_above by A19,A33,INTEGRA1:8,INTEGRA2:5;
          then
A43:      rng g is bounded_above by INTEGRA1:13;
          hence
          upper_bound rng(Hn|divset(T.k,i)) - upper_bound rng(H0|divset(T
          .k,i)) <= upper_bound rng(H1|divset(T.k,i)) by A39,A42,A37,Th1;
          for x be set st x in divset(T.k,i) holds |.g.x-f.x.| <=
          upper_bound rng(H1|divset(T.k,i))
          proof
            let x be set;
            assume x in divset(T.k,i);
            then |.f.x-g.x.| <= upper_bound rng(H1|divset(T.k,i)) by A42,A37;
            hence thesis by COMPLEX1:60;
          end;
          hence thesis by A39,A43,Th1;
        end;
        (R1-R2).i = R1.i-R2.i by RVSUM_1:27; then
        (R1-R2).i = upper_bound rng(Hn|divset(T.k,i)) * vol divset(T.k,i)
        - (upper_volume(H0,T.k)).i by A33,INTEGRA1:def 6;
        then
        (R1-R2).i = upper_bound rng(Hn|divset(T.k,i)) * vol divset(T.k,i)
- upper_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i) by A33,INTEGRA1:def 6;
        then
        (R1-R2).i = (upper_bound rng (Hn|divset(T.k,i)) - upper_bound rng
        (H0| divset(T.k,i))) * vol divset(T.k,i);
        then
        (R1-R2).i <= upper_bound rng(H1|divset(T.k,i)) * vol divset(T.k,i
        ) by A34,A32,XREAL_1:64;
        hence (R1-R2).i <= R3.i by A33,INTEGRA1:def 6;
        (R2-R1).i = R2.i-R1.i by RVSUM_1:27; then
        (R2-R1).i = upper_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i)
        - (upper_volume(Hn,T.k)).i by A33,INTEGRA1:def 6;
        then
        (R2-R1).i = upper_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i)
- upper_bound rng (Hn|divset(T.k,i)) * vol divset(T.k,i) by A33,INTEGRA1:def 6;
        then
        (R2-R1).i = (upper_bound rng(H0|divset(T.k,i)) - upper_bound rng(
        Hn|divset (T.k,i))) * vol divset(T.k,i);
        then
        (R2-R1).i <= upper_bound rng(H1|divset(T.k,i)) * vol divset(T.k,i
        ) by A34,A32,XREAL_1:64;
        hence thesis by A33,INTEGRA1:def 6;
      end;
      then for i be Nat st i in dom Tk holds (R2-R1).i <= R3.i;
      then upper_sum(H0,T).k-upper_sum(Hn,T).k <= Sum R3 by A24,A25,RVSUM_1:82;
      then upper_sum(H0,T).k-upper_sum(Hn,T).k <= e*(b-a) by A29,XXREAL_0:2;
      then
A44:  -
e*(b-a) <= -(upper_sum(H0,T).k - upper_sum((H.n)||AB,T).k) by XREAL_1:24;
      upper_sum(Hn,T).k-upper_sum(H0,T).k = upper_sum(Hn,T.k)-upper_sum(
      H0,T).k by INTEGRA2:def 2;
      then
      upper_sum(Hn,T).k-upper_sum(H0,T).k =upper_sum(Hn,T.k)-upper_sum(H0
      ,T.k) by INTEGRA2:def 2;
      then
A45:  upper_sum(Hn,T).k-upper_sum(H0,T).k = Sum(R1-R2) by RVSUM_1:90;
      for i be Nat st i in Seg l0 holds (R1-R2).i <= R3.i by A24,A31;
      then upper_sum(Hn,T).k-upper_sum(H0,T).k <= Sum R3 by A45,RVSUM_1:82;
      then upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k <= e*(b-a) by A29,
XXREAL_0:2;
      hence |.upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k.| <=e*(b-a) by A44,
ABSVALUE:5;
  end;
A46: for e be Real st 0 < e ex N be Element of NAT st for n be
Element of NAT st N<=n holds |.upper_integral((H.n)||AB) -upper_integral(lim(
  H,AB)||AB ).| <=e
  proof
    let e be Real;
     reconsider ee=e as Real;
    assume 0 < e;
    then consider N be Element of NAT such that
A47: for n,k be Element of NAT st N<=n holds |.upper_sum((H.n)||AB,
    T).k-upper_sum(H0,T).k.| <= (ee/(b-a)) * (b-a) by A22,A9,XREAL_1:139;
    take N;
A48: now
      let n,k be Element of NAT;
      assume N<=n;
      then |.upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k.| <=(e/(b-a)) * (b-a
      ) by A47;
      hence |.upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k.| <= e by A9,
XCMPLX_1:87;
    end;
    hereby
      let n be Element of NAT;
      assume
A49:  N<=n;
A50:  now
        let k be Nat;
        k in NAT by ORDINAL1:def 12;
        then |.upper_sum((H.n)||AB,T).k-upper_sum(H0,T).k.| <=e by A48,A49;
        then |.upper_sum((H.n)||AB,T).k+(-upper_sum(H0,T)).k.| <= e by
SEQ_1:10;
        then |.(upper_sum((H.n)||AB,T)+-upper_sum(H0,T)).k.| <= e by SEQ_1:7;
        hence |.upper_sum((H.n)||AB,T)-upper_sum(H0,T).|.k <= e by SEQ_1:12;
      end;
A51:  upper_sum((H.n)||AB,T) is convergent by A7;
      then lim(upper_sum((H.n)||AB,T)-upper_sum(H0,T)) = lim upper_sum((H.n)
      ||AB,T) -lim upper_sum(H0,T) by A21,SEQ_2:12;
      then lim(upper_sum((H.n)||AB,T)-upper_sum(H0,T)) = upper_integral((H.n)
      ||AB) -lim upper_sum(H0,T) by A7;
      then
A52:  lim(upper_sum((H.n)||AB,T)-upper_sum(H0,T)) = upper_integral((H.n)
      ||AB) - upper_integral(lim(H,AB)||AB) by A4,A19,A20,A13,INTEGRA4:9;
A53:  upper_sum((H.n)||AB,T)-upper_sum(H0,T) is convergent by A21,A51;
      then abs(upper_sum((H.n)||AB,T)-upper_sum(H0,T)) is convergent by
SEQ_4:13;
      then lim |.upper_sum((H.n)||AB,T)-upper_sum(H0,T).| <= e by A50,
PREPOWER:2;
      hence |.upper_integral((H.n)||AB) - upper_integral(lim(H,AB)||AB).| <=e
      by A53,A52,SEQ_4:14;
    end;
  end;
A54: lower_sum (H0,T) is convergent by A4,A19,A20,A13,INTEGRA4:8;
A55: for e be Real st 0 < e ex N be Element of NAT st for n,k be
Element of NAT st N<=n holds |.lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k.| <=
  e*(b-a)
  proof
    let e be Real;
    assume 0 < e;
    then consider N be Nat such that
A56: for n be Nat,x be Element of REAL st n>=N & x in AB
    holds |.(H.n).x-(lim(H,AB)).x.|<e by A3,SEQFUNC:43;
     reconsider N as Element of NAT by ORDINAL1:def 12;
    take N;
    hereby
      let n,k be Element of NAT;
      set Hn=(H.n)||AB;
      reconsider Tk=T.k as Division of AB;
      set l0 = len Tk;
      consider H1 be Function of AB,REAL such that
A57:  rng H1 = {e} and
A58:  H1|AB is bounded by INTEGRA4:5;
A59:  lower_sum(H1,T.k) <= upper_sum(H1,T.k) by A58,INTEGRA1:28;
      len lower_volume(H0,T.k) = l0 by INTEGRA1:def 7;
      then reconsider
      R2=lower_volume(H0,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
      len lower_volume(Hn,T.k) = l0 by INTEGRA1:def 7;
      then reconsider
      R1=lower_volume(Hn,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
      len lower_volume(H1,T.k) = l0 by INTEGRA1:def 7;
      then reconsider
      R3=lower_volume(H1,T.k) as Element of l0-tuples_on REAL by FINSEQ_2:92;
      assume
A60:  N<= n;
A61:  for i be Element of NAT st i in dom Tk holds (R1-R2).i <= R3.i & (
      R2-R1).i <= R3.i
      proof
        let i be Element of NAT;
        consider x0 be object such that
A62:    x0 in divset(T.k,i) by XBOOLE_0:def 1;
A63:    rng(H1|divset(T.k,i)) c= {e} by A57,RELAT_1:70;
        assume
A64:    i in dom Tk;
        then
A65:    divset(T.k,i) c= AB by INTEGRA1:8;
        then reconsider
        g = H0|divset(T.k,i) as Function of divset(T.k,i),REAL by A13,
FUNCT_2:32;
        Hn is Function of AB,REAL by A7;
        then reconsider
        f = Hn|divset(T.k,i) as Function of divset(T.k,i),REAL by A65,
FUNCT_2:32;
A66:    0 <= vol divset(T.k,i) by INTEGRA1:9;
        H1.x0 in {e} by A57,A65,A62,FUNCT_2:4;
        then H1.x0 = e by TARSKI:def 1;
        then
A67:    (H1|divset(T.k,i)).x0 = e by A62,FUNCT_1:49;
        H1|divset(T.k,i) is Function of divset(T.k,i),REAL by A65,FUNCT_2:32;
        then e in rng(H1|divset(T.k,i)) by A62,A67,FUNCT_2:4;
        then {e} c= rng(H1|divset(T.k,i)) by ZFMISC_1:31;
        then rng(H1|divset(T.k,i)) = {e} by A63,XBOOLE_0:def 10;
        then
A68:    e=lower_bound rng(H1|divset(T.k,i)) by SEQ_4:9;
A69:    now
          let x be set;
          assume
A70:      x in divset(T.k,i);
          then |.f.x-g.x.| = |.Hn.x-g.x.| by FUNCT_1:49;
          then |.f.x-g.x.| = |.Hn.x-H0.x.| by A70,FUNCT_1:49;
          then |.f.x-g.x.| = |.(H.n).x-H0.x.| by A65,A70,FUNCT_1:49;
          then |.f.x-g.x.| = |.(H.n).x-(lim(H,AB)).x.| by A65,A70,FUNCT_1:49;
          hence |.f.x - g.x.| <= e by A56,A60,A65,A70;
        end;
        (R2-R1).i = R2.i-R1.i by RVSUM_1:27;
        then (R2-R1).i = lower_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i
        ) - (lower_volume(Hn,T.k)).i by A64,INTEGRA1:def 7;
        then (R2-R1).i = lower_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i
) - lower_bound rng(Hn|divset(T.k,i)) * vol divset(T.k,i) by A64,INTEGRA1:def 7
;
        then
A71:    (R2-R1).i = (lower_bound rng(H0|divset(T.k,i)) - lower_bound rng
        (Hn|divset (T.k,i))) * vol divset(T.k,i);
        (R1-R2).i = R1.i-R2.i by RVSUM_1:27;
        then (R1-R2).i = lower_bound rng(Hn|divset(T.k,i)) * vol divset(T.k,i
        ) - (lower_volume(H0,T.k)).i by A64,INTEGRA1:def 7;
        then (R1-R2).i = lower_bound rng(Hn|divset(T.k,i)) * vol divset(T.k,i
) - lower_bound rng(H0|divset(T.k,i)) * vol divset(T.k,i) by A64,INTEGRA1:def 7
;
        then
A72:    (R1-R2).i = (lower_bound rng(Hn|divset(T.k,i)) - lower_bound rng
        (H0|divset (T.k,i)) ) * vol divset(T.k,i);
        Hn|AB is bounded by A7;
        then f|divset(T.k,i) is bounded_below by A64,INTEGRA1:8,INTEGRA2:6;
        then
A73:    rng f is bounded_below by INTEGRA1:11;
        g|divset(T.k,i) is bounded_below by A20,A64,INTEGRA1:8,INTEGRA2:6;
        then
A74:    rng g is bounded_below by INTEGRA1:11;
        then lower_bound rng(Hn|divset(T.k,i)) - lower_bound rng(H0|divset(T.
        k,i)) <= lower_bound rng(H1|divset(T.k,i)) by A73,A68,A69,Th2;
        then (R1-R2).i <= lower_bound rng(H1|divset(T.k,i)) * vol divset(T.k,
        i) by A72,A66,XREAL_1:64;
        hence (R1-R2).i <= R3.i by A64,INTEGRA1:def 7;
        now
          let x be set;
          assume x in divset(T.k,i);
          then |.f.x-g.x.| <= lower_bound (rng (H1|divset(T.k,i))) by A68,A69;
          hence |.g.x-f.x.| <= lower_bound rng(H1|divset(T.k,i)) by
COMPLEX1:60;
        end;
        then lower_bound rng(H0|divset(T.k,i)) - lower_bound rng(Hn|divset(T.
        k,i)) <= lower_bound rng(H1|divset(T.k,i)) by A73,A74,Th2;
        then (R2-R1).i <= lower_bound rng(H1|divset(T.k,i)) * vol divset(T.k,
        i) by A71,A66,XREAL_1:64;
        hence thesis by A64,INTEGRA1:def 7;
      end;
      lower_sum(Hn,T).k-lower_sum(H0,T).k = lower_sum(Hn,T.k)-lower_sum(
      H0,T).k by INTEGRA2:def 3;
      then lower_sum(Hn,T).k-lower_sum(H0,T).k =lower_sum(Hn,T.k)-lower_sum(
      H0,T.k) by INTEGRA2:def 3;
      then
A75:  lower_sum(Hn,T).k-lower_sum(H0,T).k = Sum(R1-R2) by RVSUM_1:90;
A76:  vol AB = b-a by A1,INTEGRA6:5;
      upper_bound rng H1 = e by A57,SEQ_4:9;
      then upper_sum(H1,T.k) <= e*(b-a) by A58,A76,INTEGRA1:27;
      then
A77:  lower_sum(H1,T.k) <= e*(b-a) by A59,XXREAL_0:2;
      lower_sum(H0,T).k-lower_sum(Hn,T).k =lower_sum(H0,T.k)-lower_sum(
      Hn,T).k by INTEGRA2:def 3;
      then lower_sum(H0,T).k-lower_sum(Hn,T).k =lower_sum(H0,T.k)-lower_sum(
      Hn,T.k) by INTEGRA2:def 3;
      then
A78:  lower_sum(H0,T).k-lower_sum(Hn,T).k =Sum(R2-R1) by RVSUM_1:90;
A79:  Seg l0 = dom Tk by FINSEQ_1:def 3;
      then for i be Nat st i in Seg l0 holds (R2-R1).i <= R3.i by A61;
      then lower_sum(H0,T).k-lower_sum(Hn,T).k <= Sum R3 by A78,RVSUM_1:82;
      then lower_sum(H0,T).k-lower_sum(Hn,T).k <= e*(b-a) by A77,XXREAL_0:2;
      then
A80:  -e*(b-a) <= -(lower_sum(H0,T).k - lower_sum((H.n)||AB,T).k) by XREAL_1:24
;
      for i be Nat st i in Seg l0 holds (R1-R2).i <= R3.i by A79,A61;
      then lower_sum(Hn,T).k-lower_sum(H0,T).k <=lower_sum(H1,T.k) by A75,
RVSUM_1:82;
      then lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k <= e*(b-a) by A77,
XXREAL_0:2;
      hence |.lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k.| <=e*(b-a) by A80,
ABSVALUE:5;
    end;
  end;
A81: for e be Real st 0 < e ex N be Element of NAT st for n,k be
Element of NAT st N<=n holds |.lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k.| <=
  e
  proof
    let e be Real;
    assume 0 < e;
    then consider N be Element of NAT such that
A82: for n,k be Element of NAT st N <= n holds |.lower_sum((H.n)||
    AB,T).k-lower_sum(H0,T).k.| <=(e/(b-a)) * (b-a) by A55,A9,XREAL_1:139;
    take N;
    hereby
      let n,k be Element of NAT;
      assume N<=n;
      then |.lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k.| <=(e/(b-a)) * (b-a
      ) by A82;
      hence |.lower_sum((H.n)||AB,T).k-lower_sum(H0,T).k.| <= e by A9,
XCMPLX_1:87;
    end;
  end;
A83: for e be Real st 0 < e ex N be Element of NAT st for n be
Element of NAT st N<=n holds |.lower_integral((H.n)||AB) -lower_integral(lim(
  H,AB)||AB ).| <=e
  proof
    let e be Real;
    assume 0 < e;
    then consider N be Element of NAT such that
A84: for n,k be Element of NAT st N<=n holds |.lower_sum((H.n)||AB,
    T).k-lower_sum(H0,T).k.| <=e by A81;
    take N;
    hereby
      let n be Element of NAT;
      set LHT = lower_sum((H.n)||AB,T);
      assume
A85:  N<=n;
A86:  now
        let k be Nat;
        k in NAT by ORDINAL1:def 12;
        then |.LHT.k - lower_sum(H0,T).k.| <=e by A84,A85;
        then |.LHT.k + (-lower_sum(H0,T)).k.| <= e by SEQ_1:10;
        then |.(LHT + -lower_sum(H0,T)).k.| <= e by SEQ_1:7;
        hence abs(LHT - lower_sum(H0,T)).k <= e by SEQ_1:12;
      end;
A87:  LHT is convergent by A7;
      then lim(LHT - lower_sum(H0,T)) = lim LHT -lim lower_sum(H0,T) by A54,
SEQ_2:12;
      then lim(LHT - lower_sum(H0,T)) = lower_integral((H.n)||AB) -lim
      lower_sum(H0,T) by A7;
      then
A88:  lim(LHT - lower_sum(H0,T)) = lower_integral((H.n)||AB) -
      lower_integral(lim(H,AB)||AB) by A4,A19,A20,A13,INTEGRA4:8;
A89:  LHT - lower_sum(H0,T) is convergent by A54,A87;
      then |.LHT - lower_sum(H0,T).| is convergent by SEQ_4:13;
      then lim |.LHT - lower_sum(H0,T).| <= e by A86,PREPOWER:2;
      hence
      |.lower_integral((H.n)||AB) - lower_integral(lim(H,AB)||AB ).| <=e
      by A88,A89,SEQ_4:14;
    end;
  end;
A90: now
    let e1 be Real;
    set e=e1/2;
    assume
A91: 0 < e1;
    then
A92: 0 < e1/2 by XREAL_1:215;
    then consider N1 be Element of NAT such that
A93: for n be Element of NAT st N1<=n holds |.upper_integral((H.n)
    ||AB) -upper_integral(lim(H,AB)||AB ).| <=e/2 by A46,XREAL_1:215;
    consider N2 be Element of NAT such that
A94: for n be Element of NAT st N2<=n holds |.lower_integral((H.n)
    ||AB) -lower_integral(lim(H,AB)||AB ).| <=e/2 by A83,A92,XREAL_1:215;
    reconsider n=max(N1,N2) as Element of NAT;
    set K = upper_integral((H.n)||AB);
    set L = lower_integral((H.n)||AB);
    |.L - L1.| <=e/2 by A94,XXREAL_0:25; then
A95: |.K - L1.| <= e/2 by A7;
    (K - K1) - (K - L1) = L1 - K1;
    then
A96: |.L1 - K1.| <= |.K - K1.| + |.K - L1.| by COMPLEX1:57;
    |.K - K1.| <=e/2 by A93,XXREAL_0:25;
    then |.K - K1.| + |.K-L1.| <= e/2+e/2 by A95,XREAL_1:7;
    then
A97: |.L1 - K1.| <= e by A96,XXREAL_0:2;
    e1/2 < e1 by A91,XREAL_1:216;
    hence |.L1 - K1.| < e1 by A97,XXREAL_0:2;
  end;
A98: K1 = L1 by COMPLEX1:62,A90;
  H0 is upper_integrable & H0 is lower_integrable by A19,A20,A13,INTEGRA4:10;
  then lim(H,AB)||AB is integrable by A98;
  hence lim(H,AB) is_integrable_on AB;
A99: for p be Real st 0<p ex n be Nat st
   for m be Nat st n<=m holds |.rseq.m-integral(lim(H,AB),a,b).|<p
  proof
    let p be Real;
    set e=p/2;
    assume
A100: 0<p;
    then consider N be Element of NAT such that
A101: for n be Element of NAT st N<=n holds |.upper_integral((H.n)||
    AB) -upper_integral(lim(H,AB)||AB ).| <=e by A46,XREAL_1:215;
    take N;
A102: p/2 < p by A100,XREAL_1:216;
    hereby
      let n be Nat;
A103:    n in NAT by ORDINAL1:def 12;
      upper_integral((H.n)||AB) = integral((H.n)||AB);
      then
A104: upper_integral((H.n)||AB) = rseq.n by A7,A103;
      upper_integral(lim(H,AB)||AB) = integral(lim(H,AB),AB);
      then
A105: upper_integral
(lim(H,AB)||AB) = integral(lim(H,AB),a,b) by A1,INTEGRA5:def 4;
      assume N<=n;
      then |.upper_integral((H.n)||AB) - upper_integral(lim(H,AB)||AB).| <=e
      by A101,A103;
      hence |.rseq.n - integral(lim(H,AB),a,b).| < p by A102,A104,A105,
        XXREAL_0:2;
    end;
  end;
  hence rseq is convergent by SEQ_2:def 6;
  hence thesis by A99,SEQ_2:def 7;
end;
