:: INTEGRA1 semantic presentation begin registration cluster closed_interval -> compact for Element of bool REAL; coherence for b1 being Subset of REAL st b1 is closed_interval holds b1 is compact proof let IT be Subset of REAL; ::_thesis: ( IT is closed_interval implies IT is compact ) assume IT is closed_interval ; ::_thesis: IT is compact then ex a, b being real number st IT = [.a,b.] by MEASURE5:def_3; hence IT is compact by RCOMP_1:6; ::_thesis: verum end; end; theorem :: INTEGRA1:1 canceled; theorem :: INTEGRA1:2 canceled; theorem Th3: :: INTEGRA1:3 for A being non empty closed_interval Subset of REAL holds ( A is bounded_below & A is bounded_above ) proof let A be non empty closed_interval Subset of REAL; ::_thesis: ( A is bounded_below & A is bounded_above ) A is real-bounded by RCOMP_1:10; hence ( A is bounded_below & A is bounded_above ) ; ::_thesis: verum end; registration cluster non empty closed_interval -> real-bounded for Element of bool REAL; coherence for b1 being Subset of REAL st not b1 is empty & b1 is closed_interval holds b1 is real-bounded proof let A be Subset of REAL; ::_thesis: ( not A is empty & A is closed_interval implies A is real-bounded ) assume ( not A is empty & A is closed_interval ) ; ::_thesis: A is real-bounded hence ( A is bounded_below & A is bounded_above ) by Th3; :: according to XXREAL_2:def_11 ::_thesis: verum end; end; theorem Th4: :: INTEGRA1:4 for A being non empty closed_interval Subset of REAL holds A = [.(lower_bound A),(upper_bound A).] proof let A be non empty closed_interval Subset of REAL; ::_thesis: A = [.(lower_bound A),(upper_bound A).] consider a, b being Real such that A1: a <= b and A2: A = [.a,b.] by MEASURE5:14; A3: for y being real number st 0 < y holds ex x being real number st ( x in A & b - y < x ) proof let y be real number ; ::_thesis: ( 0 < y implies ex x being real number st ( x in A & b - y < x ) ) assume A4: 0 < y ; ::_thesis: ex x being real number st ( x in A & b - y < x ) take b ; ::_thesis: ( b in A & b - y < b ) b < b + y by A4, XREAL_1:29; then b - y < (b + y) - y by XREAL_1:9; hence ( b in A & b - y < b ) by A1, A2, XXREAL_1:1; ::_thesis: verum end; A5: for x being real number st x in A holds x <= b proof let x be real number ; ::_thesis: ( x in A implies x <= b ) assume A6: x in A ; ::_thesis: x <= b A = { y where y is Real : ( a <= y & y <= b ) } by A2, RCOMP_1:def_1; then ex y being Real st ( x = y & a <= y & y <= b ) by A6; hence x <= b ; ::_thesis: verum end; A7: for x being real number st x in A holds a <= x proof let x be real number ; ::_thesis: ( x in A implies a <= x ) assume A8: x in A ; ::_thesis: a <= x A = { y where y is Real : ( a <= y & y <= b ) } by A2, RCOMP_1:def_1; then ex y being Real st ( x = y & a <= y & y <= b ) by A8; hence a <= x ; ::_thesis: verum end; for y being real number st 0 < y holds ex x being real number st ( x in A & x < a + y ) proof let y be real number ; ::_thesis: ( 0 < y implies ex x being real number st ( x in A & x < a + y ) ) assume A9: 0 < y ; ::_thesis: ex x being real number st ( x in A & x < a + y ) take a ; ::_thesis: ( a in A & a < a + y ) thus ( a in A & a < a + y ) by A1, A2, A9, XREAL_1:29, XXREAL_1:1; ::_thesis: verum end; then a = lower_bound A by A7, SEQ_4:def_2; hence A = [.(lower_bound A),(upper_bound A).] by A2, A5, A3, SEQ_4:def_1; ::_thesis: verum end; theorem Th5: :: INTEGRA1:5 for A being non empty closed_interval Subset of REAL for a1, a2, b1, b2 being real number st A = [.a1,b1.] & A = [.a2,b2.] holds ( a1 = a2 & b1 = b2 ) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for a1, a2, b1, b2 being real number st A = [.a1,b1.] & A = [.a2,b2.] holds ( a1 = a2 & b1 = b2 ) let a1, a2, b1, b2 be real number ; ::_thesis: ( A = [.a1,b1.] & A = [.a2,b2.] implies ( a1 = a2 & b1 = b2 ) ) assume that A1: A = [.a1,b1.] and A2: A = [.a2,b2.] ; ::_thesis: ( a1 = a2 & b1 = b2 ) a1 <= b1 by A1, XXREAL_1:29; hence ( a1 = a2 & b1 = b2 ) by A1, A2, XXREAL_1:66; ::_thesis: verum end; begin definition canceled; let A be non empty compact Subset of REAL; mode Division of A -> non empty increasing FinSequence of REAL means :Def2: :: INTEGRA1:def 2 ( rng it c= A & it . (len it) = upper_bound A ); existence ex b1 being non empty increasing FinSequence of REAL st ( rng b1 c= A & b1 . (len b1) = upper_bound A ) proof set a = upper_bound A; reconsider p = (Seg 1) --> (upper_bound A) as Function of (Seg 1),REAL by FUNCOP_1:45; A1: dom p = Seg 1 by FUNCOP_1:13; rng p c= REAL ; then reconsider p = p as FinSequence of REAL by FINSEQ_1:def_4; A2: 1 in Seg 1 by FINSEQ_1:2, TARSKI:def_1; for n, m being Element of NAT st n in dom p & m in dom p & n < m holds p . n < p . m proof let n, m be Element of NAT ; ::_thesis: ( n in dom p & m in dom p & n < m implies p . n < p . m ) assume that A3: n in dom p and A4: m in dom p ; ::_thesis: ( not n < m or p . n < p . m ) n = 1 by A1, A3, FINSEQ_1:2, TARSKI:def_1; hence ( not n < m or p . n < p . m ) by A1, A4, FINSEQ_1:2, TARSKI:def_1; ::_thesis: verum end; then A5: p is non empty increasing FinSequence of REAL by SEQM_3:def_1; upper_bound A in A by RCOMP_1:14; then for n being Nat st n in Seg 1 holds p . n in A by FUNCOP_1:7; then p is FinSequence of A by A1, FINSEQ_2:12; then A6: rng p c= A by FINSEQ_1:def_4; len p = 1 by A1, FINSEQ_1:def_3; then p . (len p) = upper_bound A by A2, FUNCOP_1:7; hence ex b1 being non empty increasing FinSequence of REAL st ( rng b1 c= A & b1 . (len b1) = upper_bound A ) by A6, A5; ::_thesis: verum end; end; :: deftheorem INTEGRA1:def_1_:_ canceled; :: deftheorem Def2 defines Division INTEGRA1:def_2_:_ for A being non empty compact Subset of REAL for b2 being non empty increasing FinSequence of REAL holds ( b2 is Division of A iff ( rng b2 c= A & b2 . (len b2) = upper_bound A ) ); definition let A be non empty compact Subset of REAL; func divs A -> set means :Def3: :: INTEGRA1:def 3 for x1 being set holds ( x1 in it iff x1 is Division of A ); existence ex b1 being set st for x1 being set holds ( x1 in b1 iff x1 is Division of A ) proof defpred S1[ set ] means $1 is Division of A; consider R being set such that A1: for x1 being set holds ( x1 in R iff ( x1 in bool [:NAT,REAL:] & S1[x1] ) ) from XBOOLE_0:sch_1(); take R ; ::_thesis: for x1 being set holds ( x1 in R iff x1 is Division of A ) let x1 be set ; ::_thesis: ( x1 in R iff x1 is Division of A ) thus ( x1 in R implies x1 is Division of A ) by A1; ::_thesis: ( x1 is Division of A implies x1 in R ) assume x1 is Division of A ; ::_thesis: x1 in R then reconsider p = x1 as Division of A ; p c= [:NAT,REAL:] ; hence x1 in R by A1; ::_thesis: verum end; uniqueness for b1, b2 being set st ( for x1 being set holds ( x1 in b1 iff x1 is Division of A ) ) & ( for x1 being set holds ( x1 in b2 iff x1 is Division of A ) ) holds b1 = b2 proof let D1, D2 be set ; ::_thesis: ( ( for x1 being set holds ( x1 in D1 iff x1 is Division of A ) ) & ( for x1 being set holds ( x1 in D2 iff x1 is Division of A ) ) implies D1 = D2 ) assume that A2: for x1 being set holds ( x1 in D1 iff x1 is Division of A ) and A3: for x1 being set holds ( x1 in D2 iff x1 is Division of A ) ; ::_thesis: D1 = D2 now__::_thesis:_for_x1_being_set_holds_ (_(_x1_in_D1_implies_x1_in_D2_)_&_(_x1_in_D2_implies_x1_in_D1_)_) let x1 be set ; ::_thesis: ( ( x1 in D1 implies x1 in D2 ) & ( x1 in D2 implies x1 in D1 ) ) thus ( x1 in D1 implies x1 in D2 ) ::_thesis: ( x1 in D2 implies x1 in D1 ) proof assume x1 in D1 ; ::_thesis: x1 in D2 then x1 is Division of A by A2; hence x1 in D2 by A3; ::_thesis: verum end; assume x1 in D2 ; ::_thesis: x1 in D1 then x1 is Division of A by A3; hence x1 in D1 by A2; ::_thesis: verum end; hence D1 = D2 by TARSKI:1; ::_thesis: verum end; end; :: deftheorem Def3 defines divs INTEGRA1:def_3_:_ for A being non empty compact Subset of REAL for b2 being set holds ( b2 = divs A iff for x1 being set holds ( x1 in b2 iff x1 is Division of A ) ); registration let A be non empty compact Subset of REAL; cluster divs A -> non empty ; coherence not divs A is empty proof the Division of A in divs A by Def3; hence not divs A is empty ; ::_thesis: verum end; end; registration let A be non empty compact Subset of REAL; cluster -> Relation-like Function-like for Element of divs A; coherence for b1 being Element of divs A holds ( b1 is Function-like & b1 is Relation-like ) by Def3; end; registration let A be non empty compact Subset of REAL; cluster -> FinSequence-like real-valued for Element of divs A; coherence for b1 being Element of divs A holds ( b1 is real-valued & b1 is FinSequence-like ) by Def3; end; theorem Th6: :: INTEGRA1:6 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds D . i in A proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds D . i in A let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D holds D . i in A let D be Division of A; ::_thesis: ( i in dom D implies D . i in A ) assume i in dom D ; ::_thesis: D . i in A then A1: D . i in rng D by FUNCT_1:def_3; rng D c= A by Def2; hence D . i in A by A1; ::_thesis: verum end; theorem Th7: :: INTEGRA1:7 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & i <> 1 holds ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & i <> 1 holds ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D & i <> 1 holds ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) let D be Division of A; ::_thesis: ( i in dom D & i <> 1 implies ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) ) assume that A1: i in dom D and A2: i <> 1 ; ::_thesis: ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) consider j being Nat such that A3: dom D = Seg j by FINSEQ_1:def_2; i <> 0 by A1, A3, FINSEQ_1:1; then A4: not i is trivial by A2, NAT_2:def_1; then consider l being Nat such that A5: i = 2 + l by NAT_1:10, NAT_2:29; reconsider l = l as Element of NAT by ORDINAL1:def_12; i >= 2 by A4, NAT_2:29; then A6: (1 + 1) - 1 <= i - 1 by XREAL_1:9; i <= j by A1, A3, FINSEQ_1:1; then A7: i - 1 <= j - 0 by XREAL_1:13; A8: rng D c= A by Def2; A9: l + 1 = i - (2 - 1) by A5; then i - 1 in dom D by A3, A6, A7, FINSEQ_1:1; then D . (i - 1) in rng D by FUNCT_1:def_3; hence ( i - 1 in dom D & D . (i - 1) in A & i - 1 in NAT ) by A3, A6, A7, A9, A8, FINSEQ_1:1; ::_thesis: verum end; definition let A be non empty closed_interval Subset of REAL; let D be Division of A; let i be Nat; assume A1: i in dom D ; func divset (D,i) -> non empty closed_interval Subset of REAL means :Def4: :: INTEGRA1:def 4 ( lower_bound it = lower_bound A & upper_bound it = D . i ) if i = 1 otherwise ( lower_bound it = D . (i - 1) & upper_bound it = D . i ); existence ( ( i = 1 implies ex b1 being non empty closed_interval Subset of REAL st ( lower_bound b1 = lower_bound A & upper_bound b1 = D . i ) ) & ( not i = 1 implies ex b1 being non empty closed_interval Subset of REAL st ( lower_bound b1 = D . (i - 1) & upper_bound b1 = D . i ) ) ) proof hereby ::_thesis: ( not i = 1 implies ex b1 being non empty closed_interval Subset of REAL st ( lower_bound b1 = D . (i - 1) & upper_bound b1 = D . i ) ) assume i = 1 ; ::_thesis: ex IT being non empty closed_interval Subset of REAL st ( lower_bound IT = lower_bound A & upper_bound IT = D . i ) thus ex IT being non empty closed_interval Subset of REAL st ( lower_bound IT = lower_bound A & upper_bound IT = D . i ) ::_thesis: verum proof consider I being Subset of REAL such that A2: I = [.(lower_bound A),(D . i).] ; D . i in A by A1, Th6; then lower_bound A <= D . i by SEQ_4:def_2; then A3: I is non empty closed_interval Subset of REAL by A2, MEASURE5:14; then A4: I = [.(lower_bound I),(upper_bound I).] by Th4; then A5: upper_bound I = D . i by A2, A3, Th5; lower_bound I = lower_bound A by A2, A3, A4, Th5; hence ex IT being non empty closed_interval Subset of REAL st ( lower_bound IT = lower_bound A & upper_bound IT = D . i ) by A3, A5; ::_thesis: verum end; end; assume A6: i <> 1 ; ::_thesis: ex b1 being non empty closed_interval Subset of REAL st ( lower_bound b1 = D . (i - 1) & upper_bound b1 = D . i ) thus ex IT being non empty closed_interval Subset of REAL st ( lower_bound IT = D . (i - 1) & upper_bound IT = D . i ) ::_thesis: verum proof reconsider j = i - 1 as Element of NAT by A1, A6, Th7; A7: i + (- 1) < i + (1 + (- 1)) by XREAL_1:6; consider a1, b1 being Real such that A8: a1 = D . (i - 1) and A9: b1 = D . i ; consider I being Subset of REAL such that A10: I = [.a1,b1.] ; i - 1 in dom D by A1, A6, Th7; then D . j < D . i by A1, A7, SEQM_3:def_1; then A11: I is non empty closed_interval Subset of REAL by A8, A9, A10, MEASURE5:14; then A12: I = [.(lower_bound I),(upper_bound I).] by Th4; then A13: upper_bound I = D . i by A9, A10, A11, Th5; lower_bound I = D . (i - 1) by A8, A10, A11, A12, Th5; hence ex IT being non empty closed_interval Subset of REAL st ( lower_bound IT = D . (i - 1) & upper_bound IT = D . i ) by A11, A13; ::_thesis: verum end; end; uniqueness for b1, b2 being non empty closed_interval Subset of REAL holds ( ( i = 1 & lower_bound b1 = lower_bound A & upper_bound b1 = D . i & lower_bound b2 = lower_bound A & upper_bound b2 = D . i implies b1 = b2 ) & ( not i = 1 & lower_bound b1 = D . (i - 1) & upper_bound b1 = D . i & lower_bound b2 = D . (i - 1) & upper_bound b2 = D . i implies b1 = b2 ) ) proof let A1, A2 be non empty closed_interval Subset of REAL; ::_thesis: ( ( i = 1 & lower_bound A1 = lower_bound A & upper_bound A1 = D . i & lower_bound A2 = lower_bound A & upper_bound A2 = D . i implies A1 = A2 ) & ( not i = 1 & lower_bound A1 = D . (i - 1) & upper_bound A1 = D . i & lower_bound A2 = D . (i - 1) & upper_bound A2 = D . i implies A1 = A2 ) ) hereby ::_thesis: ( not i = 1 & lower_bound A1 = D . (i - 1) & upper_bound A1 = D . i & lower_bound A2 = D . (i - 1) & upper_bound A2 = D . i implies A1 = A2 ) consider b being Real such that A14: b = D . i ; assume that i = 1 and A15: lower_bound A1 = lower_bound A and A16: upper_bound A1 = D . i and A17: lower_bound A2 = lower_bound A and A18: upper_bound A2 = D . i ; ::_thesis: A1 = A2 A1 = [.(lower_bound A),b.] by A15, A16, A14, Th4; hence A1 = A2 by A17, A18, A14, Th4; ::_thesis: verum end; assume that i <> 1 and A19: lower_bound A1 = D . (i - 1) and A20: upper_bound A1 = D . i and A21: lower_bound A2 = D . (i - 1) and A22: upper_bound A2 = D . i ; ::_thesis: A1 = A2 consider a, b being Real such that A23: a = D . (i - 1) and A24: b = D . i ; A1 = [.a,b.] by A19, A20, A23, A24, Th4; hence A1 = A2 by A21, A22, A23, A24, Th4; ::_thesis: verum end; correctness consistency for b1 being non empty closed_interval Subset of REAL holds verum; ; end; :: deftheorem Def4 defines divset INTEGRA1:def_4_:_ for A being non empty closed_interval Subset of REAL for D being Division of A for i being Nat st i in dom D holds for b4 being non empty closed_interval Subset of REAL holds ( ( i = 1 implies ( b4 = divset (D,i) iff ( lower_bound b4 = lower_bound A & upper_bound b4 = D . i ) ) ) & ( not i = 1 implies ( b4 = divset (D,i) iff ( lower_bound b4 = D . (i - 1) & upper_bound b4 = D . i ) ) ) ); theorem Th8: :: INTEGRA1:8 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds divset (D,i) c= A proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds divset (D,i) c= A let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D holds divset (D,i) c= A let D be Division of A; ::_thesis: ( i in dom D implies divset (D,i) c= A ) assume A1: i in dom D ; ::_thesis: divset (D,i) c= A now__::_thesis:_divset_(D,i)_c=_A percases ( i = 1 or i <> 1 ) ; supposeA2: i = 1 ; ::_thesis: divset (D,i) c= A lower_bound A in A by RCOMP_1:14; then A3: lower_bound A in [.(lower_bound A),(upper_bound A).] by Th4; A4: lower_bound (divset (D,i)) = lower_bound A by A1, A2, Def4; consider b being Real such that A5: b = D . i ; upper_bound (divset (D,i)) = b by A1, A2, A5, Def4; then A6: divset (D,i) = [.(lower_bound A),b.] by A4, Th4; b in A by A1, A5, Th6; then b in [.(lower_bound A),(upper_bound A).] by Th4; then [.(lower_bound A),b.] c= [.(lower_bound A),(upper_bound A).] by A3, XXREAL_2:def_12; hence divset (D,i) c= A by A6, Th4; ::_thesis: verum end; supposeA7: i <> 1 ; ::_thesis: divset (D,i) c= A set b = D . i; D . i in A by A1, Th6; then A8: D . i in [.(lower_bound A),(upper_bound A).] by Th4; set a = D . (i - 1); D . (i - 1) in A by A1, A7, Th7; then D . (i - 1) in [.(lower_bound A),(upper_bound A).] by Th4; then A9: [.(D . (i - 1)),(D . i).] c= [.(lower_bound A),(upper_bound A).] by A8, XXREAL_2:def_12; A10: upper_bound (divset (D,i)) = D . i by A1, A7, Def4; lower_bound (divset (D,i)) = D . (i - 1) by A1, A7, Def4; then divset (D,i) = [.(D . (i - 1)),(D . i).] by A10, Th4; hence divset (D,i) c= A by A9, Th4; ::_thesis: verum end; end; end; hence divset (D,i) c= A ; ::_thesis: verum end; definition let A be Subset of REAL; func vol A -> Real equals :: INTEGRA1:def 5 (upper_bound A) - (lower_bound A); correctness coherence (upper_bound A) - (lower_bound A) is Real; ; end; :: deftheorem defines vol INTEGRA1:def_5_:_ for A being Subset of REAL holds vol A = (upper_bound A) - (lower_bound A); theorem :: INTEGRA1:9 for A being non empty real-bounded Subset of REAL holds 0 <= vol A by SEQ_4:11, XREAL_1:48; begin definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; let D be Division of A; func upper_volume (f,D) -> FinSequence of REAL means :Def6: :: INTEGRA1:def 6 ( len it = len D & ( for i being Nat st i in dom D holds it . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ); existence ex b1 being FinSequence of REAL st ( len b1 = len D & ( for i being Nat st i in dom D holds b1 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) proof deffunc H1( Nat) -> Element of REAL = (upper_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); consider IT being FinSequence of REAL such that A1: ( len IT = len D & ( for i being Nat st i in dom IT holds IT . i = H1(i) ) ) from FINSEQ_2:sch_1(); take IT ; ::_thesis: ( len IT = len D & ( for i being Nat st i in dom D holds IT . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) thus len IT = len D by A1; ::_thesis: for i being Nat st i in dom D holds IT . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) let i be Nat; ::_thesis: ( i in dom D implies IT . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) assume i in dom D ; ::_thesis: IT . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then i in dom IT by A1, FINSEQ_3:29; hence IT . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A1; ::_thesis: verum end; uniqueness for b1, b2 being FinSequence of REAL st len b1 = len D & ( for i being Nat st i in dom D holds b1 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) & len b2 = len D & ( for i being Nat st i in dom D holds b2 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) holds b1 = b2 proof let s1, s2 be FinSequence of REAL ; ::_thesis: ( len s1 = len D & ( for i being Nat st i in dom D holds s1 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) & len s2 = len D & ( for i being Nat st i in dom D holds s2 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) implies s1 = s2 ) assume that A2: len s1 = len D and A3: for i being Nat st i in dom D holds s1 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) and A4: len s2 = len D and A5: for i being Nat st i in dom D holds s2 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ; ::_thesis: s1 = s2 A6: dom s1 = dom D by A2, FINSEQ_3:29; for i being Nat st i in dom s1 holds s1 . i = s2 . i proof let i be Nat; ::_thesis: ( i in dom s1 implies s1 . i = s2 . i ) assume A7: i in dom s1 ; ::_thesis: s1 . i = s2 . i then s1 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A3, A6; hence s1 . i = s2 . i by A5, A6, A7; ::_thesis: verum end; hence s1 = s2 by A2, A4, FINSEQ_2:9; ::_thesis: verum end; func lower_volume (f,D) -> FinSequence of REAL means :Def7: :: INTEGRA1:def 7 ( len it = len D & ( for i being Nat st i in dom D holds it . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ); existence ex b1 being FinSequence of REAL st ( len b1 = len D & ( for i being Nat st i in dom D holds b1 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) proof deffunc H1( Nat) -> Element of REAL = (lower_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); consider IT being FinSequence of REAL such that A8: ( len IT = len D & ( for i being Nat st i in dom IT holds IT . i = H1(i) ) ) from FINSEQ_2:sch_1(); take IT ; ::_thesis: ( len IT = len D & ( for i being Nat st i in dom D holds IT . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) thus len IT = len D by A8; ::_thesis: for i being Nat st i in dom D holds IT . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) let i be Nat; ::_thesis: ( i in dom D implies IT . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) assume i in dom D ; ::_thesis: IT . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then i in dom IT by A8, FINSEQ_3:29; hence IT . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A8; ::_thesis: verum end; uniqueness for b1, b2 being FinSequence of REAL st len b1 = len D & ( for i being Nat st i in dom D holds b1 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) & len b2 = len D & ( for i being Nat st i in dom D holds b2 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) holds b1 = b2 proof let s1, s2 be FinSequence of REAL ; ::_thesis: ( len s1 = len D & ( for i being Nat st i in dom D holds s1 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) & len s2 = len D & ( for i being Nat st i in dom D holds s2 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) implies s1 = s2 ) assume that A9: len s1 = len D and A10: for i being Nat st i in dom D holds s1 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) and A11: len s2 = len D and A12: for i being Nat st i in dom D holds s2 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ; ::_thesis: s1 = s2 A13: dom s1 = dom D by A9, FINSEQ_3:29; for i being Nat st i in dom s1 holds s1 . i = s2 . i proof let i be Nat; ::_thesis: ( i in dom s1 implies s1 . i = s2 . i ) assume A14: i in dom s1 ; ::_thesis: s1 . i = s2 . i then s1 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A10, A13; hence s1 . i = s2 . i by A12, A13, A14; ::_thesis: verum end; hence s1 = s2 by A9, A11, FINSEQ_2:9; ::_thesis: verum end; end; :: deftheorem Def6 defines upper_volume INTEGRA1:def_6_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for D being Division of A for b4 being FinSequence of REAL holds ( b4 = upper_volume (f,D) iff ( len b4 = len D & ( for i being Nat st i in dom D holds b4 . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) ); :: deftheorem Def7 defines lower_volume INTEGRA1:def_7_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for D being Division of A for b4 being FinSequence of REAL holds ( b4 = lower_volume (f,D) iff ( len b4 = len D & ( for i being Nat st i in dom D holds b4 . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) ) ); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; let D be Division of A; func upper_sum (f,D) -> Real equals :: INTEGRA1:def 8 Sum (upper_volume (f,D)); correctness coherence Sum (upper_volume (f,D)) is Real; ; func lower_sum (f,D) -> Real equals :: INTEGRA1:def 9 Sum (lower_volume (f,D)); correctness coherence Sum (lower_volume (f,D)) is Real; ; end; :: deftheorem defines upper_sum INTEGRA1:def_8_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for D being Division of A holds upper_sum (f,D) = Sum (upper_volume (f,D)); :: deftheorem defines lower_sum INTEGRA1:def_9_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for D being Division of A holds lower_sum (f,D) = Sum (lower_volume (f,D)); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; set S = divs A; func upper_sum_set f -> Function of (divs A),REAL means :Def10: :: INTEGRA1:def 10 for D being Division of A holds it . D = upper_sum (f,D); existence ex b1 being Function of (divs A),REAL st for D being Division of A holds b1 . D = upper_sum (f,D) proof defpred S1[ Element of divs A, set ] means ex D being Division of A st ( D = $1 & $2 = upper_sum (f,D) ); A1: for x being Element of divs A ex y being Element of REAL st S1[x,y] proof let x be Element of divs A; ::_thesis: ex y being Element of REAL st S1[x,y] reconsider x = x as Division of A by Def3; take upper_sum (f,x) ; ::_thesis: S1[x, upper_sum (f,x)] thus S1[x, upper_sum (f,x)] ; ::_thesis: verum end; consider g being Function of (divs A),REAL such that A2: for x being Element of divs A holds S1[x,g . x] from FUNCT_2:sch_3(A1); take g ; ::_thesis: for D being Division of A holds g . D = upper_sum (f,D) let D be Division of A; ::_thesis: g . D = upper_sum (f,D) reconsider D1 = D as Element of divs A by Def3; S1[D1,g . D1] by A2; hence g . D = upper_sum (f,D) ; ::_thesis: verum end; uniqueness for b1, b2 being Function of (divs A),REAL st ( for D being Division of A holds b1 . D = upper_sum (f,D) ) & ( for D being Division of A holds b2 . D = upper_sum (f,D) ) holds b1 = b2 proof let g1, g2 be Function of (divs A),REAL; ::_thesis: ( ( for D being Division of A holds g1 . D = upper_sum (f,D) ) & ( for D being Division of A holds g2 . D = upper_sum (f,D) ) implies g1 = g2 ) assume that A3: for D being Division of A holds g1 . D = upper_sum (f,D) and A4: for D being Division of A holds g2 . D = upper_sum (f,D) ; ::_thesis: g1 = g2 let a be Element of divs A; :: according to FUNCT_2:def_8 ::_thesis: g1 . a = g2 . a reconsider d = a as Division of A by Def3; thus g1 . a = upper_sum (f,d) by A3 .= g2 . a by A4 ; ::_thesis: verum end; func lower_sum_set f -> Function of (divs A),REAL means :Def11: :: INTEGRA1:def 11 for D being Division of A holds it . D = lower_sum (f,D); existence ex b1 being Function of (divs A),REAL st for D being Division of A holds b1 . D = lower_sum (f,D) proof defpred S1[ Element of divs A, set ] means ex D being Division of A st ( D = $1 & $2 = lower_sum (f,D) ); A5: for x being Element of divs A ex y being Element of REAL st S1[x,y] proof let x be Element of divs A; ::_thesis: ex y being Element of REAL st S1[x,y] reconsider x = x as Division of A by Def3; take lower_sum (f,x) ; ::_thesis: S1[x, lower_sum (f,x)] thus S1[x, lower_sum (f,x)] ; ::_thesis: verum end; consider g being Function of (divs A),REAL such that A6: for x being Element of divs A holds S1[x,g . x] from FUNCT_2:sch_3(A5); take g ; ::_thesis: for D being Division of A holds g . D = lower_sum (f,D) let D be Division of A; ::_thesis: g . D = lower_sum (f,D) reconsider D1 = D as Element of divs A by Def3; S1[D1,g . D1] by A6; hence g . D = lower_sum (f,D) ; ::_thesis: verum end; uniqueness for b1, b2 being Function of (divs A),REAL st ( for D being Division of A holds b1 . D = lower_sum (f,D) ) & ( for D being Division of A holds b2 . D = lower_sum (f,D) ) holds b1 = b2 proof let g1, g2 be Function of (divs A),REAL; ::_thesis: ( ( for D being Division of A holds g1 . D = lower_sum (f,D) ) & ( for D being Division of A holds g2 . D = lower_sum (f,D) ) implies g1 = g2 ) assume that A7: for D being Division of A holds g1 . D = lower_sum (f,D) and A8: for D being Division of A holds g2 . D = lower_sum (f,D) ; ::_thesis: g1 = g2 let a be Element of divs A; :: according to FUNCT_2:def_8 ::_thesis: g1 . a = g2 . a reconsider d = a as Division of A by Def3; thus g1 . a = lower_sum (f,d) by A7 .= g2 . a by A8 ; ::_thesis: verum end; end; :: deftheorem Def10 defines upper_sum_set INTEGRA1:def_10_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for b3 being Function of (divs A),REAL holds ( b3 = upper_sum_set f iff for D being Division of A holds b3 . D = upper_sum (f,D) ); :: deftheorem Def11 defines lower_sum_set INTEGRA1:def_11_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL for b3 being Function of (divs A),REAL holds ( b3 = lower_sum_set f iff for D being Division of A holds b3 . D = lower_sum (f,D) ); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; attrf is upper_integrable means :Def12: :: INTEGRA1:def 12 rng (upper_sum_set f) is bounded_below ; attrf is lower_integrable means :Def13: :: INTEGRA1:def 13 rng (lower_sum_set f) is bounded_above ; end; :: deftheorem Def12 defines upper_integrable INTEGRA1:def_12_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds ( f is upper_integrable iff rng (upper_sum_set f) is bounded_below ); :: deftheorem Def13 defines lower_integrable INTEGRA1:def_13_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds ( f is lower_integrable iff rng (lower_sum_set f) is bounded_above ); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; func upper_integral f -> Real equals :: INTEGRA1:def 14 lower_bound (rng (upper_sum_set f)); correctness coherence lower_bound (rng (upper_sum_set f)) is Real; ; end; :: deftheorem defines upper_integral INTEGRA1:def_14_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds upper_integral f = lower_bound (rng (upper_sum_set f)); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; func lower_integral f -> Real equals :: INTEGRA1:def 15 upper_bound (rng (lower_sum_set f)); coherence upper_bound (rng (lower_sum_set f)) is Real ; end; :: deftheorem defines lower_integral INTEGRA1:def_15_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds lower_integral f = upper_bound (rng (lower_sum_set f)); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; attrf is integrable means :Def16: :: INTEGRA1:def 16 ( f is upper_integrable & f is lower_integrable & upper_integral f = lower_integral f ); end; :: deftheorem Def16 defines integrable INTEGRA1:def_16_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds ( f is integrable iff ( f is upper_integrable & f is lower_integrable & upper_integral f = lower_integral f ) ); definition let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; func integral f -> Real equals :: INTEGRA1:def 17 upper_integral f; coherence upper_integral f is Real ; end; :: deftheorem defines integral INTEGRA1:def_17_:_ for A being non empty closed_interval Subset of REAL for f being PartFunc of A,REAL holds integral f = upper_integral f; begin theorem Th10: :: INTEGRA1:10 for X being non empty set for f, g being PartFunc of X,REAL holds rng (f + g) c= (rng f) ++ (rng g) proof let X be non empty set ; ::_thesis: for f, g being PartFunc of X,REAL holds rng (f + g) c= (rng f) ++ (rng g) let f, g be PartFunc of X,REAL; ::_thesis: rng (f + g) c= (rng f) ++ (rng g) for y being set st y in rng (f + g) holds y in (rng f) ++ (rng g) proof let y be set ; ::_thesis: ( y in rng (f + g) implies y in (rng f) ++ (rng g) ) assume y in rng (f + g) ; ::_thesis: y in (rng f) ++ (rng g) then consider x1 being set such that A1: x1 in dom (f + g) and A2: y = (f + g) . x1 by FUNCT_1:def_3; A3: dom (f + g) = (dom f) /\ (dom g) by VALUED_1:def_1; then x1 in dom f by A1, XBOOLE_0:def_4; then A4: f . x1 in rng f by FUNCT_1:def_3; x1 in dom g by A1, A3, XBOOLE_0:def_4; then A5: g . x1 in rng g by FUNCT_1:def_3; (f + g) . x1 = (f . x1) + (g . x1) by A1, VALUED_1:def_1; hence y in (rng f) ++ (rng g) by A2, A4, A5, MEMBER_1:46; ::_thesis: verum end; hence rng (f + g) c= (rng f) ++ (rng g) by TARSKI:def_3; ::_thesis: verum end; theorem Th11: :: INTEGRA1:11 for X being non empty set for f being PartFunc of X,REAL st f | X is bounded_below holds rng f is bounded_below proof let X be non empty set ; ::_thesis: for f being PartFunc of X,REAL st f | X is bounded_below holds rng f is bounded_below let f be PartFunc of X,REAL; ::_thesis: ( f | X is bounded_below implies rng f is bounded_below ) assume f | X is bounded_below ; ::_thesis: rng f is bounded_below then consider a being real number such that A1: for x1 being set st x1 in X /\ (dom f) holds a <= f . x1 by RFUNCT_1:71; A2: X /\ (dom f) = dom f by XBOOLE_1:28; a is LowerBound of rng f proof let y be ext-real number ; :: according to XXREAL_2:def_2 ::_thesis: ( not y in rng f or a <= y ) assume y in rng f ; ::_thesis: a <= y then ex s being set st ( s in dom f & y = f . s ) by FUNCT_1:def_3; hence a <= y by A1, A2; ::_thesis: verum end; hence rng f is bounded_below by XXREAL_2:def_9; ::_thesis: verum end; theorem :: INTEGRA1:12 for X being non empty set for f being PartFunc of X,REAL st rng f is bounded_below holds f | X is bounded_below proof let X be non empty set ; ::_thesis: for f being PartFunc of X,REAL st rng f is bounded_below holds f | X is bounded_below let f be PartFunc of X,REAL; ::_thesis: ( rng f is bounded_below implies f | X is bounded_below ) assume rng f is bounded_below ; ::_thesis: f | X is bounded_below then consider a being real number such that A1: a is LowerBound of rng f by XXREAL_2:def_9; for x1 being set st x1 in X /\ (dom f) holds a <= f . x1 proof let x1 be set ; ::_thesis: ( x1 in X /\ (dom f) implies a <= f . x1 ) A2: X /\ (dom f) = dom f by XBOOLE_1:28; assume x1 in X /\ (dom f) ; ::_thesis: a <= f . x1 then f . x1 in rng f by A2, FUNCT_1:def_3; hence a <= f . x1 by A1, XXREAL_2:def_2; ::_thesis: verum end; hence f | X is bounded_below by RFUNCT_1:71; ::_thesis: verum end; theorem Th13: :: INTEGRA1:13 for X being non empty set for f being PartFunc of X,REAL st f | X is bounded_above holds rng f is bounded_above proof let X be non empty set ; ::_thesis: for f being PartFunc of X,REAL st f | X is bounded_above holds rng f is bounded_above let f be PartFunc of X,REAL; ::_thesis: ( f | X is bounded_above implies rng f is bounded_above ) assume f | X is bounded_above ; ::_thesis: rng f is bounded_above then consider a being real number such that A1: for x1 being set st x1 in X /\ (dom f) holds f . x1 <= a by RFUNCT_1:70; A2: X /\ (dom f) = dom f by XBOOLE_1:28; a is UpperBound of rng f proof let y be ext-real number ; :: according to XXREAL_2:def_1 ::_thesis: ( not y in rng f or y <= a ) assume y in rng f ; ::_thesis: y <= a then ex s being set st ( s in dom f & y = f . s ) by FUNCT_1:def_3; hence y <= a by A1, A2; ::_thesis: verum end; hence rng f is bounded_above by XXREAL_2:def_10; ::_thesis: verum end; theorem :: INTEGRA1:14 for X being non empty set for f being PartFunc of X,REAL st rng f is bounded_above holds f | X is bounded_above proof let X be non empty set ; ::_thesis: for f being PartFunc of X,REAL st rng f is bounded_above holds f | X is bounded_above let f be PartFunc of X,REAL; ::_thesis: ( rng f is bounded_above implies f | X is bounded_above ) assume rng f is bounded_above ; ::_thesis: f | X is bounded_above then consider a being real number such that A1: a is UpperBound of rng f by XXREAL_2:def_10; for x1 being set st x1 in X /\ (dom f) holds f . x1 <= a proof let x1 be set ; ::_thesis: ( x1 in X /\ (dom f) implies f . x1 <= a ) A2: X /\ (dom f) = dom f by XBOOLE_1:28; assume x1 in X /\ (dom f) ; ::_thesis: f . x1 <= a then f . x1 in rng f by A2, FUNCT_1:def_3; hence f . x1 <= a by A1, XXREAL_2:def_1; ::_thesis: verum end; hence f | X is bounded_above by RFUNCT_1:70; ::_thesis: verum end; theorem :: INTEGRA1:15 for X being non empty set for f being PartFunc of X,REAL st f | X is bounded holds rng f is real-bounded proof let X be non empty set ; ::_thesis: for f being PartFunc of X,REAL st f | X is bounded holds rng f is real-bounded let f be PartFunc of X,REAL; ::_thesis: ( f | X is bounded implies rng f is real-bounded ) assume A1: f | X is bounded ; ::_thesis: rng f is real-bounded then A2: rng f is bounded_above by Th13; rng f is bounded_below by A1, Th11; hence rng f is real-bounded by A2; ::_thesis: verum end; begin theorem Th16: :: INTEGRA1:16 for A being non empty set holds (chi (A,A)) | A is V8() proof let A be non empty set ; ::_thesis: (chi (A,A)) | A is V8() for x being Element of A st x in A /\ (dom (chi (A,A))) holds (chi (A,A)) /. x = 1 proof let x be Element of A; ::_thesis: ( x in A /\ (dom (chi (A,A))) implies (chi (A,A)) /. x = 1 ) assume x in A /\ (dom (chi (A,A))) ; ::_thesis: (chi (A,A)) /. x = 1 then A1: x in dom (chi (A,A)) by XBOOLE_0:def_4; (chi (A,A)) . x = 1 by FUNCT_3:def_3; hence (chi (A,A)) /. x = 1 by A1, PARTFUN1:def_6; ::_thesis: verum end; hence (chi (A,A)) | A is V8() by PARTFUN2:35; ::_thesis: verum end; theorem Th17: :: INTEGRA1:17 for X being non empty set for A being non empty Subset of X holds rng (chi (A,A)) = {1} proof let X be non empty set ; ::_thesis: for A being non empty Subset of X holds rng (chi (A,A)) = {1} let A be non empty Subset of X; ::_thesis: rng (chi (A,A)) = {1} A1: (chi (A,A)) | A is V8() by Th16; dom (chi (A,A)) = A by FUNCT_3:def_3; then A2: A = A /\ (dom (chi (A,A))) ; A3: dom (chi (A,A)) = A by FUNCT_3:def_3; ex x being Element of X st ( x in dom (chi (A,A)) & (chi (A,A)) . x = 1 ) proof consider x being Element of X such that A4: x in dom (chi (A,A)) by A3, SUBSET_1:4; take x ; ::_thesis: ( x in dom (chi (A,A)) & (chi (A,A)) . x = 1 ) thus ( x in dom (chi (A,A)) & (chi (A,A)) . x = 1 ) by A4, FUNCT_3:def_3; ::_thesis: verum end; then A5: 1 in rng (chi (A,A)) by FUNCT_1:def_3; A meets dom (chi (A,A)) by A2, XBOOLE_0:def_7; then ex y being Element of REAL st rng ((chi (A,A)) | A) = {y} by A1, PARTFUN2:37; hence rng (chi (A,A)) = {1} by A5, TARSKI:def_1; ::_thesis: verum end; theorem Th18: :: INTEGRA1:18 for X being non empty set for A being non empty Subset of X for B being set st B meets dom (chi (A,A)) holds rng ((chi (A,A)) | B) = {1} proof let X be non empty set ; ::_thesis: for A being non empty Subset of X for B being set st B meets dom (chi (A,A)) holds rng ((chi (A,A)) | B) = {1} let A be non empty Subset of X; ::_thesis: for B being set st B meets dom (chi (A,A)) holds rng ((chi (A,A)) | B) = {1} let B be set ; ::_thesis: ( B meets dom (chi (A,A)) implies rng ((chi (A,A)) | B) = {1} ) A1: dom ((chi (A,A)) | B) = B /\ (dom (chi (A,A))) by RELAT_1:61; rng ((chi (A,A)) | B) c= rng (chi (A,A)) by RELAT_1:70; then A2: rng ((chi (A,A)) | B) c= {1} by Th17; assume B /\ (dom (chi (A,A))) <> {} ; :: according to XBOOLE_0:def_7 ::_thesis: rng ((chi (A,A)) | B) = {1} then rng ((chi (A,A)) | B) <> {} by A1, RELAT_1:42; hence rng ((chi (A,A)) | B) = {1} by A2, ZFMISC_1:33; ::_thesis: verum end; theorem Th19: :: INTEGRA1:19 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D holds vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i let D be Division of A; ::_thesis: ( i in dom D implies vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i ) A1: dom (chi (A,A)) = A by FUNCT_3:def_3; assume A2: i in dom D ; ::_thesis: vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i then A3: (lower_volume ((chi (A,A)),D)) . i = (lower_bound (rng ((chi (A,A)) | (divset (D,i))))) * (vol (divset (D,i))) by Def7; divset (D,i) c= A by A2, Th8; then divset (D,i) c= (divset (D,i)) /\ (dom (chi (A,A))) by A1, XBOOLE_1:19; then (divset (D,i)) /\ (dom (chi (A,A))) <> {} ; then divset (D,i) meets dom (chi (A,A)) by XBOOLE_0:def_7; then A4: rng ((chi (A,A)) | (divset (D,i))) = {1} by Th18; A5: rng (chi (A,A)) = {1} by Th17; then lower_bound (rng (chi (A,A))) = 1 by SEQ_4:9; hence vol (divset (D,i)) = (lower_volume ((chi (A,A)),D)) . i by A3, A5, A4; ::_thesis: verum end; theorem Th20: :: INTEGRA1:20 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D holds vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i let D be Division of A; ::_thesis: ( i in dom D implies vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i ) A1: dom (chi (A,A)) = A by FUNCT_3:def_3; assume A2: i in dom D ; ::_thesis: vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i then A3: (upper_volume ((chi (A,A)),D)) . i = (upper_bound (rng ((chi (A,A)) | (divset (D,i))))) * (vol (divset (D,i))) by Def6; divset (D,i) c= A by A2, Th8; then divset (D,i) c= (divset (D,i)) /\ (dom (chi (A,A))) by A1, XBOOLE_1:19; then (divset (D,i)) /\ (dom (chi (A,A))) <> {} ; then divset (D,i) meets dom (chi (A,A)) by XBOOLE_0:def_7; then A4: rng ((chi (A,A)) | (divset (D,i))) = {1} by Th18; A5: rng (chi (A,A)) = {1} by Th17; then upper_bound (rng (chi (A,A))) = 1 by SEQ_4:9; hence vol (divset (D,i)) = (upper_volume ((chi (A,A)),D)) . i by A3, A5, A4; ::_thesis: verum end; theorem :: INTEGRA1:21 for F, G, H being FinSequence of REAL st len F = len G & len F = len H & ( for k being Element of NAT st k in dom F holds H . k = (F /. k) + (G /. k) ) holds Sum H = (Sum F) + (Sum G) proof let F, G, H be FinSequence of REAL ; ::_thesis: ( len F = len G & len F = len H & ( for k being Element of NAT st k in dom F holds H . k = (F /. k) + (G /. k) ) implies Sum H = (Sum F) + (Sum G) ) assume that A1: len F = len G and A2: len F = len H and A3: for k being Element of NAT st k in dom F holds H . k = (F /. k) + (G /. k) ; ::_thesis: Sum H = (Sum F) + (Sum G) A4: F is Element of (len F) -tuples_on REAL by FINSEQ_2:92; A5: G is Element of (len F) -tuples_on REAL by A1, FINSEQ_2:92; then F + G is Element of (len F) -tuples_on REAL by A4, FINSEQ_2:120; then A6: len H = len (F + G) by A2, CARD_1:def_7; then A7: dom H = Seg (len (F + G)) by FINSEQ_1:def_3; A8: for k being Element of NAT st k in dom F holds H . k = (F . k) + (G . k) proof let k be Element of NAT ; ::_thesis: ( k in dom F implies H . k = (F . k) + (G . k) ) assume A9: k in dom F ; ::_thesis: H . k = (F . k) + (G . k) then k in Seg (len G) by A1, FINSEQ_1:def_3; then k in dom G by FINSEQ_1:def_3; then A10: G /. k = G . k by PARTFUN1:def_6; F /. k = F . k by A9, PARTFUN1:def_6; hence H . k = (F . k) + (G . k) by A3, A9, A10; ::_thesis: verum end; for k being Nat st k in dom H holds H . k = (F + G) . k proof let k be Nat; ::_thesis: ( k in dom H implies H . k = (F + G) . k ) assume A11: k in dom H ; ::_thesis: H . k = (F + G) . k then k in dom F by A2, A6, A7, FINSEQ_1:def_3; then A12: H . k = (F . k) + (G . k) by A8; k in dom (F + G) by A7, A11, FINSEQ_1:def_3; hence H . k = (F + G) . k by A12, VALUED_1:def_1; ::_thesis: verum end; then Sum H = Sum (F + G) by A6, FINSEQ_2:9 .= (Sum F) + (Sum G) by A4, A5, RVSUM_1:89 ; hence Sum H = (Sum F) + (Sum G) ; ::_thesis: verum end; theorem Th22: :: INTEGRA1:22 for F, G, H being FinSequence of REAL st len F = len G & len F = len H & ( for k being Element of NAT st k in dom F holds H . k = (F /. k) - (G /. k) ) holds Sum H = (Sum F) - (Sum G) proof let F, G, H be FinSequence of REAL ; ::_thesis: ( len F = len G & len F = len H & ( for k being Element of NAT st k in dom F holds H . k = (F /. k) - (G /. k) ) implies Sum H = (Sum F) - (Sum G) ) assume that A1: len F = len G and A2: len F = len H and A3: for k being Element of NAT st k in dom F holds H . k = (F /. k) - (G /. k) ; ::_thesis: Sum H = (Sum F) - (Sum G) A4: F is Element of (len F) -tuples_on REAL by FINSEQ_2:92; A5: G is Element of (len F) -tuples_on REAL by A1, FINSEQ_2:92; then A6: F - G is Element of (len F) -tuples_on REAL by A4, FINSEQ_2:120; then A7: len H = len (F - G) by A2, CARD_1:def_7; then A8: dom H = Seg (len (F - G)) by FINSEQ_1:def_3; A9: for k being Element of NAT st k in dom F holds H . k = (F . k) - (G . k) proof let k be Element of NAT ; ::_thesis: ( k in dom F implies H . k = (F . k) - (G . k) ) assume A10: k in dom F ; ::_thesis: H . k = (F . k) - (G . k) then k in Seg (len G) by A1, FINSEQ_1:def_3; then k in dom G by FINSEQ_1:def_3; then A11: G /. k = G . k by PARTFUN1:def_6; F /. k = F . k by A10, PARTFUN1:def_6; hence H . k = (F . k) - (G . k) by A3, A10, A11; ::_thesis: verum end; for k being Nat st k in dom H holds H . k = (F - G) . k proof let k be Nat; ::_thesis: ( k in dom H implies H . k = (F - G) . k ) assume A12: k in dom H ; ::_thesis: H . k = (F - G) . k then k in Seg (len F) by A6, A8, CARD_1:def_7; then k in dom F by FINSEQ_1:def_3; then A13: H . k = (F . k) - (G . k) by A9; k in dom (F - G) by A8, A12, FINSEQ_1:def_3; hence H . k = (F - G) . k by A13, VALUED_1:13; ::_thesis: verum end; then Sum H = Sum (F - G) by A7, FINSEQ_2:9 .= (Sum F) - (Sum G) by A4, A5, RVSUM_1:90 ; hence Sum H = (Sum F) - (Sum G) ; ::_thesis: verum end; theorem Th23: :: INTEGRA1:23 for A being non empty closed_interval Subset of REAL for D being Division of A holds Sum (lower_volume ((chi (A,A)),D)) = vol A proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A holds Sum (lower_volume ((chi (A,A)),D)) = vol A let D be Division of A; ::_thesis: Sum (lower_volume ((chi (A,A)),D)) = vol A deffunc H1( Nat) -> Real = vol (divset (D,$1)); consider p being FinSequence of REAL such that A1: ( len p = len D & ( for i being Nat st i in dom p holds p . i = H1(i) ) ) from FINSEQ_2:sch_1(); A2: dom p = Seg (len D) by A1, FINSEQ_1:def_3; A3: for i being Element of NAT st i in Seg (len D) holds p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) proof let i be Element of NAT ; ::_thesis: ( i in Seg (len D) implies p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) ) A4: vol (divset (D,i)) = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) ; assume i in Seg (len D) ; ::_thesis: p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) hence p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) by A1, A2, A4; ::_thesis: verum end; (len D) - 1 in NAT proof ex j being Nat st len D = 1 + j by NAT_1:10, NAT_1:14; hence (len D) - 1 in NAT by ORDINAL1:def_12; ::_thesis: verum end; then reconsider k = (len D) - 1 as Element of NAT ; deffunc H2( Nat) -> Element of REAL = lower_bound (divset (D,($1 + 1))); deffunc H3( Nat) -> Element of REAL = upper_bound (divset (D,$1)); consider s1 being FinSequence of REAL such that A5: ( len s1 = k & ( for i being Nat st i in dom s1 holds s1 . i = H3(i) ) ) from FINSEQ_2:sch_1(); consider s2 being FinSequence of REAL such that A6: ( len s2 = k & ( for i being Nat st i in dom s2 holds s2 . i = H2(i) ) ) from FINSEQ_2:sch_1(); A7: dom s2 = Seg k by A6, FINSEQ_1:def_3; ( len (s1 ^ <*(upper_bound A)*>) = len (<*(lower_bound A)*> ^ s2) & len (s1 ^ <*(upper_bound A)*>) = len p & ( for i being Element of NAT st i in dom (s1 ^ <*(upper_bound A)*>) holds p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) ) ) proof dom <*(upper_bound A)*> = Seg 1 by FINSEQ_1:def_8; then len <*(upper_bound A)*> = 1 by FINSEQ_1:def_3; then A8: len (s1 ^ <*(upper_bound A)*>) = k + 1 by A5, FINSEQ_1:22; dom <*(lower_bound A)*> = Seg 1 by FINSEQ_1:def_8; then len <*(lower_bound A)*> = 1 by FINSEQ_1:def_3; hence A9: len (s1 ^ <*(upper_bound A)*>) = len (<*(lower_bound A)*> ^ s2) by A6, A8, FINSEQ_1:22; ::_thesis: ( len (s1 ^ <*(upper_bound A)*>) = len p & ( for i being Element of NAT st i in dom (s1 ^ <*(upper_bound A)*>) holds p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) ) ) thus len (s1 ^ <*(upper_bound A)*>) = len p by A1, A8; ::_thesis: for i being Element of NAT st i in dom (s1 ^ <*(upper_bound A)*>) holds p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) let i be Element of NAT ; ::_thesis: ( i in dom (s1 ^ <*(upper_bound A)*>) implies p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) ) assume A10: i in dom (s1 ^ <*(upper_bound A)*>) ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) then A11: (s1 ^ <*(upper_bound A)*>) /. i = (s1 ^ <*(upper_bound A)*>) . i by PARTFUN1:def_6; i in Seg (len (s1 ^ <*(upper_bound A)*>)) by A10, FINSEQ_1:def_3; then i in dom (<*(lower_bound A)*> ^ s2) by A9, FINSEQ_1:def_3; then A12: (<*(lower_bound A)*> ^ s2) /. i = (<*(lower_bound A)*> ^ s2) . i by PARTFUN1:def_6; A13: ( len D = 1 or not len D is trivial ) by NAT_2:def_1; now__::_thesis:_p_._i_=_((s1_^_<*(upper_bound_A)*>)_/._i)_-_((<*(lower_bound_A)*>_^_s2)_/._i) percases ( len D = 1 or len D >= 2 ) by A13, NAT_2:29; supposeA14: len D = 1 ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) then A15: i in Seg 1 by A8, A10, FINSEQ_1:def_3; then A16: i = 1 by FINSEQ_1:2, TARSKI:def_1; s1 = {} by A5, A14; then s1 ^ <*(upper_bound A)*> = <*(upper_bound A)*> by FINSEQ_1:34; then A17: (s1 ^ <*(upper_bound A)*>) /. i = upper_bound A by A11, A16, FINSEQ_1:def_8; A18: i in dom D by A14, A15, FINSEQ_1:def_3; s2 = {} by A6, A14; then <*(lower_bound A)*> ^ s2 = <*(lower_bound A)*> by FINSEQ_1:34; then A19: (<*(lower_bound A)*> ^ s2) /. i = lower_bound A by A12, A16, FINSEQ_1:def_8; D . i = upper_bound A by A14, A16, Def2; then A20: upper_bound (divset (D,i)) = upper_bound A by A16, A18, Def4; p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) by A3, A14, A15; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) by A16, A18, A17, A19, A20, Def4; ::_thesis: verum end; supposeA21: len D >= 2 ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) 1 = 2 - 1 ; then A22: k >= 1 by A21, XREAL_1:9; now__::_thesis:_p_._i_=_((s1_^_<*(upper_bound_A)*>)_/._i)_-_((<*(lower_bound_A)*>_^_s2)_/._i) percases ( i = 1 or i = len D or ( i <> 1 & i <> len D ) ) ; supposeA23: i = 1 ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) then A24: i in Seg 1 by FINSEQ_1:2, TARSKI:def_1; then i in dom <*(lower_bound A)*> by FINSEQ_1:def_8; then (<*(lower_bound A)*> ^ s2) . i = <*(lower_bound A)*> . i by FINSEQ_1:def_7; then A25: (<*(lower_bound A)*> ^ s2) . i = lower_bound A by A23, FINSEQ_1:def_8; Seg 1 c= Seg k by A22, FINSEQ_1:5; then i in Seg k by A24; then A26: i in dom s1 by A5, FINSEQ_1:def_3; then (s1 ^ <*(upper_bound A)*>) . i = s1 . i by FINSEQ_1:def_7; then A27: (s1 ^ <*(upper_bound A)*>) . i = upper_bound (divset (D,i)) by A5, A26; A28: i in Seg 2 by A23, FINSEQ_1:2, TARSKI:def_2; A29: Seg 2 c= Seg (len D) by A21, FINSEQ_1:5; then i in Seg (len D) by A28; then A30: i in dom D by FINSEQ_1:def_3; p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) by A3, A29, A28; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) by A11, A12, A23, A30, A27, A25, Def4; ::_thesis: verum end; supposeA31: i = len D ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) then i - (len s1) in Seg 1 by A5, FINSEQ_1:2, TARSKI:def_1; then A32: i - (len s1) in dom <*(upper_bound A)*> by FINSEQ_1:def_8; i = (i - (len s1)) + (len s1) ; then (s1 ^ <*(upper_bound A)*>) . i = <*(upper_bound A)*> . (i - (len s1)) by A32, FINSEQ_1:def_7; then A33: (s1 ^ <*(upper_bound A)*>) /. i = upper_bound A by A5, A11, A31, FINSEQ_1:def_8; A34: i <> 1 by A21, A31; i in Seg (len D) by A31, FINSEQ_1:3; then A35: i in dom D by FINSEQ_1:def_3; p . i = (upper_bound (divset (D,i))) - (lower_bound (divset (D,i))) by A3, A31, FINSEQ_1:3; then p . i = (upper_bound (divset (D,i))) - (D . (i - 1)) by A35, A34, Def4; then A36: p . i = (D . i) - (D . (i - 1)) by A35, A34, Def4; A37: i - (len <*(lower_bound A)*>) = i - 1 by FINSEQ_1:40; i - 1 <> 0 by A21, A31; then i - 1 in Seg k by A31, FINSEQ_1:3; then A38: i - (len <*(lower_bound A)*>) in dom s2 by A6, A37, FINSEQ_1:def_3; A39: (len <*(lower_bound A)*>) + (i - (len <*(lower_bound A)*>)) = i ; then (<*(lower_bound A)*> ^ s2) . i = s2 . (i - (len <*(lower_bound A)*>)) by A38, FINSEQ_1:def_7; then (<*(lower_bound A)*> ^ s2) . i = lower_bound (divset (D,i)) by A6, A37, A39, A38; then (<*(lower_bound A)*> ^ s2) . i = D . (i - 1) by A35, A34, Def4; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) by A12, A31, A33, A36, Def2; ::_thesis: verum end; supposeA40: ( i <> 1 & i <> len D ) ; ::_thesis: p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) (len s1) + (len <*(upper_bound A)*>) = k + 1 by A5, FINSEQ_1:39; then A41: i in Seg (len D) by A10, FINSEQ_1:def_7; A42: ( i in dom s1 & i in Seg k & i - 1 in Seg k & (i - 1) + 1 = i & i - (len <*(lower_bound A)*>) in dom s2 ) proof i <> 0 by A41, FINSEQ_1:1; then not i is trivial by A40, NAT_2:def_1; then i >= 1 + 1 by NAT_2:29; then A43: i - 1 >= 1 by XREAL_1:19; A44: 1 <= i by A41, FINSEQ_1:1; i <= len D by A41, FINSEQ_1:1; then A45: i < k + 1 by A40, XXREAL_0:1; then A46: i <= k by NAT_1:13; then i in Seg (len s1) by A5, A44, FINSEQ_1:1; hence i in dom s1 by FINSEQ_1:def_3; ::_thesis: ( i in Seg k & i - 1 in Seg k & (i - 1) + 1 = i & i - (len <*(lower_bound A)*>) in dom s2 ) thus i in Seg k by A44, A46, FINSEQ_1:1; ::_thesis: ( i - 1 in Seg k & (i - 1) + 1 = i & i - (len <*(lower_bound A)*>) in dom s2 ) i <= k by A45, NAT_1:13; then i - 1 <= k - 1 by XREAL_1:9; then A47: (i - 1) + 0 <= (k - 1) + 1 by XREAL_1:7; ex j being Nat st i = 1 + j by A44, NAT_1:10; hence i - 1 in Seg k by A43, A47, FINSEQ_1:1; ::_thesis: ( (i - 1) + 1 = i & i - (len <*(lower_bound A)*>) in dom s2 ) then A48: i - (len <*(lower_bound A)*>) in Seg (len s2) by A6, FINSEQ_1:39; thus (i - 1) + 1 = i ; ::_thesis: i - (len <*(lower_bound A)*>) in dom s2 thus i - (len <*(lower_bound A)*>) in dom s2 by A48, FINSEQ_1:def_3; ::_thesis: verum end; then A49: i - (len <*(lower_bound A)*>) in Seg (len s2) by FINSEQ_1:def_3; then i - (len <*(lower_bound A)*>) <= len s2 by FINSEQ_1:1; then A50: i <= (len <*(lower_bound A)*>) + (len s2) by XREAL_1:20; 1 <= i - (len <*(lower_bound A)*>) by A49, FINSEQ_1:1; then (len <*(lower_bound A)*>) + 1 <= i by XREAL_1:19; then (<*(lower_bound A)*> ^ s2) . i = s2 . (i - (len <*(lower_bound A)*>)) by A50, FINSEQ_1:23; then (<*(lower_bound A)*> ^ s2) . i = s2 . (i - 1) by FINSEQ_1:39; then A51: (<*(lower_bound A)*> ^ s2) . i = lower_bound (divset (D,i)) by A6, A7, A42; (s1 ^ <*(upper_bound A)*>) . i = s1 . i by A42, FINSEQ_1:def_7; then (s1 ^ <*(upper_bound A)*>) . i = upper_bound (divset (D,i)) by A5, A42; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) by A3, A11, A12, A41, A51; ::_thesis: verum end; end; end; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) ; ::_thesis: verum end; end; end; hence p . i = ((s1 ^ <*(upper_bound A)*>) /. i) - ((<*(lower_bound A)*> ^ s2) /. i) ; ::_thesis: verum end; then Sum p = (Sum (s1 ^ <*(upper_bound A)*>)) - (Sum (<*(lower_bound A)*> ^ s2)) by Th22; then Sum p = ((Sum s1) + (upper_bound A)) - (Sum (<*(lower_bound A)*> ^ s2)) by RVSUM_1:74; then A52: Sum p = ((Sum s1) + (upper_bound A)) - ((lower_bound A) + (Sum s2)) by RVSUM_1:76; A53: dom s1 = Seg k by A5, FINSEQ_1:def_3; A54: for i being Element of NAT st i in Seg k holds upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) proof let i be Element of NAT ; ::_thesis: ( i in Seg k implies upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) ) A55: 1 + 0 <= i + 1 by XREAL_1:7; assume A56: i in Seg k ; ::_thesis: upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) then i <= k by FINSEQ_1:1; then i + 1 <= k + 1 by XREAL_1:7; then i + 1 in Seg (len D) by A55, FINSEQ_1:1; then A57: i + 1 in dom D by FINSEQ_1:def_3; k + 1 = len D ; then k <= len D by NAT_1:11; then Seg k c= Seg (len D) by FINSEQ_1:5; then i in Seg (len D) by A56; then A58: i in dom D by FINSEQ_1:def_3; A59: (i + 1) - 1 = i ; now__::_thesis:_upper_bound_(divset_(D,i))_=_lower_bound_(divset_(D,(i_+_1))) percases ( i = 1 or i <> 1 ) ; supposeA60: i = 1 ; ::_thesis: upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) then upper_bound (divset (D,i)) = D . i by A58, Def4; hence upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) by A57, A59, A60, Def4; ::_thesis: verum end; supposeA61: i <> 1 ; ::_thesis: upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) i >= 1 by A56, FINSEQ_1:1; then i + 1 >= 1 + 1 by XREAL_1:6; then A62: i + 1 <> 1 ; upper_bound (divset (D,i)) = D . i by A58, A61, Def4; hence upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) by A57, A59, A62, Def4; ::_thesis: verum end; end; end; hence upper_bound (divset (D,i)) = lower_bound (divset (D,(i + 1))) ; ::_thesis: verum end; for i being Nat st i in dom s1 holds s1 . i = s2 . i proof let i be Nat; ::_thesis: ( i in dom s1 implies s1 . i = s2 . i ) assume A63: i in dom s1 ; ::_thesis: s1 . i = s2 . i then s1 . i = upper_bound (divset (D,i)) by A5; then s1 . i = lower_bound (divset (D,(i + 1))) by A54, A53, A63; hence s1 . i = s2 . i by A6, A7, A53, A63; ::_thesis: verum end; then A64: s1 = s2 by A5, A6, FINSEQ_2:9; A65: len (lower_volume ((chi (A,A)),D)) = len D by Def7; then A66: dom (lower_volume ((chi (A,A)),D)) = Seg (len D) by FINSEQ_1:def_3; for i being Nat st i in dom (lower_volume ((chi (A,A)),D)) holds (lower_volume ((chi (A,A)),D)) . i = p . i proof let i be Nat; ::_thesis: ( i in dom (lower_volume ((chi (A,A)),D)) implies (lower_volume ((chi (A,A)),D)) . i = p . i ) assume A67: i in dom (lower_volume ((chi (A,A)),D)) ; ::_thesis: (lower_volume ((chi (A,A)),D)) . i = p . i then i in dom D by A65, FINSEQ_3:29; then (lower_volume ((chi (A,A)),D)) . i = vol (divset (D,i)) by Th19; hence (lower_volume ((chi (A,A)),D)) . i = p . i by A1, A2, A66, A67; ::_thesis: verum end; hence Sum (lower_volume ((chi (A,A)),D)) = vol A by A1, A64, A52, A65, FINSEQ_2:9; ::_thesis: verum end; theorem Th24: :: INTEGRA1:24 for A being non empty closed_interval Subset of REAL for D being Division of A holds Sum (upper_volume ((chi (A,A)),D)) = vol A proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A holds Sum (upper_volume ((chi (A,A)),D)) = vol A let D be Division of A; ::_thesis: Sum (upper_volume ((chi (A,A)),D)) = vol A A1: for i being Nat st 1 <= i & i <= len (lower_volume ((chi (A,A)),D)) holds (lower_volume ((chi (A,A)),D)) . i = (upper_volume ((chi (A,A)),D)) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len (lower_volume ((chi (A,A)),D)) implies (lower_volume ((chi (A,A)),D)) . i = (upper_volume ((chi (A,A)),D)) . i ) assume that A2: 1 <= i and A3: i <= len (lower_volume ((chi (A,A)),D)) ; ::_thesis: (lower_volume ((chi (A,A)),D)) . i = (upper_volume ((chi (A,A)),D)) . i i <= len D by A3, Def7; then A4: i in dom D by A2, FINSEQ_3:25; then (lower_volume ((chi (A,A)),D)) . i = vol (divset (D,i)) by Th19 .= (upper_volume ((chi (A,A)),D)) . i by A4, Th20 ; hence (lower_volume ((chi (A,A)),D)) . i = (upper_volume ((chi (A,A)),D)) . i ; ::_thesis: verum end; len (lower_volume ((chi (A,A)),D)) = len D by Def7 .= len (upper_volume ((chi (A,A)),D)) by Def6 ; then lower_volume ((chi (A,A)),D) = upper_volume ((chi (A,A)),D) by A1, FINSEQ_1:14; hence Sum (upper_volume ((chi (A,A)),D)) = vol A by Th23; ::_thesis: verum end; begin registration let A be non empty closed_interval Subset of REAL; let f be PartFunc of A,REAL; let D be Division of A; cluster upper_volume (f,D) -> non empty ; coherence not upper_volume (f,D) is empty proof len (upper_volume (f,D)) = len D by Def6; hence not upper_volume (f,D) is empty ; ::_thesis: verum end; cluster lower_volume (f,D) -> non empty ; coherence not lower_volume (f,D) is empty proof len (lower_volume (f,D)) = len D by Def7; hence not lower_volume (f,D) is empty ; ::_thesis: verum end; end; theorem Th25: :: INTEGRA1:25 for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL st f | A is bounded_below holds (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL st f | A is bounded_below holds (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) let D be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded_below holds (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) let f be Function of A,REAL; ::_thesis: ( f | A is bounded_below implies (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) ) assume A1: f | A is bounded_below ; ::_thesis: (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) A2: for i being Element of NAT st i in dom D holds (lower_bound (rng f)) * (vol (divset (D,i))) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) proof let i be Element of NAT ; ::_thesis: ( i in dom D implies (lower_bound (rng f)) * (vol (divset (D,i))) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) A3: rng (f | (divset (D,i))) c= rng f by RELAT_1:70; A4: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; A5: dom f = A by FUNCT_2:def_1; assume i in dom D ; ::_thesis: (lower_bound (rng f)) * (vol (divset (D,i))) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then dom (f | (divset (D,i))) = divset (D,i) by A5, Th8, RELAT_1:62; then A6: rng (f | (divset (D,i))) is non empty Subset of REAL by RELAT_1:42; rng f is bounded_below by A1, Th11; hence (lower_bound (rng f)) * (vol (divset (D,i))) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A3, A6, A4, SEQ_4:47, XREAL_1:64; ::_thesis: verum end; A7: for i being Element of NAT st i in dom D holds (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) proof let i be Element of NAT ; ::_thesis: ( i in dom D implies (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) assume A8: i in dom D ; ::_thesis: (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then (lower_bound (rng f)) * (vol (divset (D,i))) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A2; hence (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) <= (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A8, Th19; ::_thesis: verum end; Sum ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) <= Sum (lower_volume (f,D)) proof len (lower_volume ((chi (A,A)),D)) = len ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) by FINSEQ_2:33; then A9: len ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) = len D by Def7; deffunc H1( Nat) -> Element of REAL = (lower_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); deffunc H2( set ) -> Element of REAL = (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . $1); consider p being FinSequence of REAL such that A10: ( len p = len D & ( for i being Nat st i in dom p holds p . i = H2(i) ) ) from FINSEQ_2:sch_1(); A11: dom p = Seg (len D) by A10, FINSEQ_1:def_3; for i being Nat st 1 <= i & i <= len p holds p . i = ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p implies p . i = ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) . i ) assume that A12: 1 <= i and A13: i <= len p ; ::_thesis: p . i = ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) . i i in Seg (len D) by A10, A12, A13, FINSEQ_1:1; then p . i = (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) by A10, A11; hence p . i = ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) . i by RVSUM_1:44; ::_thesis: verum end; then A14: p = (lower_bound (rng f)) * (lower_volume ((chi (A,A)),D)) by A10, A9, FINSEQ_1:14; reconsider p = p as Element of (len D) -tuples_on REAL by A10, FINSEQ_2:92; consider q being FinSequence of REAL such that A15: ( len q = len D & ( for i being Nat st i in dom q holds q . i = H1(i) ) ) from FINSEQ_2:sch_1(); A16: dom q = dom D by A15, FINSEQ_3:29; then A17: q = lower_volume (f,D) by A15, Def7; reconsider q = q as Element of (len D) -tuples_on REAL by A15, FINSEQ_2:92; now__::_thesis:_for_i_being_Nat_st_i_in_Seg_(len_D)_holds_ p_._i_<=_q_._i let i be Nat; ::_thesis: ( i in Seg (len D) implies p . i <= q . i ) assume A18: i in Seg (len D) ; ::_thesis: p . i <= q . i then A19: p . i = (lower_bound (rng f)) * ((lower_volume ((chi (A,A)),D)) . i) by A10, A11; A20: i in dom D by A18, FINSEQ_1:def_3; then q . i = (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A15, A16; hence p . i <= q . i by A7, A19, A20; ::_thesis: verum end; hence Sum ((lower_bound (rng f)) * (lower_volume ((chi (A,A)),D))) <= Sum (lower_volume (f,D)) by A17, A14, RVSUM_1:82; ::_thesis: verum end; then (lower_bound (rng f)) * (Sum (lower_volume ((chi (A,A)),D))) <= Sum (lower_volume (f,D)) by RVSUM_1:87; hence (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) by Th23; ::_thesis: verum end; theorem :: INTEGRA1:26 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL st f | A is bounded_above & i in dom D holds (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL st f | A is bounded_above & i in dom D holds (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL st f | A is bounded_above & i in dom D holds (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) let D be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded_above & i in dom D holds (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) let f be Function of A,REAL; ::_thesis: ( f | A is bounded_above & i in dom D implies (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) A1: dom f = A by FUNCT_2:def_1; assume f | A is bounded_above ; ::_thesis: ( not i in dom D or (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) then A2: rng f is bounded_above by Th13; assume i in dom D ; ::_thesis: (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then dom (f | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then A3: rng (f | (divset (D,i))) is non empty Subset of REAL by RELAT_1:42; A4: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; rng (f | (divset (D,i))) c= rng f by RELAT_1:70; hence (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A3, A2, A4, SEQ_4:48, XREAL_1:64; ::_thesis: verum end; theorem Th27: :: INTEGRA1:27 for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL st f | A is bounded_above holds upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL st f | A is bounded_above holds upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) let D be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded_above holds upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) let f be Function of A,REAL; ::_thesis: ( f | A is bounded_above implies upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) ) assume A1: f | A is bounded_above ; ::_thesis: upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) A2: for i being Element of NAT st i in Seg (len D) holds (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) proof let i be Element of NAT ; ::_thesis: ( i in Seg (len D) implies (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) A3: rng (f | (divset (D,i))) c= rng f by RELAT_1:70; A4: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; assume i in Seg (len D) ; ::_thesis: (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then A5: i in dom D by FINSEQ_1:def_3; dom f = A by FUNCT_2:def_1; then dom (f | (divset (D,i))) = divset (D,i) by A5, Th8, RELAT_1:62; then A6: rng (f | (divset (D,i))) is non empty Subset of REAL by RELAT_1:42; rng f is bounded_above by A1, Th13; hence (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A3, A6, A4, SEQ_4:48, XREAL_1:64; ::_thesis: verum end; A7: for i being Element of NAT st i in Seg (len D) holds (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) proof let i be Element of NAT ; ::_thesis: ( i in Seg (len D) implies (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) ) assume A8: i in Seg (len D) ; ::_thesis: (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) then A9: i in dom D by FINSEQ_1:def_3; (upper_bound (rng f)) * (vol (divset (D,i))) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A2, A8; hence (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) >= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A9, Th20; ::_thesis: verum end; Sum ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) >= Sum (upper_volume (f,D)) proof len (upper_volume ((chi (A,A)),D)) = len ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) by FINSEQ_2:33; then A10: len ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) = len D by Def6; deffunc H1( Nat) -> Element of REAL = (upper_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); deffunc H2( set ) -> Element of REAL = (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . $1); consider p being FinSequence of REAL such that A11: ( len p = len D & ( for i being Nat st i in dom p holds p . i = H2(i) ) ) from FINSEQ_2:sch_1(); A12: dom p = Seg (len D) by A11, FINSEQ_1:def_3; for i being Nat st 1 <= i & i <= len p holds p . i = ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p implies p . i = ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) . i ) assume that A13: 1 <= i and A14: i <= len p ; ::_thesis: p . i = ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) . i i in Seg (len D) by A11, A13, A14, FINSEQ_1:1; then p . i = (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) by A11, A12; hence p . i = ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) . i by RVSUM_1:44; ::_thesis: verum end; then A15: p = (upper_bound (rng f)) * (upper_volume ((chi (A,A)),D)) by A11, A10, FINSEQ_1:14; reconsider p = p as Element of (len D) -tuples_on REAL by A11, FINSEQ_2:92; consider q being FinSequence of REAL such that A16: ( len q = len D & ( for i being Nat st i in dom q holds q . i = H1(i) ) ) from FINSEQ_2:sch_1(); A17: dom q = dom D by A16, FINSEQ_3:29; then A18: q = upper_volume (f,D) by A16, Def6; reconsider q = q as Element of (len D) -tuples_on REAL by A16, FINSEQ_2:92; now__::_thesis:_for_i_being_Nat_st_i_in_Seg_(len_D)_holds_ q_._i_<=_p_._i let i be Nat; ::_thesis: ( i in Seg (len D) implies q . i <= p . i ) assume A19: i in Seg (len D) ; ::_thesis: q . i <= p . i then i in dom D by FINSEQ_1:def_3; then A20: q . i = (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A16, A17; p . i = (upper_bound (rng f)) * ((upper_volume ((chi (A,A)),D)) . i) by A11, A12, A19; hence q . i <= p . i by A7, A19, A20; ::_thesis: verum end; hence Sum ((upper_bound (rng f)) * (upper_volume ((chi (A,A)),D))) >= Sum (upper_volume (f,D)) by A18, A15, RVSUM_1:82; ::_thesis: verum end; then (upper_bound (rng f)) * (Sum (upper_volume ((chi (A,A)),D))) >= Sum (upper_volume (f,D)) by RVSUM_1:87; hence upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) by Th24; ::_thesis: verum end; theorem Th28: :: INTEGRA1:28 for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D) <= upper_sum (f,D) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D) <= upper_sum (f,D) let D be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D) <= upper_sum (f,D) let f be Function of A,REAL; ::_thesis: ( f | A is bounded implies lower_sum (f,D) <= upper_sum (f,D) ) deffunc H1( Nat) -> Element of REAL = (lower_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); consider p being FinSequence of REAL such that A1: ( len p = len D & ( for i being Nat st i in dom p holds p . i = H1(i) ) ) from FINSEQ_2:sch_1(); assume A2: f | A is bounded ; ::_thesis: lower_sum (f,D) <= upper_sum (f,D) then A3: rng f is bounded_above by Th13; A4: dom p = dom D by A1, FINSEQ_3:29; reconsider p = p as Element of (len D) -tuples_on REAL by A1, FINSEQ_2:92; deffunc H2( Nat) -> Element of REAL = (upper_bound (rng (f | (divset (D,$1))))) * (vol (divset (D,$1))); consider q being FinSequence of REAL such that A5: ( len q = len D & ( for i being Nat st i in dom q holds q . i = H2(i) ) ) from FINSEQ_2:sch_1(); A6: dom q = dom D by A5, FINSEQ_3:29; then A7: q = upper_volume (f,D) by A5, Def6; reconsider q = q as Element of (len D) -tuples_on REAL by A5, FINSEQ_2:92; A8: rng f is bounded_below by A2, Th11; for i being Nat st i in Seg (len D) holds p . i <= q . i proof let i be Nat; ::_thesis: ( i in Seg (len D) implies p . i <= q . i ) A9: dom f = A by FUNCT_2:def_1; assume A10: i in Seg (len D) ; ::_thesis: p . i <= q . i then A11: i in dom D by FINSEQ_1:def_3; i in dom D by A10, FINSEQ_1:def_3; then dom (f | (divset (D,i))) = divset (D,i) by A9, Th8, RELAT_1:62; then A12: rng (f | (divset (D,i))) is non empty Subset of REAL by RELAT_1:42; A13: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; A14: rng (f | (divset (D,i))) is bounded_above by A3, RELAT_1:70, XXREAL_2:43; rng (f | (divset (D,i))) is bounded_below by A8, RELAT_1:70, XXREAL_2:44; then (lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) <= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A14, A12, A13, SEQ_4:11, XREAL_1:64; then p . i <= (upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i))) by A1, A4, A11; hence p . i <= q . i by A5, A6, A11; ::_thesis: verum end; then Sum p <= Sum q by RVSUM_1:82; hence lower_sum (f,D) <= upper_sum (f,D) by A1, A4, A7, Def7; ::_thesis: verum end; definition let D1, D2 be FinSequence; predD1 <= D2 means :Def18: :: INTEGRA1:def 18 ( len D1 <= len D2 & rng D1 c= rng D2 ); reflexivity for D1 being FinSequence holds ( len D1 <= len D1 & rng D1 c= rng D1 ) ; end; :: deftheorem Def18 defines <= INTEGRA1:def_18_:_ for D1, D2 being FinSequence holds ( D1 <= D2 iff ( len D1 <= len D2 & rng D1 c= rng D2 ) ); notation let D1, D2 be FinSequence; synonym D2 >= D1 for D1 <= D2; end; theorem :: INTEGRA1:29 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A st len D1 = 1 holds D1 <= D2 proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A st len D1 = 1 holds D1 <= D2 let D1, D2 be Division of A; ::_thesis: ( len D1 = 1 implies D1 <= D2 ) A1: D2 . (len D2) = upper_bound A by Def2; assume A2: len D1 = 1 ; ::_thesis: D1 <= D2 then D1 . 1 = upper_bound A by Def2; then D1 = <*(upper_bound A)*> by A2, FINSEQ_1:40; then A3: rng D1 = {(upper_bound A)} by FINSEQ_1:38; A4: len D2 in Seg (len D2) by FINSEQ_1:3; hence len D1 <= len D2 by A2, FINSEQ_1:1; :: according to INTEGRA1:def_18 ::_thesis: rng D1 c= rng D2 len D2 in dom D2 by A4, FINSEQ_1:def_3; then upper_bound A in rng D2 by A1, FUNCT_1:def_3; then rng D1 is Subset of (rng D2) by A3, SUBSET_1:41; hence rng D1 c= rng D2 ; ::_thesis: verum end; theorem Th30: :: INTEGRA1:30 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded_above & len D1 = 1 holds upper_sum (f,D1) >= upper_sum (f,D2) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded_above & len D1 = 1 holds upper_sum (f,D1) >= upper_sum (f,D2) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded_above & len D1 = 1 holds upper_sum (f,D1) >= upper_sum (f,D2) let f be Function of A,REAL; ::_thesis: ( f | A is bounded_above & len D1 = 1 implies upper_sum (f,D1) >= upper_sum (f,D2) ) assume that A1: f | A is bounded_above and A2: len D1 = 1 ; ::_thesis: upper_sum (f,D1) >= upper_sum (f,D2) 1 in Seg (len D1) by A2, FINSEQ_1:3; then A3: 1 in dom D1 by FINSEQ_1:def_3; then A4: lower_bound (divset (D1,1)) = lower_bound A by Def4; A5: divset (D1,1) = [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by Th4; upper_bound (divset (D1,1)) = D1 . 1 by A3, Def4 .= upper_bound A by A2, Def2 ; then A6: divset (D1,1) = A by A4, A5, Th4; A7: (upper_volume (f,D1)) . 1 = (upper_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))) by A3, Def6; len (upper_volume (f,D1)) = 1 by A2, Def6; then upper_sum (f,D1) = Sum <*((upper_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))))*> by A7, FINSEQ_1:40 .= (upper_bound (rng (f | A))) * (vol A) by A6, FINSOP_1:11 .= (upper_bound (rng f)) * (vol A) ; hence upper_sum (f,D1) >= upper_sum (f,D2) by A1, Th27; ::_thesis: verum end; theorem Th31: :: INTEGRA1:31 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded_below & len D1 = 1 holds lower_sum (f,D1) <= lower_sum (f,D2) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded_below & len D1 = 1 holds lower_sum (f,D1) <= lower_sum (f,D2) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded_below & len D1 = 1 holds lower_sum (f,D1) <= lower_sum (f,D2) let f be Function of A,REAL; ::_thesis: ( f | A is bounded_below & len D1 = 1 implies lower_sum (f,D1) <= lower_sum (f,D2) ) assume that A1: f | A is bounded_below and A2: len D1 = 1 ; ::_thesis: lower_sum (f,D1) <= lower_sum (f,D2) 1 in Seg (len D1) by A2, FINSEQ_1:3; then A3: 1 in dom D1 by FINSEQ_1:def_3; then A4: lower_bound (divset (D1,1)) = lower_bound A by Def4; upper_bound (divset (D1,1)) = D1 . 1 by A3, Def4 .= upper_bound A by A2, Def2 ; then divset (D1,1) = [.(lower_bound A),(upper_bound A).] by A4, Th4; then A5: divset (D1,1) = A by Th4; A6: (lower_volume (f,D1)) . 1 = (lower_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))) by A3, Def7; len (lower_volume (f,D1)) = 1 by A2, Def7; then lower_sum (f,D1) = Sum <*((lower_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))))*> by A6, FINSEQ_1:40 .= (lower_bound (rng (f | A))) * (vol A) by A5, FINSOP_1:11 .= (lower_bound (rng f)) * (vol A) ; hence lower_sum (f,D1) <= lower_sum (f,D2) by A1, Th25; ::_thesis: verum end; theorem :: INTEGRA1:32 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds ex A1, A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D holds ex A1, A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D holds ex A1, A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) let D be Division of A; ::_thesis: ( i in dom D implies ex A1, A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) ) assume i in dom D ; ::_thesis: ex A1, A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) then A1: D . i in rng D by FUNCT_1:def_3; rng D c= A by Def2; then D . i in A by A1; then D . i in [.(lower_bound A),(upper_bound A).] by Th4; then D . i in { a where a is Real : ( lower_bound A <= a & a <= upper_bound A ) } by RCOMP_1:def_1; then A2: ex a being Real st ( a = D . i & lower_bound A <= a & a <= upper_bound A ) ; then reconsider A1 = [.(lower_bound A),(D . i).] as non empty closed_interval Subset of REAL by MEASURE5:14; reconsider A2 = [.(D . i),(upper_bound A).] as non empty closed_interval Subset of REAL by A2, MEASURE5:14; take A1 ; ::_thesis: ex A2 being non empty closed_interval Subset of REAL st ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) take A2 ; ::_thesis: ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) A1 \/ A2 = [.(lower_bound A),(upper_bound A).] by A2, XXREAL_1:174 .= A by Th4 ; hence ( A1 = [.(lower_bound A),(D . i).] & A2 = [.(D . i),(upper_bound A).] & A = A1 \/ A2 ) ; ::_thesis: verum end; theorem Th33: :: INTEGRA1:33 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A st i in dom D1 & D1 <= D2 holds ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A st i in dom D1 & D1 <= D2 holds ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A st i in dom D1 & D1 <= D2 holds ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) let D1, D2 be Division of A; ::_thesis: ( i in dom D1 & D1 <= D2 implies ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) ) assume i in dom D1 ; ::_thesis: ( not D1 <= D2 or ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) ) then A1: D1 . i in rng D1 by FUNCT_1:def_3; assume D1 <= D2 ; ::_thesis: ex j being Element of NAT st ( j in dom D2 & D1 . i = D2 . j ) then rng D1 c= rng D2 by Def18; then consider x1 being set such that A2: x1 in dom D2 and A3: D1 . i = D2 . x1 by A1, FUNCT_1:def_3; reconsider x1 = x1 as Element of NAT by A2; take x1 ; ::_thesis: ( x1 in dom D2 & D1 . i = D2 . x1 ) thus ( x1 in dom D2 & D1 . i = D2 . x1 ) by A2, A3; ::_thesis: verum end; definition let A be non empty closed_interval Subset of REAL; let D1, D2 be Division of A; let i be Nat; assume A1: D1 <= D2 ; func indx (D2,D1,i) -> Element of NAT means :Def19: :: INTEGRA1:def 19 ( it in dom D2 & D1 . i = D2 . it ) if i in dom D1 otherwise it = 0 ; existence ( ( i in dom D1 implies ex b1 being Element of NAT st ( b1 in dom D2 & D1 . i = D2 . b1 ) ) & ( not i in dom D1 implies ex b1 being Element of NAT st b1 = 0 ) ) by A1, Th33; uniqueness for b1, b2 being Element of NAT holds ( ( i in dom D1 & b1 in dom D2 & D1 . i = D2 . b1 & b2 in dom D2 & D1 . i = D2 . b2 implies b1 = b2 ) & ( not i in dom D1 & b1 = 0 & b2 = 0 implies b1 = b2 ) ) proof let m, n be Element of NAT ; ::_thesis: ( ( i in dom D1 & m in dom D2 & D1 . i = D2 . m & n in dom D2 & D1 . i = D2 . n implies m = n ) & ( not i in dom D1 & m = 0 & n = 0 implies m = n ) ) hereby ::_thesis: ( not i in dom D1 & m = 0 & n = 0 implies m = n ) assume that i in dom D1 and A2: m in dom D2 and A3: D1 . i = D2 . m and A4: n in dom D2 and A5: D1 . i = D2 . n ; ::_thesis: not m <> n assume A6: m <> n ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m < n or n < m ) by A6, XXREAL_0:1; suppose m < n ; ::_thesis: contradiction hence contradiction by A2, A3, A4, A5, SEQM_3:def_1; ::_thesis: verum end; suppose n < m ; ::_thesis: contradiction hence contradiction by A2, A3, A4, A5, SEQM_3:def_1; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; assume that not i in dom D1 and A7: m = 0 and A8: n = 0 ; ::_thesis: m = n thus m = n by A7, A8; ::_thesis: verum end; correctness consistency for b1 being Element of NAT holds verum; ; end; :: deftheorem Def19 defines indx INTEGRA1:def_19_:_ for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for i being Nat st D1 <= D2 holds for b5 being Element of NAT holds ( ( i in dom D1 implies ( b5 = indx (D2,D1,i) iff ( b5 in dom D2 & D1 . i = D2 . b5 ) ) ) & ( not i in dom D1 implies ( b5 = indx (D2,D1,i) iff b5 = 0 ) ) ); theorem Th34: :: INTEGRA1:34 for p being increasing FinSequence of REAL for n being Element of NAT st n <= len p holds p /^ n is increasing FinSequence of REAL proof let p be increasing FinSequence of REAL ; ::_thesis: for n being Element of NAT st n <= len p holds p /^ n is increasing FinSequence of REAL let n be Element of NAT ; ::_thesis: ( n <= len p implies p /^ n is increasing FinSequence of REAL ) assume A1: n <= len p ; ::_thesis: p /^ n is increasing FinSequence of REAL for i, j being Element of NAT st i in dom (p /^ n) & j in dom (p /^ n) & i < j holds (p /^ n) . i < (p /^ n) . j proof let i, j be Element of NAT ; ::_thesis: ( i in dom (p /^ n) & j in dom (p /^ n) & i < j implies (p /^ n) . i < (p /^ n) . j ) assume that A2: i in dom (p /^ n) and A3: j in dom (p /^ n) and A4: i < j ; ::_thesis: (p /^ n) . i < (p /^ n) . j A5: i + n < j + n by A4, XREAL_1:6; A6: j in Seg (len (p /^ n)) by A3, FINSEQ_1:def_3; then 1 <= j by FINSEQ_1:1; then A7: 1 + n <= j + n by XREAL_1:6; j <= len (p /^ n) by A6, FINSEQ_1:1; then j <= (len p) - n by A1, RFINSEQ:def_1; then A8: j + n <= len p by XREAL_1:19; 1 <= 1 + n by NAT_1:11; then 1 <= j + n by A7, XXREAL_0:2; then j + n in Seg (len p) by A8, FINSEQ_1:1; then A9: j + n in dom p by FINSEQ_1:def_3; A10: i in Seg (len (p /^ n)) by A2, FINSEQ_1:def_3; then 1 <= i by FINSEQ_1:1; then A11: 1 + n <= i + n by XREAL_1:6; i <= len (p /^ n) by A10, FINSEQ_1:1; then i <= (len p) - n by A1, RFINSEQ:def_1; then A12: i + n <= len p by XREAL_1:19; 1 <= 1 + n by NAT_1:11; then 1 <= i + n by A11, XXREAL_0:2; then i + n in Seg (len p) by A12, FINSEQ_1:1; then A13: i + n in dom p by FINSEQ_1:def_3; A14: (p /^ n) . j = p . (j + n) by A1, A3, RFINSEQ:def_1; (p /^ n) . i = p . (i + n) by A1, A2, RFINSEQ:def_1; hence (p /^ n) . i < (p /^ n) . j by A14, A13, A9, A5, SEQM_3:def_1; ::_thesis: verum end; hence p /^ n is increasing FinSequence of REAL by SEQM_3:def_1; ::_thesis: verum end; theorem Th35: :: INTEGRA1:35 for p being increasing FinSequence of REAL for i, j being Element of NAT st j in dom p & i <= j holds mid (p,i,j) is increasing FinSequence of REAL proof let p be increasing FinSequence of REAL ; ::_thesis: for i, j being Element of NAT st j in dom p & i <= j holds mid (p,i,j) is increasing FinSequence of REAL let i, j be Element of NAT ; ::_thesis: ( j in dom p & i <= j implies mid (p,i,j) is increasing FinSequence of REAL ) assume that A1: j in dom p and A2: i <= j ; ::_thesis: mid (p,i,j) is increasing FinSequence of REAL j in Seg (len p) by A1, FINSEQ_1:def_3; then j <= len p by FINSEQ_1:1; then i <= len p by A2, XXREAL_0:2; then p /^ (i -' 1) is increasing FinSequence of REAL by Th34, NAT_D:44; then A3: (p /^ (i -' 1)) | (Seg ((j -' i) + 1)) is increasing FinSequence of REAL by FINSEQ_1:18, SEQ_4:139; mid (p,i,j) = (p /^ (i -' 1)) | ((j -' i) + 1) by A2, FINSEQ_6:def_3; hence mid (p,i,j) is increasing FinSequence of REAL by A3, FINSEQ_1:def_15; ::_thesis: verum end; Lm1: for i, j being Element of NAT for f being FinSequence st i in dom f & j in dom f & i <= j holds len (mid (f,i,j)) = (j - i) + 1 proof let i, j be Element of NAT ; ::_thesis: for f being FinSequence st i in dom f & j in dom f & i <= j holds len (mid (f,i,j)) = (j - i) + 1 let D be FinSequence; ::_thesis: ( i in dom D & j in dom D & i <= j implies len (mid (D,i,j)) = (j - i) + 1 ) assume that A1: i in dom D and A2: j in dom D and A3: i <= j ; ::_thesis: len (mid (D,i,j)) = (j - i) + 1 j in Seg (len D) by A2, FINSEQ_1:def_3; then j <= len D by FINSEQ_1:1; then i <= len D by A3, XXREAL_0:2; then i -' 1 <= len D by NAT_D:44; then A4: len (D /^ (i -' 1)) = (len D) - (i -' 1) by RFINSEQ:def_1; reconsider D1 = D /^ (i -' 1) as FinSequence ; reconsider k = (j -' i) + 1 as Element of NAT ; i in Seg (len D) by A1, FINSEQ_1:def_3; then 1 <= i by FINSEQ_1:1; then j - (i -' 1) = j - (i - 1) by XREAL_1:233; then A5: j - (i -' 1) = (j - i) + 1 ; j in Seg (len D) by A2, FINSEQ_1:def_3; then j <= len D by FINSEQ_1:1; then j - (i -' 1) <= (len D) - (i -' 1) by XREAL_1:9; then A6: (j -' i) + 1 <= len (D /^ (i -' 1)) by A3, A4, A5, XREAL_1:233; mid (D,i,j) = (D /^ (i -' 1)) | ((j -' i) + 1) by A3, FINSEQ_6:def_3 .= D1 | (Seg k) by FINSEQ_1:def_15 ; then len (mid (D,i,j)) = (j -' i) + 1 by A6, FINSEQ_1:17; hence len (mid (D,i,j)) = (j - i) + 1 by A3, XREAL_1:233; ::_thesis: verum end; theorem Th36: :: INTEGRA1:36 for i, j being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & j in dom D & i <= j holds ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) proof let i, j be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & j in dom D & i <= j holds ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D & j in dom D & i <= j holds ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) let D be Division of A; ::_thesis: ( i in dom D & j in dom D & i <= j implies ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) ) assume that A1: i in dom D and A2: j in dom D and A3: i <= j ; ::_thesis: ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) j in Seg (len D) by A2, FINSEQ_1:def_3; then j <= len D by FINSEQ_1:1; then i <= len D by A3, XXREAL_0:2; then i -' 1 <= len D by NAT_D:44; then A4: len (D /^ (i -' 1)) = (len D) - (i -' 1) by RFINSEQ:def_1; reconsider D1 = D /^ (i -' 1) as FinSequence of REAL ; reconsider k = (j -' i) + 1 as Element of NAT ; i in Seg (len D) by A1, FINSEQ_1:def_3; then 1 <= i by FINSEQ_1:1; then j - (i -' 1) = j - (i - 1) by XREAL_1:233; then A5: j - (i -' 1) = (j - i) + 1 ; j in Seg (len D) by A2, FINSEQ_1:def_3; then j <= len D by FINSEQ_1:1; then j - (i -' 1) <= (len D) - (i -' 1) by XREAL_1:9; then A6: (j -' i) + 1 <= len (D /^ (i -' 1)) by A3, A4, A5, XREAL_1:233; A7: mid (D,i,j) = (D /^ (i -' 1)) | ((j -' i) + 1) by A3, FINSEQ_6:def_3 .= D1 | (Seg k) by FINSEQ_1:def_15 ; then 0 < len (mid (D,i,j)) by A6, FINSEQ_1:17; then reconsider M = mid (D,i,j) as non empty increasing FinSequence of REAL by A2, A3, Th35; (j -' i) + 1 >= 0 + 1 by XREAL_1:6; then A8: 1 <= len M by A6, A7, FINSEQ_1:17; then len M in Seg (len M) by FINSEQ_1:1; then A9: len M in dom M by FINSEQ_1:def_3; 1 in Seg (len M) by A8, FINSEQ_1:1; then A10: 1 in dom M by FINSEQ_1:def_3; then M . 1 <= M . (len M) by A8, A9, SEQ_4:137; then reconsider B = [.(M . 1),(M . (len M)).] as non empty closed_interval Subset of REAL by MEASURE5:14; A11: B = [.(lower_bound B),(upper_bound B).] by Th4; then A12: lower_bound B = M . 1 by Th5; A13: M . (len M) = upper_bound B by A11, Th5; for x being Real st x in rng M holds x in B proof let x be Real; ::_thesis: ( x in rng M implies x in B ) assume x in rng M ; ::_thesis: x in B then consider i being Element of NAT such that A14: i in dom M and A15: x = M . i by PARTFUN1:3; A16: i in Seg (len M) by A14, FINSEQ_1:def_3; then i <= len M by FINSEQ_1:1; then A17: M . i <= M . (len M) by A9, A14, SEQ_4:137; 1 <= i by A16, FINSEQ_1:1; then M . 1 <= M . i by A10, A14, SEQ_4:137; then M . i in { a where a is Real : ( M . 1 <= a & a <= M . (len M) ) } by A17; hence x in B by A15, RCOMP_1:def_1; ::_thesis: verum end; then rng M c= B by SUBSET_1:2; then M is Division of B by A13, Def2; hence ex B being non empty closed_interval Subset of REAL st ( lower_bound B = (mid (D,i,j)) . 1 & upper_bound B = (mid (D,i,j)) . (len (mid (D,i,j))) & mid (D,i,j) is Division of B ) by A12, A13; ::_thesis: verum end; theorem Th37: :: INTEGRA1:37 for i, j being Element of NAT for A, B being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & j in dom D & i <= j & D . i >= lower_bound B & D . j = upper_bound B holds mid (D,i,j) is Division of B proof let i, j be Element of NAT ; ::_thesis: for A, B being non empty closed_interval Subset of REAL for D being Division of A st i in dom D & j in dom D & i <= j & D . i >= lower_bound B & D . j = upper_bound B holds mid (D,i,j) is Division of B let A, B be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A st i in dom D & j in dom D & i <= j & D . i >= lower_bound B & D . j = upper_bound B holds mid (D,i,j) is Division of B let D be Division of A; ::_thesis: ( i in dom D & j in dom D & i <= j & D . i >= lower_bound B & D . j = upper_bound B implies mid (D,i,j) is Division of B ) assume that A1: i in dom D and A2: j in dom D and A3: i <= j and A4: D . i >= lower_bound B and A5: D . j = upper_bound B ; ::_thesis: mid (D,i,j) is Division of B A6: (((j - i) + 1) + i) - 1 = j ; i in Seg (len D) by A1, FINSEQ_1:def_3; then A7: 1 <= i by FINSEQ_1:1; 0 <= j - i by A3, XREAL_1:48; then A8: 0 + 1 <= (j - i) + 1 by XREAL_1:6; j in Seg (len D) by A2, FINSEQ_1:def_3; then A9: j <= len D by FINSEQ_1:1; consider A1 being non empty closed_interval Subset of REAL such that A10: lower_bound A1 = (mid (D,i,j)) . 1 and A11: upper_bound A1 = (mid (D,i,j)) . (len (mid (D,i,j))) and A12: mid (D,i,j) is Division of A1 by A1, A2, A3, Th36; A13: len (mid (D,i,j)) = (j - i) + 1 by A1, A2, A3, Lm1; A14: (1 + i) - 1 = i ; for x being Real st x in A1 holds x in B proof let x be Real; ::_thesis: ( x in A1 implies x in B ) assume x in A1 ; ::_thesis: x in B then x in [.(lower_bound A1),(upper_bound A1).] by Th4; then x in { a where a is Real : ( lower_bound A1 <= a & a <= upper_bound A1 ) } by RCOMP_1:def_1; then A15: ex a being Real st ( x = a & lower_bound A1 <= a & a <= upper_bound A1 ) ; then D . i <= x by A3, A10, A7, A9, A8, A14, FINSEQ_6:122; then A16: lower_bound B <= x by A4, XXREAL_0:2; x <= upper_bound B by A3, A5, A11, A13, A7, A9, A8, A6, A15, FINSEQ_6:122; then x in { a where a is Real : ( lower_bound B <= a & a <= upper_bound B ) } by A16; then x in [.(lower_bound B),(upper_bound B).] by RCOMP_1:def_1; hence x in B by Th4; ::_thesis: verum end; then A17: A1 c= B by SUBSET_1:2; rng (mid (D,i,j)) c= A1 by A12, Def2; then A18: rng (mid (D,i,j)) c= B by A17, XBOOLE_1:1; (mid (D,i,j)) . (len (mid (D,i,j))) = D . j by A3, A13, A7, A9, A8, A6, FINSEQ_6:122; hence mid (D,i,j) is Division of B by A5, A12, A18, Def2; ::_thesis: verum end; definition let p be FinSequence of REAL ; func PartSums p -> FinSequence of REAL means :Def20: :: INTEGRA1:def 20 ( len it = len p & ( for i being Nat st i in dom p holds it . i = Sum (p | i) ) ); existence ex b1 being FinSequence of REAL st ( len b1 = len p & ( for i being Nat st i in dom p holds b1 . i = Sum (p | i) ) ) proof deffunc H1( Nat) -> Element of REAL = Sum (p | $1); consider IT being FinSequence of REAL such that A1: ( len IT = len p & ( for i being Nat st i in dom IT holds IT . i = H1(i) ) ) from FINSEQ_2:sch_1(); take IT ; ::_thesis: ( len IT = len p & ( for i being Nat st i in dom p holds IT . i = Sum (p | i) ) ) thus len IT = len p by A1; ::_thesis: for i being Nat st i in dom p holds IT . i = Sum (p | i) let i be Nat; ::_thesis: ( i in dom p implies IT . i = Sum (p | i) ) assume i in dom p ; ::_thesis: IT . i = Sum (p | i) then i in dom IT by A1, FINSEQ_3:29; hence IT . i = Sum (p | i) by A1; ::_thesis: verum end; uniqueness for b1, b2 being FinSequence of REAL st len b1 = len p & ( for i being Nat st i in dom p holds b1 . i = Sum (p | i) ) & len b2 = len p & ( for i being Nat st i in dom p holds b2 . i = Sum (p | i) ) holds b1 = b2 proof let p1, p2 be FinSequence of REAL ; ::_thesis: ( len p1 = len p & ( for i being Nat st i in dom p holds p1 . i = Sum (p | i) ) & len p2 = len p & ( for i being Nat st i in dom p holds p2 . i = Sum (p | i) ) implies p1 = p2 ) assume that A2: len p1 = len p and A3: for i being Nat st i in dom p holds p1 . i = Sum (p | i) and A4: len p2 = len p and A5: for i being Nat st i in dom p holds p2 . i = Sum (p | i) ; ::_thesis: p1 = p2 for i being Nat st 1 <= i & i <= len p1 holds p1 . i = p2 . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p1 implies p1 . i = p2 . i ) assume that A6: 1 <= i and A7: i <= len p1 ; ::_thesis: p1 . i = p2 . i A8: i in dom p by A2, A6, A7, FINSEQ_3:25; then p1 . i = Sum (p | i) by A3; hence p1 . i = p2 . i by A5, A8; ::_thesis: verum end; hence p1 = p2 by A2, A4, FINSEQ_1:14; ::_thesis: verum end; end; :: deftheorem Def20 defines PartSums INTEGRA1:def_20_:_ for p, b2 being FinSequence of REAL holds ( b2 = PartSums p iff ( len b2 = len p & ( for i being Nat st i in dom p holds b2 . i = Sum (p | i) ) ) ); theorem Th38: :: INTEGRA1:38 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & f | A is bounded_above implies for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) ) assume that A1: D1 <= D2 and A2: f | A is bounded_above ; ::_thesis: for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) for i being non empty Nat st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) proof defpred S1[ Nat] means ( $1 in dom D1 implies Sum ((upper_volume (f,D1)) | $1) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,$1))) ); A3: S1[1] proof reconsider g = f | (divset (D1,1)) as PartFunc of (divset (D1,1)),REAL by PARTFUN1:10; set B = divset (D1,1); set DD1 = mid (D1,1,1); A4: dom g = (dom f) /\ (divset (D1,1)) by RELAT_1:61; assume A5: 1 in dom D1 ; ::_thesis: Sum ((upper_volume (f,D1)) | 1) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,1))) then A6: D1 . 1 = upper_bound (divset (D1,1)) by Def4; then A7: D2 . (indx (D2,D1,1)) = upper_bound (divset (D1,1)) by A1, A5, Def19; D1 . 1 >= lower_bound (divset (D1,1)) by A6, SEQ_4:11; then reconsider DD1 = mid (D1,1,1) as Division of divset (D1,1) by A5, A6, Th37; 1 in Seg (len D1) by A5, FINSEQ_1:def_3; then A8: 1 <= len D1 by FINSEQ_1:1; then A9: len (mid (D1,1,1)) = (1 -' 1) + 1 by FINSEQ_6:118; A10: len (upper_volume (g,DD1)) = len DD1 by Def6 .= 1 by A9, XREAL_1:235 ; A11: len (mid (D1,1,1)) = 1 by A9, XREAL_1:235; then A12: len (mid (D1,1,1)) = len (D1 | 1) by A8, FINSEQ_1:59; for k being Nat st 1 <= k & k <= len (mid (D1,1,1)) holds (mid (D1,1,1)) . k = (D1 | 1) . k proof let k be Nat; ::_thesis: ( 1 <= k & k <= len (mid (D1,1,1)) implies (mid (D1,1,1)) . k = (D1 | 1) . k ) assume that A13: 1 <= k and A14: k <= len (mid (D1,1,1)) ; ::_thesis: (mid (D1,1,1)) . k = (D1 | 1) . k k in Seg (len (D1 | 1)) by A12, A13, A14, FINSEQ_1:1; then k in dom (D1 | 1) by FINSEQ_1:def_3; then k in dom (D1 | (Seg 1)) by FINSEQ_1:def_15; then A15: (D1 | (Seg 1)) . k = D1 . k by FUNCT_1:47; A16: k = 1 by A11, A13, A14, XXREAL_0:1; then (mid (D1,1,1)) . k = D1 . ((1 + 1) - 1) by A8, FINSEQ_6:118; hence (mid (D1,1,1)) . k = (D1 | 1) . k by A16, A15, FINSEQ_1:def_15; ::_thesis: verum end; then A17: mid (D1,1,1) = D1 | 1 by A12, FINSEQ_1:14; A18: for i being Nat st 1 <= i & i <= len (upper_volume (g,DD1)) holds (upper_volume (g,DD1)) . i = ((upper_volume (f,D1)) | 1) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len (upper_volume (g,DD1)) implies (upper_volume (g,DD1)) . i = ((upper_volume (f,D1)) | 1) . i ) assume that A19: 1 <= i and A20: i <= len (upper_volume (g,DD1)) ; ::_thesis: (upper_volume (g,DD1)) . i = ((upper_volume (f,D1)) | 1) . i A21: 1 in Seg 1 by FINSEQ_1:3; dom (D1 | (Seg 1)) = (dom D1) /\ (Seg 1) by RELAT_1:61; then A22: 1 in dom (D1 | (Seg 1)) by A5, A21, XBOOLE_0:def_4; dom (upper_volume (f,D1)) = Seg (len (upper_volume (f,D1))) by FINSEQ_1:def_3 .= Seg (len D1) by Def6 ; then A23: dom ((upper_volume (f,D1)) | (Seg 1)) = (Seg (len D1)) /\ (Seg 1) by RELAT_1:61 .= Seg 1 by A8, FINSEQ_1:7 ; len DD1 = 1 by A9, XREAL_1:235; then A24: 1 in dom DD1 by A21, FINSEQ_1:def_3; A25: ((upper_volume (f,D1)) | 1) . i = ((upper_volume (f,D1)) | (Seg 1)) . i by FINSEQ_1:def_15 .= ((upper_volume (f,D1)) | (Seg 1)) . 1 by A10, A19, A20, XXREAL_0:1 .= (upper_volume (f,D1)) . 1 by A23, FINSEQ_1:3, FUNCT_1:47 .= (upper_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))) by A5, Def6 ; A26: divset (D1,1) = [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by Th4 .= [.(lower_bound A),(upper_bound (divset (D1,1))).] by A5, Def4 .= [.(lower_bound A),(D1 . 1).] by A5, Def4 ; A27: (upper_volume (g,DD1)) . i = (upper_volume (g,DD1)) . 1 by A10, A19, A20, XXREAL_0:1 .= (upper_bound (rng (g | (divset (DD1,1))))) * (vol (divset (DD1,1))) by A24, Def6 ; divset (DD1,1) = [.(lower_bound (divset (DD1,1))),(upper_bound (divset (DD1,1))).] by Th4 .= [.(lower_bound (divset (D1,1))),(upper_bound (divset (DD1,1))).] by A24, Def4 .= [.(lower_bound (divset (D1,1))),(DD1 . 1).] by A24, Def4 .= [.(lower_bound A),((D1 | 1) . 1).] by A5, A17, Def4 .= [.(lower_bound A),((D1 | (Seg 1)) . 1).] by FINSEQ_1:def_15 .= [.(lower_bound A),(D1 . 1).] by A22, FUNCT_1:47 ; hence (upper_volume (g,DD1)) . i = ((upper_volume (f,D1)) | 1) . i by A4, A27, A26, A25, RELAT_1:68; ::_thesis: verum end; A28: g | (divset (D1,1)) is bounded_above proof consider a being real number such that A29: for x being set st x in A /\ (dom f) holds f . x <= a by A2, RFUNCT_1:70; for x being set st x in (divset (D1,1)) /\ (dom g) holds g . x <= a proof let x be set ; ::_thesis: ( x in (divset (D1,1)) /\ (dom g) implies g . x <= a ) A30: dom g c= dom f by RELAT_1:60; assume x in (divset (D1,1)) /\ (dom g) ; ::_thesis: g . x <= a then A31: x in dom g by XBOOLE_0:def_4; A32: A /\ (dom f) = dom f by XBOOLE_1:28; then x in A /\ (dom f) by A31, A30; then reconsider x = x as Element of A ; f . x <= a by A29, A31, A32, A30; hence g . x <= a by A31, FUNCT_1:47; ::_thesis: verum end; hence g | (divset (D1,1)) is bounded_above by RFUNCT_1:70; ::_thesis: verum end; A33: rng D2 c= A by Def2; A34: indx (D2,D1,1) in dom D2 by A1, A5, Def19; then A35: indx (D2,D1,1) in Seg (len D2) by FINSEQ_1:def_3; then A36: 1 <= indx (D2,D1,1) by FINSEQ_1:1; A37: indx (D2,D1,1) <= len D2 by A35, FINSEQ_1:1; then 1 <= len D2 by A36, XXREAL_0:2; then 1 in Seg (len D2) by FINSEQ_1:1; then A38: 1 in dom D2 by FINSEQ_1:def_3; then D2 . 1 in rng D2 by FUNCT_1:def_3; then D2 . 1 in A by A33; then D2 . 1 in [.(lower_bound A),(upper_bound A).] by Th4; then D2 . 1 in { a where a is Real : ( lower_bound A <= a & a <= upper_bound A ) } by RCOMP_1:def_1; then ex a being Real st ( D2 . 1 = a & lower_bound A <= a & a <= upper_bound A ) ; then D2 . 1 >= lower_bound (divset (D1,1)) by A5, Def4; then reconsider DD2 = mid (D2,1,(indx (D2,D1,1))) as Division of divset (D1,1) by A34, A36, A38, A7, Th37; indx (D2,D1,1) in dom D2 by A1, A5, Def19; then A39: indx (D2,D1,1) in Seg (len D2) by FINSEQ_1:def_3; then A40: 1 <= indx (D2,D1,1) by FINSEQ_1:1; A41: indx (D2,D1,1) <= len D2 by A39, FINSEQ_1:1; then A42: 1 <= len D2 by A40, XXREAL_0:2; then len (mid (D2,1,(indx (D2,D1,1)))) = ((indx (D2,D1,1)) -' 1) + 1 by A40, A41, FINSEQ_6:118; then A43: len (mid (D2,1,(indx (D2,D1,1)))) = ((indx (D2,D1,1)) - 1) + 1 by A40, XREAL_1:233; then A44: len (mid (D2,1,(indx (D2,D1,1)))) = len (D2 | (indx (D2,D1,1))) by A41, FINSEQ_1:59; A45: for k being Nat st 1 <= k & k <= len (mid (D2,1,(indx (D2,D1,1)))) holds (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k proof let k be Nat; ::_thesis: ( 1 <= k & k <= len (mid (D2,1,(indx (D2,D1,1)))) implies (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k ) assume that A46: 1 <= k and A47: k <= len (mid (D2,1,(indx (D2,D1,1)))) ; ::_thesis: (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k k in Seg (len (D2 | (indx (D2,D1,1)))) by A44, A46, A47, FINSEQ_1:1; then k in dom (D2 | (indx (D2,D1,1))) by FINSEQ_1:def_3; then k in dom (D2 | (Seg (indx (D2,D1,1)))) by FINSEQ_1:def_15; then A48: (D2 | (Seg (indx (D2,D1,1)))) . k = D2 . k by FUNCT_1:47; k in NAT by ORDINAL1:def_12; then (mid (D2,1,(indx (D2,D1,1)))) . k = D2 . ((k + 1) -' 1) by A40, A41, A42, A46, A47, FINSEQ_6:118; then (mid (D2,1,(indx (D2,D1,1)))) . k = D2 . ((k + 1) - 1) by NAT_1:11, XREAL_1:233; hence (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k by A48, FINSEQ_1:def_15; ::_thesis: verum end; then A49: mid (D2,1,(indx (D2,D1,1))) = D2 | (indx (D2,D1,1)) by A44, FINSEQ_1:14; A50: for i being Nat st 1 <= i & i <= len (upper_volume (g,DD2)) holds (upper_volume (g,DD2)) . i = ((upper_volume (f,D2)) | (indx (D2,D1,1))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len (upper_volume (g,DD2)) implies (upper_volume (g,DD2)) . i = ((upper_volume (f,D2)) | (indx (D2,D1,1))) . i ) assume that A51: 1 <= i and A52: i <= len (upper_volume (g,DD2)) ; ::_thesis: (upper_volume (g,DD2)) . i = ((upper_volume (f,D2)) | (indx (D2,D1,1))) . i A53: i <= len DD2 by A52, Def6; then A54: i in Seg (len DD2) by A51, FINSEQ_1:1; then A55: i in dom DD2 by FINSEQ_1:def_3; divset (DD2,i) = divset (D2,i) proof Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A54; then A56: i in dom D2 by FINSEQ_1:def_3; now__::_thesis:_divset_(DD2,i)_=_divset_(D2,i) percases ( i = 1 or i <> 1 ) ; supposeA57: i = 1 ; ::_thesis: divset (DD2,i) = divset (D2,i) then A58: 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by A49, A55, FINSEQ_1:def_15; then 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61; then A59: 1 in dom D2 by XBOOLE_0:def_4; A60: divset (D2,i) = [.(lower_bound (divset (D2,1))),(upper_bound (divset (D2,1))).] by A57, Th4 .= [.(lower_bound A),(upper_bound (divset (D2,1))).] by A59, Def4 .= [.(lower_bound A),(D2 . 1).] by A59, Def4 ; divset (DD2,i) = [.(lower_bound (divset (DD2,1))),(upper_bound (divset (DD2,1))).] by A57, Th4 .= [.(lower_bound (divset (D1,1))),(upper_bound (divset (DD2,1))).] by A55, A57, Def4 .= [.(lower_bound (divset (D1,1))),(DD2 . 1).] by A55, A57, Def4 .= [.(lower_bound (divset (D1,1))),((D2 | (indx (D2,D1,1))) . 1).] by A45, A53, A57 .= [.(lower_bound (divset (D1,1))),((D2 | (Seg (indx (D2,D1,1)))) . 1).] by FINSEQ_1:def_15 .= [.(lower_bound (divset (D1,1))),(D2 . 1).] by A58, FUNCT_1:47 .= [.(lower_bound A),(D2 . 1).] by A5, Def4 ; hence divset (DD2,i) = divset (D2,i) by A60; ::_thesis: verum end; supposeA61: i <> 1 ; ::_thesis: divset (DD2,i) = divset (D2,i) A62: i - 1 in dom (D2 | (Seg (indx (D2,D1,1)))) proof not i is trivial by A51, A61, NAT_2:def_1; then A63: i >= 1 + 1 by NAT_2:29; then A64: 1 <= i - 1 by XREAL_1:19; A65: ex j being Nat st i = 1 + j by A51, NAT_1:10; A66: i - 1 <= (indx (D2,D1,1)) - 0 by A43, A53, XREAL_1:13; then i - 1 <= len D2 by A37, XXREAL_0:2; then i - 1 in Seg (len D2) by A65, A64, FINSEQ_1:1; then A67: i - 1 in dom D2 by FINSEQ_1:def_3; i - 1 >= 1 by A63, XREAL_1:19; then i - 1 in Seg (indx (D2,D1,1)) by A65, A66, FINSEQ_1:1; then i - 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by A67, XBOOLE_0:def_4; hence i - 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by RELAT_1:61; ::_thesis: verum end; DD2 . (i - 1) = (D2 | (indx (D2,D1,1))) . (i - 1) by A44, A45, FINSEQ_1:14 .= (D2 | (Seg (indx (D2,D1,1)))) . (i - 1) by FINSEQ_1:def_15 ; then A68: DD2 . (i - 1) = D2 . (i - 1) by A62, FUNCT_1:47; i <= len D2 by A43, A37, A53, XXREAL_0:2; then i in Seg (len D2) by A51, FINSEQ_1:1; then i in dom D2 by FINSEQ_1:def_3; then i in (dom D2) /\ (Seg (indx (D2,D1,1))) by A43, A54, XBOOLE_0:def_4; then A69: i in dom (D2 | (Seg (indx (D2,D1,1)))) by RELAT_1:61; DD2 . i = (D2 | (indx (D2,D1,1))) . i by A44, A45, FINSEQ_1:14 .= (D2 | (Seg (indx (D2,D1,1)))) . i by FINSEQ_1:def_15 ; then A70: DD2 . i = D2 . i by A69, FUNCT_1:47; A71: divset (D2,i) = [.(lower_bound (divset (D2,i))),(upper_bound (divset (D2,i))).] by Th4 .= [.(D2 . (i - 1)),(upper_bound (divset (D2,i))).] by A56, A61, Def4 .= [.(D2 . (i - 1)),(D2 . i).] by A56, A61, Def4 ; divset (DD2,i) = [.(lower_bound (divset (DD2,i))),(upper_bound (divset (DD2,i))).] by Th4 .= [.(DD2 . (i - 1)),(upper_bound (divset (DD2,i))).] by A55, A61, Def4 .= [.(D2 . (i - 1)),(D2 . i).] by A55, A61, A68, A70, Def4 ; hence divset (DD2,i) = divset (D2,i) by A71; ::_thesis: verum end; end; end; hence divset (DD2,i) = divset (D2,i) ; ::_thesis: verum end; then A72: (upper_volume (g,DD2)) . i = (upper_bound (rng (g | (divset (D2,i))))) * (vol (divset (D2,i))) by A55, Def6; Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A54; then A73: i in dom D2 by FINSEQ_1:def_3; A74: i in dom DD2 by A54, FINSEQ_1:def_3; A75: now__::_thesis:_(_lower_bound_(divset_(D2,i))_in_[.(lower_bound_(divset_(D1,1))),(upper_bound_(divset_(D1,1))).]_&_upper_bound_(divset_(D2,i))_in_[.(lower_bound_(divset_(D1,1))),(upper_bound_(divset_(D1,1))).]_) percases ( i = 1 or i <> 1 ) ; supposeA76: i = 1 ; ::_thesis: ( lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] & upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] ) then 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by A49, A74, FINSEQ_1:def_15; then 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61; then A77: 1 in dom D2 by XBOOLE_0:def_4; then A78: D2 . 1 <= D2 . (indx (D2,D1,1)) by A34, A36, SEQ_4:137; lower_bound (divset (D2,i)) = lower_bound A by A76, A77, Def4; then A79: lower_bound (divset (D2,i)) = lower_bound (divset (D1,1)) by A5, Def4; upper_bound (divset (D2,i)) = D2 . 1 by A76, A77, Def4; then upper_bound (divset (D2,i)) <= D1 . 1 by A1, A5, A78, Def19; then A80: upper_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A5, Def4; lower_bound (divset (D1,1)) <= upper_bound (divset (D1,1)) by SEQ_4:11; hence lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by A79, XXREAL_1:1; ::_thesis: upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] lower_bound (divset (D2,i)) <= upper_bound (divset (D2,i)) by SEQ_4:11; then upper_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A79, A80; hence upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: verum end; supposeA81: i <> 1 ; ::_thesis: ( lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] & upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] ) then not i is trivial by A51, NAT_2:def_1; then i >= 1 + 1 by NAT_2:29; then A82: 1 <= i - 1 by XREAL_1:19; A83: ex j being Nat st i = 1 + j by A51, NAT_1:10; A84: rng D2 c= A by Def2; A85: lower_bound (divset (D2,i)) = D2 . (i - 1) by A73, A81, Def4; A86: lower_bound (divset (D1,1)) = lower_bound A by A5, Def4; A87: i - 1 <= (indx (D2,D1,1)) - 0 by A43, A53, XREAL_1:13; then i - 1 <= len D2 by A37, XXREAL_0:2; then i - 1 in Seg (len D2) by A83, A82, FINSEQ_1:1; then A88: i - 1 in dom D2 by FINSEQ_1:def_3; then D2 . (i - 1) in rng D2 by FUNCT_1:def_3; then A89: lower_bound (divset (D2,i)) >= lower_bound (divset (D1,1)) by A85, A86, A84, SEQ_4:def_2; A90: upper_bound (divset (D1,1)) = D1 . 1 by A5, Def4; D2 . (i - 1) <= D2 . (indx (D2,D1,1)) by A34, A87, A88, SEQ_4:137; then lower_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A1, A5, A85, A90, Def19; then lower_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A89; hence lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] A91: upper_bound (divset (D2,i)) = D2 . i by A73, A81, Def4; D2 . i in rng D2 by A73, FUNCT_1:def_3; then A92: upper_bound (divset (D2,i)) >= lower_bound (divset (D1,1)) by A91, A86, A84, SEQ_4:def_2; D2 . i <= D2 . (indx (D2,D1,1)) by A43, A34, A53, A73, SEQ_4:137; then upper_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A1, A5, A91, A90, Def19; then upper_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A92; hence upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: verum end; end; end; A93: divset (D1,1) = [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by Th4; A94: Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A54; then A95: i in dom D2 by FINSEQ_1:def_3; divset (D2,i) = [.(lower_bound (divset (D2,i))),(upper_bound (divset (D2,i))).] by Th4; then A96: divset (D2,i) c= divset (D1,1) by A93, A75, XXREAL_2:def_12; A97: dom ((upper_volume (f,D2)) | (Seg (indx (D2,D1,1)))) = (dom (upper_volume (f,D2))) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61 .= (Seg (len (upper_volume (f,D2)))) /\ (Seg (indx (D2,D1,1))) by FINSEQ_1:def_3 .= (Seg (len D2)) /\ (Seg (indx (D2,D1,1))) by Def6 .= Seg (indx (D2,D1,1)) by A94, XBOOLE_1:28 ; ((upper_volume (f,D2)) | (indx (D2,D1,1))) . i = ((upper_volume (f,D2)) | (Seg (indx (D2,D1,1)))) . i by FINSEQ_1:def_15 .= (upper_volume (f,D2)) . i by A43, A54, A97, FUNCT_1:47 .= (upper_bound (rng (f | (divset (D2,i))))) * (vol (divset (D2,i))) by A95, Def6 ; hence (upper_volume (g,DD2)) . i = ((upper_volume (f,D2)) | (indx (D2,D1,1))) . i by A72, A96, FUNCT_1:51; ::_thesis: verum end; 1 <= len (upper_volume (f,D1)) by A8, Def6; then len (upper_volume (g,DD1)) = len ((upper_volume (f,D1)) | 1) by A10, FINSEQ_1:59; then A98: upper_volume (g,DD1) = (upper_volume (f,D1)) | 1 by A18, FINSEQ_1:14; A99: indx (D2,D1,1) <= len (upper_volume (f,D2)) by A41, Def6; len (upper_volume (g,DD2)) = indx (D2,D1,1) by A43, Def6; then A100: len (upper_volume (g,DD2)) = len ((upper_volume (f,D2)) | (indx (D2,D1,1))) by A99, FINSEQ_1:59; dom g = A /\ (divset (D1,1)) by A4, FUNCT_2:def_1; then dom g = divset (D1,1) by A5, Th8, XBOOLE_1:28; then g is total by PARTFUN1:def_2; then upper_sum (g,DD1) >= upper_sum (g,DD2) by A11, A28, Th30; hence Sum ((upper_volume (f,D1)) | 1) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,1))) by A98, A100, A50, FINSEQ_1:14; ::_thesis: verum end; A101: for k being non empty Nat st S1[k] holds S1[k + 1] proof let k be non empty Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A102: ( k in dom D1 implies Sum ((upper_volume (f,D1)) | k) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,k))) ) ; ::_thesis: S1[k + 1] assume A103: k + 1 in dom D1 ; ::_thesis: Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) then A104: k + 1 in Seg (len D1) by FINSEQ_1:def_3; then A105: 1 <= k + 1 by FINSEQ_1:1; A106: k + 1 <= len D1 by A104, FINSEQ_1:1; now__::_thesis:_Sum_((upper_volume_(f,D1))_|_(k_+_1))_>=_Sum_((upper_volume_(f,D2))_|_(indx_(D2,D1,(k_+_1)))) percases ( 1 = k + 1 or 1 <> k + 1 ) ; suppose 1 = k + 1 ; ::_thesis: Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) hence Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A3, A103; ::_thesis: verum end; supposeA107: 1 <> k + 1 ; ::_thesis: Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) set IDK = indx (D2,D1,k); set IDK1 = indx (D2,D1,(k + 1)); set K1D2 = (upper_volume (f,D2)) | (indx (D2,D1,(k + 1))); set KD1 = (upper_volume (f,D1)) | k; set K1D1 = (upper_volume (f,D1)) | (k + 1); set n = k + 1; A108: k + 1 <= len (upper_volume (f,D1)) by A106, Def6; then A109: len ((upper_volume (f,D1)) | (k + 1)) = k + 1 by FINSEQ_1:59; then consider p1, q1 being FinSequence of REAL such that A110: len p1 = k and A111: len q1 = 1 and A112: (upper_volume (f,D1)) | (k + 1) = p1 ^ q1 by FINSEQ_2:23; A113: k <= k + 1 by NAT_1:11; then A114: k <= len D1 by A106, XXREAL_0:2; then A115: k <= len (upper_volume (f,D1)) by Def6; then A116: len p1 = len ((upper_volume (f,D1)) | k) by A110, FINSEQ_1:59; for i being Nat st 1 <= i & i <= len p1 holds p1 . i = ((upper_volume (f,D1)) | k) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p1 implies p1 . i = ((upper_volume (f,D1)) | k) . i ) assume that A117: 1 <= i and A118: i <= len p1 ; ::_thesis: p1 . i = ((upper_volume (f,D1)) | k) . i A119: i in Seg (len p1) by A117, A118, FINSEQ_1:1; then A120: i in dom ((upper_volume (f,D1)) | k) by A116, FINSEQ_1:def_3; then A121: i in dom ((upper_volume (f,D1)) | (Seg k)) by FINSEQ_1:def_15; k <= k + 1 by NAT_1:11; then A122: Seg k c= Seg (k + 1) by FINSEQ_1:5; A123: dom ((upper_volume (f,D1)) | (k + 1)) = Seg (len ((upper_volume (f,D1)) | (k + 1))) by FINSEQ_1:def_3 .= Seg (k + 1) by A108, FINSEQ_1:59 ; dom ((upper_volume (f,D1)) | k) = Seg (len ((upper_volume (f,D1)) | k)) by FINSEQ_1:def_3 .= Seg k by A115, FINSEQ_1:59 ; then i in dom ((upper_volume (f,D1)) | (k + 1)) by A120, A122, A123; then A124: i in dom ((upper_volume (f,D1)) | (Seg (k + 1))) by FINSEQ_1:def_15; A125: ((upper_volume (f,D1)) | (k + 1)) . i = ((upper_volume (f,D1)) | (Seg (k + 1))) . i by FINSEQ_1:def_15 .= (upper_volume (f,D1)) . i by A124, FUNCT_1:47 ; A126: ((upper_volume (f,D1)) | k) . i = ((upper_volume (f,D1)) | (Seg k)) . i by FINSEQ_1:def_15 .= (upper_volume (f,D1)) . i by A121, FUNCT_1:47 ; i in dom p1 by A119, FINSEQ_1:def_3; hence p1 . i = ((upper_volume (f,D1)) | k) . i by A112, A126, A125, FINSEQ_1:def_7; ::_thesis: verum end; then A127: p1 = (upper_volume (f,D1)) | k by A116, FINSEQ_1:14; A128: indx (D2,D1,(k + 1)) in dom D2 by A1, A103, Def19; then A129: indx (D2,D1,(k + 1)) in Seg (len D2) by FINSEQ_1:def_3; then A130: 1 <= indx (D2,D1,(k + 1)) by FINSEQ_1:1; not k + 1 is trivial by A107, NAT_2:def_1; then k + 1 >= 2 by NAT_2:29; then k >= (1 + 1) - 1 by XREAL_1:20; then A131: k in Seg (len D1) by A114, FINSEQ_1:1; then A132: k in dom D1 by FINSEQ_1:def_3; then A133: indx (D2,D1,k) in dom D2 by A1, Def19; A134: indx (D2,D1,k) < indx (D2,D1,(k + 1)) proof k < k + 1 by NAT_1:13; then A135: D1 . k < D1 . (k + 1) by A103, A132, SEQM_3:def_1; assume indx (D2,D1,k) >= indx (D2,D1,(k + 1)) ; ::_thesis: contradiction then A136: D2 . (indx (D2,D1,k)) >= D2 . (indx (D2,D1,(k + 1))) by A133, A128, SEQ_4:137; D1 . k = D2 . (indx (D2,D1,k)) by A1, A132, Def19; hence contradiction by A1, A103, A136, A135, Def19; ::_thesis: verum end; A137: indx (D2,D1,(k + 1)) >= indx (D2,D1,k) proof assume indx (D2,D1,(k + 1)) < indx (D2,D1,k) ; ::_thesis: contradiction then A138: D2 . (indx (D2,D1,(k + 1))) < D2 . (indx (D2,D1,k)) by A133, A128, SEQM_3:def_1; D1 . (k + 1) = D2 . (indx (D2,D1,(k + 1))) by A1, A103, Def19; then D1 . (k + 1) < D1 . k by A1, A132, A138, Def19; hence contradiction by A103, A132, NAT_1:11, SEQ_4:137; ::_thesis: verum end; then consider ID being Nat such that A139: indx (D2,D1,(k + 1)) = (indx (D2,D1,k)) + ID by NAT_1:10; reconsider ID = ID as Element of NAT by ORDINAL1:def_12; A140: len (upper_volume (f,D2)) = len D2 by Def6; then A141: indx (D2,D1,(k + 1)) <= len (upper_volume (f,D2)) by A129, FINSEQ_1:1; then len ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = (indx (D2,D1,k)) + ((indx (D2,D1,(k + 1))) - (indx (D2,D1,k))) by FINSEQ_1:59; then consider p2, q2 being FinSequence of REAL such that A142: len p2 = indx (D2,D1,k) and A143: len q2 = (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) and A144: (upper_volume (f,D2)) | (indx (D2,D1,(k + 1))) = p2 ^ q2 by A139, FINSEQ_2:23; indx (D2,D1,k) in dom D2 by A1, A132, Def19; then A145: indx (D2,D1,k) in Seg (len (upper_volume (f,D2))) by A140, FINSEQ_1:def_3; then A146: 1 <= indx (D2,D1,k) by FINSEQ_1:1; set KD2 = (upper_volume (f,D2)) | (indx (D2,D1,k)); A147: Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = (Sum p2) + (Sum q2) by A144, RVSUM_1:75; A148: indx (D2,D1,k) <= len (upper_volume (f,D2)) by A145, FINSEQ_1:1; then A149: len p2 = len ((upper_volume (f,D2)) | (indx (D2,D1,k))) by A142, FINSEQ_1:59; for i being Nat st 1 <= i & i <= len p2 holds p2 . i = ((upper_volume (f,D2)) | (indx (D2,D1,k))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p2 implies p2 . i = ((upper_volume (f,D2)) | (indx (D2,D1,k))) . i ) assume that A150: 1 <= i and A151: i <= len p2 ; ::_thesis: p2 . i = ((upper_volume (f,D2)) | (indx (D2,D1,k))) . i A152: i in Seg (len p2) by A150, A151, FINSEQ_1:1; then A153: i in dom ((upper_volume (f,D2)) | (indx (D2,D1,k))) by A149, FINSEQ_1:def_3; then A154: i in dom ((upper_volume (f,D2)) | (Seg (indx (D2,D1,k)))) by FINSEQ_1:def_15; A155: dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = Seg (len ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,(k + 1))) by A141, FINSEQ_1:59 ; A156: Seg (indx (D2,D1,k)) c= Seg (indx (D2,D1,(k + 1))) by A137, FINSEQ_1:5; dom ((upper_volume (f,D2)) | (indx (D2,D1,k))) = Seg (len ((upper_volume (f,D2)) | (indx (D2,D1,k)))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,k)) by A148, FINSEQ_1:59 ; then i in dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A153, A156, A155; then A157: i in dom ((upper_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_15; A158: ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) . i = ((upper_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) . i by FINSEQ_1:def_15 .= (upper_volume (f,D2)) . i by A157, FUNCT_1:47 ; A159: ((upper_volume (f,D2)) | (indx (D2,D1,k))) . i = ((upper_volume (f,D2)) | (Seg (indx (D2,D1,k)))) . i by FINSEQ_1:def_15 .= (upper_volume (f,D2)) . i by A154, FUNCT_1:47 ; i in dom p2 by A152, FINSEQ_1:def_3; hence p2 . i = ((upper_volume (f,D2)) | (indx (D2,D1,k))) . i by A144, A159, A158, FINSEQ_1:def_7; ::_thesis: verum end; then A160: p2 = (upper_volume (f,D2)) | (indx (D2,D1,k)) by A149, FINSEQ_1:14; A161: indx (D2,D1,(k + 1)) <= len D2 by A129, FINSEQ_1:1; A162: ID = (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) by A139; A163: Sum q1 >= Sum q2 proof set MD2 = mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))); set MD1 = mid (D1,(k + 1),(k + 1)); set DD1 = divset (D1,(k + 1)); set g = f | (divset (D1,(k + 1))); A164: 1 <= (indx (D2,D1,k)) + 1 by NAT_1:11; reconsider g = f | (divset (D1,(k + 1))) as PartFunc of (divset (D1,(k + 1))),REAL by PARTFUN1:10; (k + 1) - 1 = k ; then A165: lower_bound (divset (D1,(k + 1))) = D1 . k by A103, A107, Def4; D2 . (indx (D2,D1,(k + 1))) = D1 . (k + 1) by A1, A103, Def19; then A166: D2 . (indx (D2,D1,(k + 1))) = upper_bound (divset (D1,(k + 1))) by A103, A107, Def4; A167: (indx (D2,D1,k)) + 1 <= indx (D2,D1,(k + 1)) by A134, NAT_1:13; then A168: (indx (D2,D1,k)) + 1 <= len D2 by A161, XXREAL_0:2; then (indx (D2,D1,k)) + 1 in Seg (len D2) by A164, FINSEQ_1:1; then A169: (indx (D2,D1,k)) + 1 in dom D2 by FINSEQ_1:def_3; then D2 . ((indx (D2,D1,k)) + 1) >= D2 . (indx (D2,D1,k)) by A133, NAT_1:11, SEQ_4:137; then D2 . ((indx (D2,D1,k)) + 1) >= lower_bound (divset (D1,(k + 1))) by A1, A132, A165, Def19; then reconsider MD2 = mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))) as Division of divset (D1,(k + 1)) by A128, A167, A169, A166, Th37; A170: ((indx (D2,D1,(k + 1))) -' ((indx (D2,D1,k)) + 1)) + 1 = ((indx (D2,D1,(k + 1))) - ((indx (D2,D1,k)) + 1)) + 1 by A167, XREAL_1:233 .= (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) ; A171: for n being Nat st 1 <= n & n <= len q2 holds q2 . n = (upper_volume (g,MD2)) . n proof A172: dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = Seg (len ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,(k + 1))) by A141, FINSEQ_1:59 ; then A173: dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) c= Seg (len D2) by A161, FINSEQ_1:5; then A174: dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) c= dom D2 by FINSEQ_1:def_3; A175: len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) = ID by A130, A161, A139, A167, A168, A164, A170, FINSEQ_6:118; let n be Nat; ::_thesis: ( 1 <= n & n <= len q2 implies q2 . n = (upper_volume (g,MD2)) . n ) assume that A176: 1 <= n and A177: n <= len q2 ; ::_thesis: q2 . n = (upper_volume (g,MD2)) . n A178: n in Seg (len q2) by A176, A177, FINSEQ_1:1; then A179: n in dom q2 by FINSEQ_1:def_3; then A180: (indx (D2,D1,k)) + n in dom ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A142, A144, FINSEQ_1:28; then A181: (indx (D2,D1,k)) + n in dom ((upper_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_15; A182: q2 . n = ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) . ((indx (D2,D1,k)) + n) by A142, A144, A179, FINSEQ_1:def_7 .= ((upper_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) . ((indx (D2,D1,k)) + n) by FINSEQ_1:def_15 .= (upper_volume (f,D2)) . ((indx (D2,D1,k)) + n) by A181, FUNCT_1:47 .= (upper_bound (rng (f | (divset (D2,((indx (D2,D1,k)) + n)))))) * (vol (divset (D2,((indx (D2,D1,k)) + n)))) by A180, A174, Def6 ; (indx (D2,D1,k)) + n in Seg (len D2) by A180, A173; then A183: (indx (D2,D1,k)) + n in dom D2 by FINSEQ_1:def_3; (indx (D2,D1,k)) + n <= indx (D2,D1,(k + 1)) by A172, A180, FINSEQ_1:1; then A184: n <= ID by A162, XREAL_1:19; then n in Seg ID by A176, FINSEQ_1:1; then A185: n in dom MD2 by A175, FINSEQ_1:def_3; n in Seg (len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))))) by A176, A184, A175, FINSEQ_1:1; then A186: n in dom (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) by FINSEQ_1:def_3; A187: 1 <= (indx (D2,D1,k)) + n by A172, A180, FINSEQ_1:1; A188: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) proof now__::_thesis:_(_divset_(MD2,n)_=_divset_(D2,((indx_(D2,D1,k))_+_n))_&_divset_(MD2,n)_=_divset_(D2,((indx_(D2,D1,k))_+_n))_&_divset_(D2,((indx_(D2,D1,k))_+_n))_c=_divset_(D1,(k_+_1))_) percases ( n = 1 or n <> 1 ) ; supposeA189: n = 1 ; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) then A190: (indx (D2,D1,k)) + 1 <= len D2 by A180, A173, FINSEQ_1:1; A191: 1 <= (indx (D2,D1,k)) + 1 by A172, A180, A189, FINSEQ_1:1; A192: upper_bound (divset (MD2,1)) = (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) . 1 by A185, A189, Def4 .= D2 . (1 + (indx (D2,D1,k))) by A130, A161, A191, A190, FINSEQ_6:118 ; A193: (indx (D2,D1,k)) + 1 <> 1 by A146, NAT_1:13; A194: (k + 1) - 1 = k ; A195: lower_bound (divset (MD2,1)) = lower_bound (divset (D1,(k + 1))) by A185, A189, Def4 .= D1 . k by A103, A107, A194, Def4 ; A196: divset (D2,((indx (D2,D1,k)) + n)) = [.(lower_bound (divset (D2,((indx (D2,D1,k)) + 1)))),(upper_bound (divset (D2,((indx (D2,D1,k)) + 1)))).] by A189, Th4 .= [.(D2 . (((indx (D2,D1,k)) + 1) - 1)),(upper_bound (divset (D2,((indx (D2,D1,k)) + 1)))).] by A169, A193, Def4 .= [.(D2 . (indx (D2,D1,k))),(D2 . ((indx (D2,D1,k)) + 1)).] by A169, A193, Def4 .= [.(D1 . k),(D2 . ((indx (D2,D1,k)) + 1)).] by A1, A132, Def19 ; hence divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) by A189, A195, A192, Th4; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) divset (MD2,n) = [.(D1 . k),(D2 . ((indx (D2,D1,k)) + 1)).] by A189, A195, A192, Th4; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) by A185, A196, Th8; ::_thesis: verum end; supposeA197: n <> 1 ; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) A198: (indx (D2,D1,k)) + n <> 1 proof assume (indx (D2,D1,k)) + n = 1 ; ::_thesis: contradiction then indx (D2,D1,k) = 1 - n ; then n + 1 <= 1 by A146, XREAL_1:19; then n <= 1 - 1 by XREAL_1:19; hence contradiction by A176, NAT_1:3; ::_thesis: verum end; A199: divset (D2,((indx (D2,D1,k)) + n)) = [.(lower_bound (divset (D2,((indx (D2,D1,k)) + n)))),(upper_bound (divset (D2,((indx (D2,D1,k)) + n)))).] by Th4 .= [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(upper_bound (divset (D2,((indx (D2,D1,k)) + n)))).] by A183, A198, Def4 .= [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(D2 . ((indx (D2,D1,k)) + n)).] by A183, A198, Def4 ; n <= n + 1 by NAT_1:12; then n - 1 <= n by XREAL_1:20; then A200: n - 1 <= len MD2 by A184, A175, XXREAL_0:2; consider n1 being Nat such that A201: n = 1 + n1 by A176, NAT_1:10; not n is trivial by A176, A197, NAT_2:def_1; then n >= 1 + 1 by NAT_2:29; then A202: 1 <= n - 1 by XREAL_1:19; A203: (indx (D2,D1,k)) + 1 <= indx (D2,D1,(k + 1)) by A134, NAT_1:13; reconsider n1 = n1 as Element of NAT by ORDINAL1:def_12; A204: (n1 + ((indx (D2,D1,k)) + 1)) -' 1 = ((indx (D2,D1,k)) + n) - 1 by A187, A201, XREAL_1:233; A205: (n + ((indx (D2,D1,k)) + 1)) -' 1 = ((n + (indx (D2,D1,k))) + 1) - 1 by NAT_1:11, XREAL_1:233 .= (indx (D2,D1,k)) + n ; A206: lower_bound (divset (MD2,n)) = MD2 . (n - 1) by A185, A197, Def4 .= D2 . (((indx (D2,D1,k)) + n) - 1) by A130, A161, A168, A164, A203, A201, A204, A202, A200, FINSEQ_6:118 ; A207: upper_bound (divset (MD2,n)) = MD2 . n by A185, A197, Def4 .= D2 . ((indx (D2,D1,k)) + n) by A130, A161, A168, A164, A176, A178, A184, A175, A203, A205, FINSEQ_6:118 ; hence divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) by A206, A199, Th4; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) divset (MD2,n) = [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(D2 . ((indx (D2,D1,k)) + n)).] by A206, A207, Th4; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) by A185, A199, Th8; ::_thesis: verum end; end; end; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) ; ::_thesis: verum end; then g | (divset (MD2,n)) = f | (divset (D2,((indx (D2,D1,k)) + n))) by FUNCT_1:51; hence q2 . n = (upper_volume (g,MD2)) . n by A186, A182, A188, Def6; ::_thesis: verum end; (k + 1) - 1 = k ; then A208: lower_bound (divset (D1,(k + 1))) = D1 . k by A103, A107, Def4; D1 . (k + 1) = upper_bound (divset (D1,(k + 1))) by A103, A107, Def4; then reconsider MD1 = mid (D1,(k + 1),(k + 1)) as Division of divset (D1,(k + 1)) by A103, A113, A132, A208, Th37, SEQ_4:137; A209: g | (divset (D1,(k + 1))) is bounded_above proof consider a being real number such that A210: for x being set st x in A /\ (dom f) holds f . x <= a by A2, RFUNCT_1:70; for x being set st x in (divset (D1,(k + 1))) /\ (dom g) holds g . x <= a proof let x be set ; ::_thesis: ( x in (divset (D1,(k + 1))) /\ (dom g) implies g . x <= a ) A211: dom g c= dom f by RELAT_1:60; assume x in (divset (D1,(k + 1))) /\ (dom g) ; ::_thesis: g . x <= a then A212: x in dom g by XBOOLE_0:def_4; A213: A /\ (dom f) = dom f by XBOOLE_1:28; then x in A /\ (dom f) by A212, A211; then reconsider x = x as Element of A ; f . x <= a by A210, A212, A213, A211; hence g . x <= a by A212, FUNCT_1:47; ::_thesis: verum end; hence g | (divset (D1,(k + 1))) is bounded_above by RFUNCT_1:70; ::_thesis: verum end; len MD1 = ((k + 1) -' (k + 1)) + 1 by A105, A106, FINSEQ_6:118; then A214: len MD1 = ((k + 1) - (k + 1)) + 1 by XREAL_1:233; then A215: dom q1 = dom MD1 by A111, FINSEQ_3:29; A216: for n being Nat st 1 <= n & n <= len q1 holds q1 . n = (upper_volume (g,MD1)) . n proof k + 1 in Seg (len ((upper_volume (f,D1)) | (k + 1))) by A109, FINSEQ_1:4; then k + 1 in dom ((upper_volume (f,D1)) | (k + 1)) by FINSEQ_1:def_3; then A217: k + 1 in dom ((upper_volume (f,D1)) | (Seg (k + 1))) by FINSEQ_1:def_15; A218: MD1 . 1 = D1 . (k + 1) by A105, A106, FINSEQ_6:118; 1 in Seg (len MD1) by A214, FINSEQ_1:3; then A219: 1 in dom MD1 by FINSEQ_1:def_3; divset (MD1,1) = [.(lower_bound (divset (MD1,1))),(upper_bound (divset (MD1,1))).] by Th4; then A220: divset (MD1,1) = [.(lower_bound (divset (D1,(k + 1)))),(upper_bound (divset (MD1,1))).] by A219, Def4 .= [.(lower_bound (divset (D1,(k + 1)))),(D1 . (k + 1)).] by A219, A218, Def4 ; (k + 1) - 1 = k ; then A221: lower_bound (divset (D1,(k + 1))) = D1 . k by A103, A107, Def4; let n be Nat; ::_thesis: ( 1 <= n & n <= len q1 implies q1 . n = (upper_volume (g,MD1)) . n ) assume that A222: 1 <= n and A223: n <= len q1 ; ::_thesis: q1 . n = (upper_volume (g,MD1)) . n A224: n = 1 by A111, A222, A223, XXREAL_0:1; n in Seg (len q1) by A222, A223, FINSEQ_1:1; then A225: n in dom q1 by FINSEQ_1:def_3; upper_bound (divset (D1,(k + 1))) = D1 . (k + 1) by A103, A107, Def4; then divset (D1,(k + 1)) = [.(D1 . k),(D1 . (k + 1)).] by A221, Th4; then A226: (upper_volume (g,MD1)) . n = (upper_bound (rng (g | (divset (D1,(k + 1)))))) * (vol (divset (D1,(k + 1)))) by A215, A224, A225, A220, A221, Def6; ((upper_volume (f,D1)) | (k + 1)) . (k + 1) = ((upper_volume (f,D1)) | (Seg (k + 1))) . (k + 1) by FINSEQ_1:def_15 .= (upper_volume (f,D1)) . (k + 1) by A217, FUNCT_1:47 ; then q1 . n = (upper_volume (f,D1)) . (k + 1) by A110, A112, A224, A225, FINSEQ_1:def_7 .= (upper_bound (rng (f | (divset (D1,(k + 1)))))) * (vol (divset (D1,(k + 1)))) by A103, Def6 ; hence q1 . n = (upper_volume (g,MD1)) . n by A226; ::_thesis: verum end; len q1 = len (upper_volume (g,MD1)) by A111, A214, Def6; then A227: q1 = upper_volume (g,MD1) by A216, FINSEQ_1:14; dom g = (dom f) /\ (divset (D1,(k + 1))) by RELAT_1:61; then dom g = A /\ (divset (D1,(k + 1))) by FUNCT_2:def_1; then dom g = divset (D1,(k + 1)) by A103, Th8, XBOOLE_1:28; then A228: g is total by PARTFUN1:def_2; len MD1 = ((k + 1) -' (k + 1)) + 1 by A105, A106, FINSEQ_6:118; then len MD1 = ((k + 1) - (k + 1)) + 1 by XREAL_1:233; then A229: upper_sum (g,MD1) >= upper_sum (g,MD2) by A209, A228, Th30; len (upper_volume (g,MD2)) = len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) by Def6 .= (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) by A130, A161, A167, A168, A164, A170, FINSEQ_6:118 ; hence Sum q1 >= Sum q2 by A143, A227, A171, A229, FINSEQ_1:14; ::_thesis: verum end; Sum ((upper_volume (f,D1)) | (k + 1)) = (Sum p1) + (Sum q1) by A112, RVSUM_1:75; then Sum q1 = (Sum ((upper_volume (f,D1)) | (k + 1))) - (Sum p1) ; then Sum ((upper_volume (f,D1)) | (k + 1)) >= (Sum q2) + (Sum p1) by A163, XREAL_1:19; then (Sum ((upper_volume (f,D1)) | (k + 1))) - (Sum q2) >= Sum p1 by XREAL_1:19; then (Sum ((upper_volume (f,D1)) | (k + 1))) - (Sum q2) >= Sum p2 by A102, A131, A127, A160, FINSEQ_1:def_3, XXREAL_0:2; hence Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A147, XREAL_1:19; ::_thesis: verum end; end; end; hence Sum ((upper_volume (f,D1)) | (k + 1)) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,(k + 1)))) ; ::_thesis: verum end; thus for k being non empty Nat holds S1[k] from NAT_1:sch_10(A3, A101); ::_thesis: verum end; hence for i being non empty Element of NAT st i in dom D1 holds Sum ((upper_volume (f,D1)) | i) >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) ; ::_thesis: verum end; theorem Th39: :: INTEGRA1:39 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & f | A is bounded_below implies for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) ) assume that A1: D1 <= D2 and A2: f | A is bounded_below ; ::_thesis: for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) for i being non empty Nat st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) proof defpred S1[ Nat] means ( $1 in dom D1 implies Sum ((lower_volume (f,D1)) | $1) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,$1))) ); A3: S1[1] proof set g = f | (divset (D1,1)); set B = divset (D1,1); set DD2 = mid (D2,1,(indx (D2,D1,1))); set DD1 = mid (D1,1,1); reconsider g = f | (divset (D1,1)) as PartFunc of (divset (D1,1)),REAL by PARTFUN1:10; A4: dom g = (dom f) /\ (divset (D1,1)) by RELAT_1:61; assume A5: 1 in dom D1 ; ::_thesis: Sum ((lower_volume (f,D1)) | 1) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,1))) then A6: D1 . 1 = upper_bound (divset (D1,1)) by Def4; then A7: D2 . (indx (D2,D1,1)) = upper_bound (divset (D1,1)) by A1, A5, Def19; lower_bound (divset (D1,1)) <= upper_bound (divset (D1,1)) by SEQ_4:11; then reconsider DD1 = mid (D1,1,1) as Division of divset (D1,1) by A5, A6, Th37; 1 in Seg (len D1) by A5, FINSEQ_1:def_3; then A8: 1 <= len D1 by FINSEQ_1:1; then A9: len (mid (D1,1,1)) = (1 -' 1) + 1 by FINSEQ_6:118; A10: len (lower_volume (g,DD1)) = len DD1 by Def7 .= 1 by A9, XREAL_1:235 ; A11: len (mid (D1,1,1)) = 1 by A9, XREAL_1:235; then A12: len (mid (D1,1,1)) = len (D1 | 1) by A8, FINSEQ_1:59; for k being Nat st 1 <= k & k <= len (mid (D1,1,1)) holds (mid (D1,1,1)) . k = (D1 | 1) . k proof let k be Nat; ::_thesis: ( 1 <= k & k <= len (mid (D1,1,1)) implies (mid (D1,1,1)) . k = (D1 | 1) . k ) assume that A13: 1 <= k and A14: k <= len (mid (D1,1,1)) ; ::_thesis: (mid (D1,1,1)) . k = (D1 | 1) . k k in Seg (len (D1 | 1)) by A12, A13, A14, FINSEQ_1:1; then k in dom (D1 | 1) by FINSEQ_1:def_3; then k in dom (D1 | (Seg 1)) by FINSEQ_1:def_15; then A15: (D1 | (Seg 1)) . k = D1 . k by FUNCT_1:47; A16: k = 1 by A11, A13, A14, XXREAL_0:1; then (mid (D1,1,1)) . k = D1 . ((1 + 1) - 1) by A8, FINSEQ_6:118; hence (mid (D1,1,1)) . k = (D1 | 1) . k by A16, A15, FINSEQ_1:def_15; ::_thesis: verum end; then A17: mid (D1,1,1) = D1 | 1 by A12, FINSEQ_1:14; A18: for i being Nat st 1 <= i & i <= len (lower_volume (g,DD1)) holds (lower_volume (g,DD1)) . i = ((lower_volume (f,D1)) | 1) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len (lower_volume (g,DD1)) implies (lower_volume (g,DD1)) . i = ((lower_volume (f,D1)) | 1) . i ) assume that A19: 1 <= i and A20: i <= len (lower_volume (g,DD1)) ; ::_thesis: (lower_volume (g,DD1)) . i = ((lower_volume (f,D1)) | 1) . i A21: 1 in Seg 1 by FINSEQ_1:3; dom (D1 | (Seg 1)) = (dom D1) /\ (Seg 1) by RELAT_1:61; then A22: 1 in dom (D1 | (Seg 1)) by A5, A21, XBOOLE_0:def_4; dom (lower_volume (f,D1)) = Seg (len (lower_volume (f,D1))) by FINSEQ_1:def_3 .= Seg (len D1) by Def7 ; then A23: dom ((lower_volume (f,D1)) | (Seg 1)) = (Seg (len D1)) /\ (Seg 1) by RELAT_1:61 .= Seg 1 by A8, FINSEQ_1:7 ; len DD1 = 1 by A9, XREAL_1:235; then A24: 1 in dom DD1 by A21, FINSEQ_1:def_3; A25: ((lower_volume (f,D1)) | 1) . i = ((lower_volume (f,D1)) | (Seg 1)) . i by FINSEQ_1:def_15 .= ((lower_volume (f,D1)) | (Seg 1)) . 1 by A10, A19, A20, XXREAL_0:1 .= (lower_volume (f,D1)) . 1 by A23, FINSEQ_1:3, FUNCT_1:47 .= (lower_bound (rng (f | (divset (D1,1))))) * (vol (divset (D1,1))) by A5, Def7 ; A26: divset (D1,1) = [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by Th4 .= [.(lower_bound A),(upper_bound (divset (D1,1))).] by A5, Def4 .= [.(lower_bound A),(D1 . 1).] by A5, Def4 ; A27: (lower_volume (g,DD1)) . i = (lower_volume (g,DD1)) . 1 by A10, A19, A20, XXREAL_0:1 .= (lower_bound (rng (g | (divset (DD1,1))))) * (vol (divset (DD1,1))) by A24, Def7 ; divset (DD1,1) = [.(lower_bound (divset (DD1,1))),(upper_bound (divset (DD1,1))).] by Th4 .= [.(lower_bound (divset (D1,1))),(upper_bound (divset (DD1,1))).] by A24, Def4 .= [.(lower_bound (divset (D1,1))),(DD1 . 1).] by A24, Def4 .= [.(lower_bound A),((D1 | 1) . 1).] by A5, A17, Def4 .= [.(lower_bound A),((D1 | (Seg 1)) . 1).] by FINSEQ_1:def_15 .= [.(lower_bound A),(D1 . 1).] by A22, FUNCT_1:47 ; hence (lower_volume (g,DD1)) . i = ((lower_volume (f,D1)) | 1) . i by A4, A27, A26, A25, RELAT_1:68; ::_thesis: verum end; A28: g | (divset (D1,1)) is bounded_below proof consider a being real number such that A29: for x being set st x in A /\ (dom f) holds a <= f . x by A2, RFUNCT_1:71; for x being set st x in (divset (D1,1)) /\ (dom g) holds a <= g . x proof let x be set ; ::_thesis: ( x in (divset (D1,1)) /\ (dom g) implies a <= g . x ) A30: dom g c= dom f by RELAT_1:60; assume x in (divset (D1,1)) /\ (dom g) ; ::_thesis: a <= g . x then A31: x in dom g by XBOOLE_0:def_4; A32: A /\ (dom f) = dom f by XBOOLE_1:28; then reconsider x = x as Element of A by A31, A30, XBOOLE_0:def_4; a <= f . x by A29, A31, A32, A30; hence a <= g . x by A31, FUNCT_1:47; ::_thesis: verum end; hence g | (divset (D1,1)) is bounded_below by RFUNCT_1:71; ::_thesis: verum end; A33: rng D2 c= A by Def2; A34: indx (D2,D1,1) in dom D2 by A1, A5, Def19; then A35: indx (D2,D1,1) in Seg (len D2) by FINSEQ_1:def_3; then A36: 1 <= indx (D2,D1,1) by FINSEQ_1:1; A37: indx (D2,D1,1) <= len D2 by A35, FINSEQ_1:1; then 1 <= len D2 by A36, XXREAL_0:2; then 1 in Seg (len D2) by FINSEQ_1:1; then A38: 1 in dom D2 by FINSEQ_1:def_3; then D2 . 1 in rng D2 by FUNCT_1:def_3; then D2 . 1 in A by A33; then D2 . 1 in [.(lower_bound A),(upper_bound A).] by Th4; then D2 . 1 in { a where a is Real : ( lower_bound A <= a & a <= upper_bound A ) } by RCOMP_1:def_1; then ex a being Real st ( D2 . 1 = a & lower_bound A <= a & a <= upper_bound A ) ; then D2 . 1 >= lower_bound (divset (D1,1)) by A5, Def4; then reconsider DD2 = mid (D2,1,(indx (D2,D1,1))) as Division of divset (D1,1) by A34, A36, A38, A7, Th37; indx (D2,D1,1) in dom D2 by A1, A5, Def19; then A39: indx (D2,D1,1) in Seg (len D2) by FINSEQ_1:def_3; then A40: 1 <= indx (D2,D1,1) by FINSEQ_1:1; A41: indx (D2,D1,1) <= len D2 by A39, FINSEQ_1:1; then A42: 1 <= len D2 by A40, XXREAL_0:2; then len (mid (D2,1,(indx (D2,D1,1)))) = ((indx (D2,D1,1)) -' 1) + 1 by A40, A41, FINSEQ_6:118; then A43: len (mid (D2,1,(indx (D2,D1,1)))) = ((indx (D2,D1,1)) - 1) + 1 by A40, XREAL_1:233; then A44: len (mid (D2,1,(indx (D2,D1,1)))) = len (D2 | (indx (D2,D1,1))) by A41, FINSEQ_1:59; A45: for k being Nat st 1 <= k & k <= len (mid (D2,1,(indx (D2,D1,1)))) holds (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k proof let k be Nat; ::_thesis: ( 1 <= k & k <= len (mid (D2,1,(indx (D2,D1,1)))) implies (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k ) assume that A46: 1 <= k and A47: k <= len (mid (D2,1,(indx (D2,D1,1)))) ; ::_thesis: (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k A48: k in Seg (len (D2 | (indx (D2,D1,1)))) by A44, A46, A47, FINSEQ_1:1; then k in dom (D2 | (indx (D2,D1,1))) by FINSEQ_1:def_3; then k in dom (D2 | (Seg (indx (D2,D1,1)))) by FINSEQ_1:def_15; then A49: (D2 | (Seg (indx (D2,D1,1)))) . k = D2 . k by FUNCT_1:47; (mid (D2,1,(indx (D2,D1,1)))) . k = D2 . ((k + 1) -' 1) by A40, A41, A42, A46, A47, A48, FINSEQ_6:118; then (mid (D2,1,(indx (D2,D1,1)))) . k = D2 . ((k + 1) - 1) by NAT_1:11, XREAL_1:233; hence (mid (D2,1,(indx (D2,D1,1)))) . k = (D2 | (indx (D2,D1,1))) . k by A49, FINSEQ_1:def_15; ::_thesis: verum end; then A50: mid (D2,1,(indx (D2,D1,1))) = D2 | (indx (D2,D1,1)) by A44, FINSEQ_1:14; A51: for i being Nat st 1 <= i & i <= len (lower_volume (g,DD2)) holds (lower_volume (g,DD2)) . i = ((lower_volume (f,D2)) | (indx (D2,D1,1))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len (lower_volume (g,DD2)) implies (lower_volume (g,DD2)) . i = ((lower_volume (f,D2)) | (indx (D2,D1,1))) . i ) assume that A52: 1 <= i and A53: i <= len (lower_volume (g,DD2)) ; ::_thesis: (lower_volume (g,DD2)) . i = ((lower_volume (f,D2)) | (indx (D2,D1,1))) . i A54: i <= len DD2 by A53, Def7; then A55: i in Seg (len DD2) by A52, FINSEQ_1:1; then A56: i in dom DD2 by FINSEQ_1:def_3; divset (DD2,i) = divset (D2,i) proof Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A55; then A57: i in dom D2 by FINSEQ_1:def_3; now__::_thesis:_divset_(DD2,i)_=_divset_(D2,i) percases ( i = 1 or i <> 1 ) ; supposeA58: i = 1 ; ::_thesis: divset (DD2,i) = divset (D2,i) then A59: 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by A50, A56, FINSEQ_1:def_15; then 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61; then A60: 1 in dom D2 by XBOOLE_0:def_4; A61: divset (D2,i) = [.(lower_bound (divset (D2,1))),(upper_bound (divset (D2,1))).] by A58, Th4 .= [.(lower_bound A),(upper_bound (divset (D2,1))).] by A60, Def4 .= [.(lower_bound A),(D2 . 1).] by A60, Def4 ; divset (DD2,i) = [.(lower_bound (divset (DD2,1))),(upper_bound (divset (DD2,1))).] by A58, Th4 .= [.(lower_bound (divset (D1,1))),(upper_bound (divset (DD2,1))).] by A56, A58, Def4 .= [.(lower_bound (divset (D1,1))),(DD2 . 1).] by A56, A58, Def4 .= [.(lower_bound (divset (D1,1))),((D2 | (indx (D2,D1,1))) . 1).] by A45, A54, A58 .= [.(lower_bound (divset (D1,1))),((D2 | (Seg (indx (D2,D1,1)))) . 1).] by FINSEQ_1:def_15 .= [.(lower_bound (divset (D1,1))),(D2 . 1).] by A59, FUNCT_1:47 .= [.(lower_bound A),(D2 . 1).] by A5, Def4 ; hence divset (DD2,i) = divset (D2,i) by A61; ::_thesis: verum end; supposeA62: i <> 1 ; ::_thesis: divset (DD2,i) = divset (D2,i) A63: i - 1 in dom (D2 | (Seg (indx (D2,D1,1)))) proof not i is trivial by A52, A62, NAT_2:def_1; then A64: i >= 1 + 1 by NAT_2:29; then A65: 1 <= i - 1 by XREAL_1:19; A66: ex j being Nat st i = 1 + j by A52, NAT_1:10; A67: i - 1 <= (indx (D2,D1,1)) - 0 by A43, A54, XREAL_1:13; then i - 1 <= len D2 by A37, XXREAL_0:2; then i - 1 in Seg (len D2) by A66, A65, FINSEQ_1:1; then A68: i - 1 in dom D2 by FINSEQ_1:def_3; i - 1 >= 1 by A64, XREAL_1:19; then i - 1 in Seg (indx (D2,D1,1)) by A66, A67, FINSEQ_1:1; then i - 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by A68, XBOOLE_0:def_4; hence i - 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by RELAT_1:61; ::_thesis: verum end; DD2 . (i - 1) = (D2 | (indx (D2,D1,1))) . (i - 1) by A44, A45, FINSEQ_1:14 .= (D2 | (Seg (indx (D2,D1,1)))) . (i - 1) by FINSEQ_1:def_15 ; then A69: DD2 . (i - 1) = D2 . (i - 1) by A63, FUNCT_1:47; i <= len D2 by A43, A37, A54, XXREAL_0:2; then i in Seg (len D2) by A52, FINSEQ_1:1; then i in dom D2 by FINSEQ_1:def_3; then i in (dom D2) /\ (Seg (indx (D2,D1,1))) by A43, A55, XBOOLE_0:def_4; then A70: i in dom (D2 | (Seg (indx (D2,D1,1)))) by RELAT_1:61; DD2 . i = (D2 | (indx (D2,D1,1))) . i by A44, A45, FINSEQ_1:14 .= (D2 | (Seg (indx (D2,D1,1)))) . i by FINSEQ_1:def_15 ; then A71: DD2 . i = D2 . i by A70, FUNCT_1:47; A72: divset (D2,i) = [.(lower_bound (divset (D2,i))),(upper_bound (divset (D2,i))).] by Th4 .= [.(D2 . (i - 1)),(upper_bound (divset (D2,i))).] by A57, A62, Def4 .= [.(D2 . (i - 1)),(D2 . i).] by A57, A62, Def4 ; divset (DD2,i) = [.(lower_bound (divset (DD2,i))),(upper_bound (divset (DD2,i))).] by Th4 .= [.(DD2 . (i - 1)),(upper_bound (divset (DD2,i))).] by A56, A62, Def4 .= [.(D2 . (i - 1)),(D2 . i).] by A56, A62, A69, A71, Def4 ; hence divset (DD2,i) = divset (D2,i) by A72; ::_thesis: verum end; end; end; hence divset (DD2,i) = divset (D2,i) ; ::_thesis: verum end; then A73: (lower_volume (g,DD2)) . i = (lower_bound (rng (g | (divset (D2,i))))) * (vol (divset (D2,i))) by A56, Def7; Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A55; then A74: i in dom D2 by FINSEQ_1:def_3; A75: i in dom DD2 by A55, FINSEQ_1:def_3; A76: now__::_thesis:_(_lower_bound_(divset_(D2,i))_in_[.(lower_bound_(divset_(D1,1))),(upper_bound_(divset_(D1,1))).]_&_upper_bound_(divset_(D2,i))_in_[.(lower_bound_(divset_(D1,1))),(upper_bound_(divset_(D1,1))).]_) percases ( i = 1 or i <> 1 ) ; supposeA77: i = 1 ; ::_thesis: ( lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] & upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] ) then 1 in dom (D2 | (Seg (indx (D2,D1,1)))) by A50, A75, FINSEQ_1:def_15; then 1 in (dom D2) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61; then A78: 1 in dom D2 by XBOOLE_0:def_4; then D2 . 1 <= D2 . (indx (D2,D1,1)) by A34, A36, SEQ_4:137; then A79: D2 . 1 <= D1 . 1 by A1, A5, Def19; lower_bound (divset (D2,i)) = lower_bound A by A77, A78, Def4; then A80: lower_bound (divset (D2,i)) = lower_bound (divset (D1,1)) by A5, Def4; upper_bound (divset (D2,i)) = D2 . 1 by A77, A78, Def4; then A81: upper_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A5, A79, Def4; lower_bound (divset (D1,1)) <= upper_bound (divset (D1,1)) by SEQ_4:11; hence lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by A80, XXREAL_1:1; ::_thesis: upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] lower_bound (divset (D2,i)) <= upper_bound (divset (D2,i)) by SEQ_4:11; then upper_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A80, A81; hence upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: verum end; supposeA82: i <> 1 ; ::_thesis: ( lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] & upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] ) then not i is trivial by A52, NAT_2:def_1; then i >= 1 + 1 by NAT_2:29; then A83: 1 <= i - 1 by XREAL_1:19; A84: ex j being Nat st i = 1 + j by A52, NAT_1:10; A85: rng D2 c= A by Def2; A86: lower_bound (divset (D2,i)) = D2 . (i - 1) by A74, A82, Def4; A87: lower_bound (divset (D1,1)) = lower_bound A by A5, Def4; A88: i - 1 <= (indx (D2,D1,1)) - 0 by A43, A54, XREAL_1:13; then i - 1 <= len D2 by A37, XXREAL_0:2; then i - 1 in Seg (len D2) by A84, A83, FINSEQ_1:1; then A89: i - 1 in dom D2 by FINSEQ_1:def_3; then D2 . (i - 1) in rng D2 by FUNCT_1:def_3; then A90: lower_bound (divset (D2,i)) >= lower_bound (divset (D1,1)) by A86, A87, A85, SEQ_4:def_2; A91: upper_bound (divset (D1,1)) = D1 . 1 by A5, Def4; D2 . (i - 1) <= D2 . (indx (D2,D1,1)) by A34, A88, A89, SEQ_4:137; then lower_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A1, A5, A86, A91, Def19; then lower_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A90; hence lower_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] A92: upper_bound (divset (D2,i)) = D2 . i by A74, A82, Def4; D2 . i in rng D2 by A74, FUNCT_1:def_3; then A93: upper_bound (divset (D2,i)) >= lower_bound (divset (D1,1)) by A92, A87, A85, SEQ_4:def_2; D2 . i <= D2 . (indx (D2,D1,1)) by A43, A34, A54, A74, SEQ_4:137; then upper_bound (divset (D2,i)) <= upper_bound (divset (D1,1)) by A1, A5, A92, A91, Def19; then upper_bound (divset (D2,i)) in { r where r is Real : ( lower_bound (divset (D1,1)) <= r & r <= upper_bound (divset (D1,1)) ) } by A93; hence upper_bound (divset (D2,i)) in [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by RCOMP_1:def_1; ::_thesis: verum end; end; end; A94: divset (D1,1) = [.(lower_bound (divset (D1,1))),(upper_bound (divset (D1,1))).] by Th4; A95: Seg (indx (D2,D1,1)) c= Seg (len D2) by A41, FINSEQ_1:5; then i in Seg (len D2) by A43, A55; then A96: i in dom D2 by FINSEQ_1:def_3; divset (D2,i) = [.(lower_bound (divset (D2,i))),(upper_bound (divset (D2,i))).] by Th4; then A97: divset (D2,i) c= divset (D1,1) by A94, A76, XXREAL_2:def_12; A98: dom ((lower_volume (f,D2)) | (Seg (indx (D2,D1,1)))) = (dom (lower_volume (f,D2))) /\ (Seg (indx (D2,D1,1))) by RELAT_1:61 .= (Seg (len (lower_volume (f,D2)))) /\ (Seg (indx (D2,D1,1))) by FINSEQ_1:def_3 .= (Seg (len D2)) /\ (Seg (indx (D2,D1,1))) by Def7 .= Seg (indx (D2,D1,1)) by A95, XBOOLE_1:28 ; ((lower_volume (f,D2)) | (indx (D2,D1,1))) . i = ((lower_volume (f,D2)) | (Seg (indx (D2,D1,1)))) . i by FINSEQ_1:def_15 .= (lower_volume (f,D2)) . i by A43, A55, A98, FUNCT_1:47 .= (lower_bound (rng (f | (divset (D2,i))))) * (vol (divset (D2,i))) by A96, Def7 ; hence (lower_volume (g,DD2)) . i = ((lower_volume (f,D2)) | (indx (D2,D1,1))) . i by A73, A97, FUNCT_1:51; ::_thesis: verum end; 1 <= len (lower_volume (f,D1)) by A8, Def7; then len (lower_volume (g,DD1)) = len ((lower_volume (f,D1)) | 1) by A10, FINSEQ_1:59; then A99: lower_volume (g,DD1) = (lower_volume (f,D1)) | 1 by A18, FINSEQ_1:14; A100: indx (D2,D1,1) <= len (lower_volume (f,D2)) by A41, Def7; len (lower_volume (g,DD2)) = indx (D2,D1,1) by A43, Def7; then A101: len (lower_volume (g,DD2)) = len ((lower_volume (f,D2)) | (indx (D2,D1,1))) by A100, FINSEQ_1:59; dom g = A /\ (divset (D1,1)) by A4, FUNCT_2:def_1; then dom g = divset (D1,1) by A5, Th8, XBOOLE_1:28; then g is total by PARTFUN1:def_2; then lower_sum (g,DD1) <= lower_sum (g,DD2) by A11, A28, Th31; hence Sum ((lower_volume (f,D1)) | 1) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,1))) by A99, A101, A51, FINSEQ_1:14; ::_thesis: verum end; A102: for k being non empty Nat st S1[k] holds S1[k + 1] proof let k be non empty Nat; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A103: ( k in dom D1 implies Sum ((lower_volume (f,D1)) | k) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,k))) ) ; ::_thesis: S1[k + 1] assume A104: k + 1 in dom D1 ; ::_thesis: Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) then A105: k + 1 in Seg (len D1) by FINSEQ_1:def_3; then A106: 1 <= k + 1 by FINSEQ_1:1; A107: k + 1 <= len D1 by A105, FINSEQ_1:1; now__::_thesis:_Sum_((lower_volume_(f,D1))_|_(k_+_1))_<=_Sum_((lower_volume_(f,D2))_|_(indx_(D2,D1,(k_+_1)))) percases ( 1 = k + 1 or 1 <> k + 1 ) ; suppose 1 = k + 1 ; ::_thesis: Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) hence Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A3, A104; ::_thesis: verum end; supposeA108: 1 <> k + 1 ; ::_thesis: Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) set IDK = indx (D2,D1,k); set IDK1 = indx (D2,D1,(k + 1)); set K1D2 = (lower_volume (f,D2)) | (indx (D2,D1,(k + 1))); set KD1 = (lower_volume (f,D1)) | k; set K1D1 = (lower_volume (f,D1)) | (k + 1); set n = k + 1; A109: k + 1 <= len (lower_volume (f,D1)) by A107, Def7; then A110: len ((lower_volume (f,D1)) | (k + 1)) = k + 1 by FINSEQ_1:59; then consider p1, q1 being FinSequence of REAL such that A111: len p1 = k and A112: len q1 = 1 and A113: (lower_volume (f,D1)) | (k + 1) = p1 ^ q1 by FINSEQ_2:23; A114: k <= k + 1 by NAT_1:11; then A115: k <= len D1 by A107, XXREAL_0:2; then A116: k <= len (lower_volume (f,D1)) by Def7; then A117: len p1 = len ((lower_volume (f,D1)) | k) by A111, FINSEQ_1:59; for i being Nat st 1 <= i & i <= len p1 holds p1 . i = ((lower_volume (f,D1)) | k) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p1 implies p1 . i = ((lower_volume (f,D1)) | k) . i ) assume that A118: 1 <= i and A119: i <= len p1 ; ::_thesis: p1 . i = ((lower_volume (f,D1)) | k) . i A120: i in Seg (len p1) by A118, A119, FINSEQ_1:1; then A121: i in dom ((lower_volume (f,D1)) | k) by A117, FINSEQ_1:def_3; then A122: i in dom ((lower_volume (f,D1)) | (Seg k)) by FINSEQ_1:def_15; k <= k + 1 by NAT_1:11; then A123: Seg k c= Seg (k + 1) by FINSEQ_1:5; A124: dom ((lower_volume (f,D1)) | (k + 1)) = Seg (len ((lower_volume (f,D1)) | (k + 1))) by FINSEQ_1:def_3 .= Seg (k + 1) by A109, FINSEQ_1:59 ; dom ((lower_volume (f,D1)) | k) = Seg (len ((lower_volume (f,D1)) | k)) by FINSEQ_1:def_3 .= Seg k by A116, FINSEQ_1:59 ; then i in dom ((lower_volume (f,D1)) | (k + 1)) by A121, A123, A124; then A125: i in dom ((lower_volume (f,D1)) | (Seg (k + 1))) by FINSEQ_1:def_15; A126: ((lower_volume (f,D1)) | (k + 1)) . i = ((lower_volume (f,D1)) | (Seg (k + 1))) . i by FINSEQ_1:def_15 .= (lower_volume (f,D1)) . i by A125, FUNCT_1:47 ; A127: ((lower_volume (f,D1)) | k) . i = ((lower_volume (f,D1)) | (Seg k)) . i by FINSEQ_1:def_15 .= (lower_volume (f,D1)) . i by A122, FUNCT_1:47 ; i in dom p1 by A120, FINSEQ_1:def_3; hence p1 . i = ((lower_volume (f,D1)) | k) . i by A113, A127, A126, FINSEQ_1:def_7; ::_thesis: verum end; then A128: p1 = (lower_volume (f,D1)) | k by A117, FINSEQ_1:14; A129: indx (D2,D1,(k + 1)) in dom D2 by A1, A104, Def19; then A130: indx (D2,D1,(k + 1)) in Seg (len D2) by FINSEQ_1:def_3; then A131: 1 <= indx (D2,D1,(k + 1)) by FINSEQ_1:1; not k + 1 is trivial by A108, NAT_2:def_1; then k + 1 >= 2 by NAT_2:29; then k >= (1 + 1) - 1 by XREAL_1:20; then A132: k in Seg (len D1) by A115, FINSEQ_1:1; then A133: k in dom D1 by FINSEQ_1:def_3; then A134: indx (D2,D1,k) in dom D2 by A1, Def19; A135: indx (D2,D1,k) < indx (D2,D1,(k + 1)) proof k < k + 1 by NAT_1:13; then A136: D1 . k < D1 . (k + 1) by A104, A133, SEQM_3:def_1; assume indx (D2,D1,k) >= indx (D2,D1,(k + 1)) ; ::_thesis: contradiction then A137: D2 . (indx (D2,D1,k)) >= D2 . (indx (D2,D1,(k + 1))) by A134, A129, SEQ_4:137; D1 . k = D2 . (indx (D2,D1,k)) by A1, A133, Def19; hence contradiction by A1, A104, A137, A136, Def19; ::_thesis: verum end; A138: indx (D2,D1,(k + 1)) >= indx (D2,D1,k) proof assume indx (D2,D1,(k + 1)) < indx (D2,D1,k) ; ::_thesis: contradiction then A139: D2 . (indx (D2,D1,(k + 1))) < D2 . (indx (D2,D1,k)) by A134, A129, SEQM_3:def_1; D1 . (k + 1) = D2 . (indx (D2,D1,(k + 1))) by A1, A104, Def19; then D1 . (k + 1) < D1 . k by A1, A133, A139, Def19; hence contradiction by A104, A133, NAT_1:11, SEQ_4:137; ::_thesis: verum end; then consider ID being Nat such that A140: indx (D2,D1,(k + 1)) = (indx (D2,D1,k)) + ID by NAT_1:10; reconsider ID = ID as Element of NAT by ORDINAL1:def_12; A141: len (lower_volume (f,D2)) = len D2 by Def7; then A142: indx (D2,D1,(k + 1)) <= len (lower_volume (f,D2)) by A130, FINSEQ_1:1; then len ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = (indx (D2,D1,k)) + ((indx (D2,D1,(k + 1))) - (indx (D2,D1,k))) by FINSEQ_1:59; then consider p2, q2 being FinSequence of REAL such that A143: len p2 = indx (D2,D1,k) and A144: len q2 = (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) and A145: (lower_volume (f,D2)) | (indx (D2,D1,(k + 1))) = p2 ^ q2 by A140, FINSEQ_2:23; A146: indx (D2,D1,(k + 1)) <= len D2 by A130, FINSEQ_1:1; indx (D2,D1,k) in dom D2 by A1, A133, Def19; then A147: indx (D2,D1,k) in Seg (len D2) by FINSEQ_1:def_3; then A148: 1 <= indx (D2,D1,k) by FINSEQ_1:1; A149: Sum q1 <= Sum q2 proof set MD2 = mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))); set MD1 = mid (D1,(k + 1),(k + 1)); set DD1 = divset (D1,(k + 1)); set g = f | (divset (D1,(k + 1))); A150: 1 <= (indx (D2,D1,k)) + 1 by NAT_1:11; reconsider g = f | (divset (D1,(k + 1))) as PartFunc of (divset (D1,(k + 1))),REAL by PARTFUN1:10; (k + 1) - 1 = k ; then A151: lower_bound (divset (D1,(k + 1))) = D1 . k by A104, A108, Def4; dom g = (dom f) /\ (divset (D1,(k + 1))) by RELAT_1:61; then dom g = A /\ (divset (D1,(k + 1))) by FUNCT_2:def_1; then dom g = divset (D1,(k + 1)) by A104, Th8, XBOOLE_1:28; then A152: g is total by PARTFUN1:def_2; A153: upper_bound (divset (D1,(k + 1))) = D1 . (k + 1) by A104, A108, Def4; A154: D2 . (indx (D2,D1,(k + 1))) = D1 . (k + 1) by A1, A104, Def19; A155: (indx (D2,D1,k)) + 1 <= indx (D2,D1,(k + 1)) by A135, NAT_1:13; then A156: (indx (D2,D1,k)) + 1 <= len D2 by A146, XXREAL_0:2; then (indx (D2,D1,k)) + 1 in Seg (len D2) by A150, FINSEQ_1:1; then A157: (indx (D2,D1,k)) + 1 in dom D2 by FINSEQ_1:def_3; then D2 . ((indx (D2,D1,k)) + 1) >= D2 . (indx (D2,D1,k)) by A134, NAT_1:11, SEQ_4:137; then D2 . ((indx (D2,D1,k)) + 1) >= lower_bound (divset (D1,(k + 1))) by A1, A133, A151, Def19; then reconsider MD2 = mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))) as Division of divset (D1,(k + 1)) by A129, A155, A157, A154, A153, Th37; A158: ((indx (D2,D1,(k + 1))) -' ((indx (D2,D1,k)) + 1)) + 1 = ((indx (D2,D1,(k + 1))) - ((indx (D2,D1,k)) + 1)) + 1 by A155, XREAL_1:233 .= (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) ; A159: for n being Nat st 1 <= n & n <= len q2 holds q2 . n = (lower_volume (g,MD2)) . n proof let n be Nat; ::_thesis: ( 1 <= n & n <= len q2 implies q2 . n = (lower_volume (g,MD2)) . n ) assume that A160: 1 <= n and A161: n <= len q2 ; ::_thesis: q2 . n = (lower_volume (g,MD2)) . n A162: n in Seg (len q2) by A160, A161, FINSEQ_1:1; then A163: n in dom q2 by FINSEQ_1:def_3; then A164: (indx (D2,D1,k)) + n in dom ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A143, A145, FINSEQ_1:28; then A165: (indx (D2,D1,k)) + n in dom ((lower_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_15; A166: len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) = ID by A131, A146, A140, A155, A156, A150, A158, FINSEQ_6:118; A167: dom ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = Seg (len ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,(k + 1))) by A142, FINSEQ_1:59 ; then (indx (D2,D1,k)) + n <= indx (D2,D1,(k + 1)) by A164, FINSEQ_1:1; then A168: n <= (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) by XREAL_1:19; then n in Seg (len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1)))))) by A140, A160, A166, FINSEQ_1:1; then A169: n in dom MD2 by FINSEQ_1:def_3; A170: Seg (indx (D2,D1,(k + 1))) c= Seg (len D2) by A146, FINSEQ_1:5; then (indx (D2,D1,k)) + n in Seg (len D2) by A167, A164; then A171: (indx (D2,D1,k)) + n in dom D2 by FINSEQ_1:def_3; A172: q2 . n = ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) . ((indx (D2,D1,k)) + n) by A143, A145, A163, FINSEQ_1:def_7 .= ((lower_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) . ((indx (D2,D1,k)) + n) by FINSEQ_1:def_15 .= (lower_volume (f,D2)) . ((indx (D2,D1,k)) + n) by A165, FUNCT_1:47 .= (lower_bound (rng (f | (divset (D2,((indx (D2,D1,k)) + n)))))) * (vol (divset (D2,((indx (D2,D1,k)) + n)))) by A171, Def7 ; A173: 1 <= (indx (D2,D1,k)) + n by A167, A164, FINSEQ_1:1; A174: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) proof now__::_thesis:_(_divset_(MD2,n)_=_divset_(D2,((indx_(D2,D1,k))_+_n))_&_divset_(MD2,n)_=_divset_(D2,((indx_(D2,D1,k))_+_n))_&_divset_(D2,((indx_(D2,D1,k))_+_n))_c=_divset_(D1,(k_+_1))_) percases ( n = 1 or n <> 1 ) ; supposeA175: n = 1 ; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) then A176: 1 <= (indx (D2,D1,k)) + 1 by A167, A164, FINSEQ_1:1; A177: (indx (D2,D1,k)) + 1 <= len D2 by A167, A164, A170, A175, FINSEQ_1:1; A178: upper_bound (divset (MD2,1)) = (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) . 1 by A169, A175, Def4 .= D2 . (1 + (indx (D2,D1,k))) by A131, A146, A176, A177, FINSEQ_6:118 ; A179: (indx (D2,D1,k)) + 1 <> 1 by A148, NAT_1:13; A180: (k + 1) - 1 = k ; A181: lower_bound (divset (MD2,1)) = lower_bound (divset (D1,(k + 1))) by A169, A175, Def4 .= D1 . k by A104, A108, A180, Def4 ; A182: divset (D2,((indx (D2,D1,k)) + n)) = [.(lower_bound (divset (D2,((indx (D2,D1,k)) + 1)))),(upper_bound (divset (D2,((indx (D2,D1,k)) + 1)))).] by A175, Th4 .= [.(D2 . (((indx (D2,D1,k)) + 1) - 1)),(upper_bound (divset (D2,((indx (D2,D1,k)) + 1)))).] by A157, A179, Def4 .= [.(D2 . (indx (D2,D1,k))),(D2 . ((indx (D2,D1,k)) + 1)).] by A157, A179, Def4 .= [.(D1 . k),(D2 . ((indx (D2,D1,k)) + 1)).] by A1, A133, Def19 ; hence divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) by A175, A181, A178, Th4; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) divset (MD2,n) = [.(D1 . k),(D2 . ((indx (D2,D1,k)) + 1)).] by A175, A181, A178, Th4; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) by A169, A182, Th8; ::_thesis: verum end; supposeA183: n <> 1 ; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) A184: (indx (D2,D1,k)) + n <> 1 proof assume (indx (D2,D1,k)) + n = 1 ; ::_thesis: contradiction then indx (D2,D1,k) = 1 - n ; then n + 1 <= 1 by A148, XREAL_1:19; then n <= 1 - 1 by XREAL_1:19; hence contradiction by A160, NAT_1:3; ::_thesis: verum end; A185: divset (D2,((indx (D2,D1,k)) + n)) = [.(lower_bound (divset (D2,((indx (D2,D1,k)) + n)))),(upper_bound (divset (D2,((indx (D2,D1,k)) + n)))).] by Th4 .= [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(upper_bound (divset (D2,((indx (D2,D1,k)) + n)))).] by A171, A184, Def4 .= [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(D2 . ((indx (D2,D1,k)) + n)).] by A171, A184, Def4 ; n <= n + 1 by NAT_1:12; then n - 1 <= n by XREAL_1:20; then A186: n - 1 <= len MD2 by A140, A168, A166, XXREAL_0:2; A187: (indx (D2,D1,k)) + 1 <= indx (D2,D1,(k + 1)) by A135, NAT_1:13; not n is trivial by A160, A183, NAT_2:def_1; then n >= 1 + 1 by NAT_2:29; then A188: 1 <= n - 1 by XREAL_1:19; consider n1 being Nat such that A189: n = 1 + n1 by A160, NAT_1:10; reconsider n1 = n1 as Element of NAT by ORDINAL1:def_12; A190: (n1 + ((indx (D2,D1,k)) + 1)) -' 1 = ((indx (D2,D1,k)) + n) - 1 by A173, A189, XREAL_1:233; A191: (n + ((indx (D2,D1,k)) + 1)) -' 1 = ((n + (indx (D2,D1,k))) + 1) - 1 by NAT_1:11, XREAL_1:233 .= (indx (D2,D1,k)) + n ; A192: lower_bound (divset (MD2,n)) = MD2 . (n - 1) by A169, A183, Def4 .= D2 . (((indx (D2,D1,k)) + n) - 1) by A131, A146, A156, A150, A187, A189, A190, A188, A186, FINSEQ_6:118 ; A193: upper_bound (divset (MD2,n)) = MD2 . n by A169, A183, Def4 .= D2 . ((indx (D2,D1,k)) + n) by A131, A146, A140, A156, A150, A160, A162, A168, A166, A187, A191, FINSEQ_6:118 ; hence divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) by A192, A185, Th4; ::_thesis: ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) divset (MD2,n) = [.(D2 . (((indx (D2,D1,k)) + n) - 1)),(D2 . ((indx (D2,D1,k)) + n)).] by A192, A193, Th4; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) by A169, A185, Th8; ::_thesis: verum end; end; end; hence ( divset (MD2,n) = divset (D2,((indx (D2,D1,k)) + n)) & divset (D2,((indx (D2,D1,k)) + n)) c= divset (D1,(k + 1)) ) ; ::_thesis: verum end; then g | (divset (MD2,n)) = f | (divset (D2,((indx (D2,D1,k)) + n))) by FUNCT_1:51; hence q2 . n = (lower_volume (g,MD2)) . n by A169, A172, A174, Def7; ::_thesis: verum end; (k + 1) - 1 = k ; then A194: lower_bound (divset (D1,(k + 1))) = D1 . k by A104, A108, Def4; D1 . (k + 1) = upper_bound (divset (D1,(k + 1))) by A104, A108, Def4; then reconsider MD1 = mid (D1,(k + 1),(k + 1)) as Division of divset (D1,(k + 1)) by A104, A114, A133, A194, Th37, SEQ_4:137; A195: g | (divset (D1,(k + 1))) is bounded_below proof consider a being real number such that A196: for x being set st x in A /\ (dom f) holds a <= f . x by A2, RFUNCT_1:71; for x being set st x in (divset (D1,(k + 1))) /\ (dom g) holds a <= g . x proof let x be set ; ::_thesis: ( x in (divset (D1,(k + 1))) /\ (dom g) implies a <= g . x ) A197: dom g c= dom f by RELAT_1:60; assume x in (divset (D1,(k + 1))) /\ (dom g) ; ::_thesis: a <= g . x then A198: x in dom g by XBOOLE_0:def_4; A199: A /\ (dom f) = dom f by XBOOLE_1:28; then reconsider x = x as Element of A by A198, A197, XBOOLE_0:def_4; a <= f . x by A196, A198, A199, A197; hence a <= g . x by A198, FUNCT_1:47; ::_thesis: verum end; hence g | (divset (D1,(k + 1))) is bounded_below by RFUNCT_1:71; ::_thesis: verum end; len MD1 = ((k + 1) -' (k + 1)) + 1 by A106, A107, FINSEQ_6:118; then A200: len MD1 = ((k + 1) - (k + 1)) + 1 by XREAL_1:233; A201: for n being Nat st 1 <= n & n <= len q1 holds q1 . n = (lower_volume (g,MD1)) . n proof k + 1 in Seg (len ((lower_volume (f,D1)) | (k + 1))) by A110, FINSEQ_1:4; then k + 1 in dom ((lower_volume (f,D1)) | (k + 1)) by FINSEQ_1:def_3; then A202: k + 1 in dom ((lower_volume (f,D1)) | (Seg (k + 1))) by FINSEQ_1:def_15; A203: ((lower_volume (f,D1)) | (k + 1)) . (k + 1) = ((lower_volume (f,D1)) | (Seg (k + 1))) . (k + 1) by FINSEQ_1:def_15 .= (lower_volume (f,D1)) . (k + 1) by A202, FUNCT_1:47 ; A204: MD1 . 1 = D1 . (k + 1) by A106, A107, FINSEQ_6:118; 1 in Seg 1 by FINSEQ_1:3; then A205: 1 in dom MD1 by A200, FINSEQ_1:def_3; then A206: upper_bound (divset (MD1,1)) = MD1 . 1 by Def4; let n be Nat; ::_thesis: ( 1 <= n & n <= len q1 implies q1 . n = (lower_volume (g,MD1)) . n ) assume that A207: 1 <= n and A208: n <= len q1 ; ::_thesis: q1 . n = (lower_volume (g,MD1)) . n A209: n = 1 by A112, A207, A208, XXREAL_0:1; lower_bound (divset (MD1,1)) = lower_bound (divset (D1,(k + 1))) by A205, Def4; then A210: divset (MD1,1) = [.(lower_bound (divset (D1,(k + 1)))),(D1 . (k + 1)).] by A206, A204, Th4; (k + 1) - 1 = k ; then A211: lower_bound (divset (D1,(k + 1))) = D1 . k by A104, A108, Def4; upper_bound (divset (D1,(k + 1))) = D1 . (k + 1) by A104, A108, Def4; then A212: divset (D1,(k + 1)) = [.(D1 . k),(D1 . (k + 1)).] by A211, Th4; A213: n in Seg (len q1) by A207, A208, FINSEQ_1:1; then n in dom MD1 by A112, A200, FINSEQ_1:def_3; then A214: (lower_volume (g,MD1)) . n = (lower_bound (rng (g | (divset (D1,(k + 1)))))) * (vol (divset (D1,(k + 1)))) by A209, A210, A211, A212, Def7; n in dom q1 by A213, FINSEQ_1:def_3; then q1 . n = (lower_volume (f,D1)) . (k + 1) by A111, A113, A209, A203, FINSEQ_1:def_7 .= (lower_bound (rng (f | (divset (D1,(k + 1)))))) * (vol (divset (D1,(k + 1)))) by A104, Def7 ; hence q1 . n = (lower_volume (g,MD1)) . n by A214; ::_thesis: verum end; len q1 = len (lower_volume (g,MD1)) by A112, A200, Def7; then A215: q1 = lower_volume (g,MD1) by A201, FINSEQ_1:14; len MD1 = ((k + 1) -' (k + 1)) + 1 by A106, A107, FINSEQ_6:118; then len MD1 = ((k + 1) - (k + 1)) + 1 by XREAL_1:233; then A216: lower_sum (g,MD1) <= lower_sum (g,MD2) by A195, A152, Th31; len (lower_volume (g,MD2)) = len (mid (D2,((indx (D2,D1,k)) + 1),(indx (D2,D1,(k + 1))))) by Def7 .= (indx (D2,D1,(k + 1))) - (indx (D2,D1,k)) by A131, A146, A155, A156, A150, A158, FINSEQ_6:118 ; hence Sum q1 <= Sum q2 by A144, A215, A159, A216, FINSEQ_1:14; ::_thesis: verum end; set KD2 = (lower_volume (f,D2)) | (indx (D2,D1,k)); A217: Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = (Sum p2) + (Sum q2) by A145, RVSUM_1:75; A218: indx (D2,D1,k) <= len (lower_volume (f,D2)) by A141, A147, FINSEQ_1:1; then A219: len p2 = len ((lower_volume (f,D2)) | (indx (D2,D1,k))) by A143, FINSEQ_1:59; for i being Nat st 1 <= i & i <= len p2 holds p2 . i = ((lower_volume (f,D2)) | (indx (D2,D1,k))) . i proof let i be Nat; ::_thesis: ( 1 <= i & i <= len p2 implies p2 . i = ((lower_volume (f,D2)) | (indx (D2,D1,k))) . i ) assume that A220: 1 <= i and A221: i <= len p2 ; ::_thesis: p2 . i = ((lower_volume (f,D2)) | (indx (D2,D1,k))) . i A222: i in Seg (len p2) by A220, A221, FINSEQ_1:1; then A223: i in dom ((lower_volume (f,D2)) | (indx (D2,D1,k))) by A219, FINSEQ_1:def_3; then A224: i in dom ((lower_volume (f,D2)) | (Seg (indx (D2,D1,k)))) by FINSEQ_1:def_15; A225: dom ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) = Seg (len ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,(k + 1))) by A142, FINSEQ_1:59 ; A226: Seg (indx (D2,D1,k)) c= Seg (indx (D2,D1,(k + 1))) by A138, FINSEQ_1:5; dom ((lower_volume (f,D2)) | (indx (D2,D1,k))) = Seg (len ((lower_volume (f,D2)) | (indx (D2,D1,k)))) by FINSEQ_1:def_3 .= Seg (indx (D2,D1,k)) by A218, FINSEQ_1:59 ; then i in dom ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A223, A226, A225; then A227: i in dom ((lower_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) by FINSEQ_1:def_15; A228: ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) . i = ((lower_volume (f,D2)) | (Seg (indx (D2,D1,(k + 1))))) . i by FINSEQ_1:def_15 .= (lower_volume (f,D2)) . i by A227, FUNCT_1:47 ; A229: ((lower_volume (f,D2)) | (indx (D2,D1,k))) . i = ((lower_volume (f,D2)) | (Seg (indx (D2,D1,k)))) . i by FINSEQ_1:def_15 .= (lower_volume (f,D2)) . i by A224, FUNCT_1:47 ; i in dom p2 by A222, FINSEQ_1:def_3; hence p2 . i = ((lower_volume (f,D2)) | (indx (D2,D1,k))) . i by A145, A229, A228, FINSEQ_1:def_7; ::_thesis: verum end; then A230: p2 = (lower_volume (f,D2)) | (indx (D2,D1,k)) by A219, FINSEQ_1:14; Sum ((lower_volume (f,D1)) | (k + 1)) = (Sum p1) + (Sum q1) by A113, RVSUM_1:75; then Sum q1 = (Sum ((lower_volume (f,D1)) | (k + 1))) - (Sum p1) ; then Sum ((lower_volume (f,D1)) | (k + 1)) <= (Sum q2) + (Sum p1) by A149, XREAL_1:20; then (Sum ((lower_volume (f,D1)) | (k + 1))) - (Sum q2) <= Sum p1 by XREAL_1:20; then (Sum ((lower_volume (f,D1)) | (k + 1))) - (Sum q2) <= Sum p2 by A103, A132, A128, A230, FINSEQ_1:def_3, XXREAL_0:2; hence Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) by A217, XREAL_1:20; ::_thesis: verum end; end; end; hence Sum ((lower_volume (f,D1)) | (k + 1)) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,(k + 1)))) ; ::_thesis: verum end; thus for n being non empty Nat holds S1[n] from NAT_1:sch_10(A3, A102); ::_thesis: verum end; hence for i being non empty Element of NAT st i in dom D1 holds Sum ((lower_volume (f,D1)) | i) <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) ; ::_thesis: verum end; theorem Th40: :: INTEGRA1:40 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_above holds (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_above holds (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_above holds (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_above holds (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & i in dom D1 & f | A is bounded_above implies (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) ) assume that A1: D1 <= D2 and A2: i in dom D1 and A3: f | A is bounded_above ; ::_thesis: (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) A4: len (upper_volume (f,D2)) = len D2 by Def6; i in Seg (len D1) by A2, FINSEQ_1:def_3; then i in Seg (len (upper_volume (f,D1))) by Def6; then i in dom (upper_volume (f,D1)) by FINSEQ_1:def_3; then A5: (PartSums (upper_volume (f,D1))) . i = Sum ((upper_volume (f,D1)) | i) by Def20; indx (D2,D1,i) in dom D2 by A1, A2, Def19; then indx (D2,D1,i) in Seg (len (upper_volume (f,D2))) by A4, FINSEQ_1:def_3; then A6: indx (D2,D1,i) in dom (upper_volume (f,D2)) by FINSEQ_1:def_3; i in Seg (len D1) by A2, FINSEQ_1:def_3; then i is non empty Element of NAT by FINSEQ_1:1; then (PartSums (upper_volume (f,D1))) . i >= Sum ((upper_volume (f,D2)) | (indx (D2,D1,i))) by A1, A2, A3, A5, Th38; hence (PartSums (upper_volume (f,D1))) . i >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,i)) by A6, Def20; ::_thesis: verum end; theorem Th41: :: INTEGRA1:41 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_below holds (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_below holds (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_below holds (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & i in dom D1 & f | A is bounded_below holds (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & i in dom D1 & f | A is bounded_below implies (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) ) assume that A1: D1 <= D2 and A2: i in dom D1 and A3: f | A is bounded_below ; ::_thesis: (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) A4: len (lower_volume (f,D2)) = len D2 by Def7; i in Seg (len D1) by A2, FINSEQ_1:def_3; then i in Seg (len (lower_volume (f,D1))) by Def7; then i in dom (lower_volume (f,D1)) by FINSEQ_1:def_3; then A5: (PartSums (lower_volume (f,D1))) . i = Sum ((lower_volume (f,D1)) | i) by Def20; indx (D2,D1,i) in dom D2 by A1, A2, Def19; then indx (D2,D1,i) in Seg (len (lower_volume (f,D2))) by A4, FINSEQ_1:def_3; then A6: indx (D2,D1,i) in dom (lower_volume (f,D2)) by FINSEQ_1:def_3; i in Seg (len D1) by A2, FINSEQ_1:def_3; then i is non empty Element of NAT by FINSEQ_1:1; then (PartSums (lower_volume (f,D1))) . i <= Sum ((lower_volume (f,D2)) | (indx (D2,D1,i))) by A1, A2, A3, A5, Th39; hence (PartSums (lower_volume (f,D1))) . i <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,i)) by A6, Def20; ::_thesis: verum end; theorem Th42: :: INTEGRA1:42 for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL holds (PartSums (upper_volume (f,D))) . (len D) = upper_sum (f,D) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL holds (PartSums (upper_volume (f,D))) . (len D) = upper_sum (f,D) let D be Division of A; ::_thesis: for f being Function of A,REAL holds (PartSums (upper_volume (f,D))) . (len D) = upper_sum (f,D) let f be Function of A,REAL; ::_thesis: (PartSums (upper_volume (f,D))) . (len D) = upper_sum (f,D) len (upper_volume (f,D)) = len D by Def6; then len D in Seg (len (upper_volume (f,D))) by FINSEQ_1:3; then len D in dom (upper_volume (f,D)) by FINSEQ_1:def_3; then A1: (PartSums (upper_volume (f,D))) . (len D) = Sum ((upper_volume (f,D)) | (len D)) by Def20; dom (upper_volume (f,D)) = Seg (len (upper_volume (f,D))) by FINSEQ_1:def_3; then dom (upper_volume (f,D)) = Seg (len D) by Def6; then (upper_volume (f,D)) | (Seg (len D)) = upper_volume (f,D) by RELAT_1:68; hence (PartSums (upper_volume (f,D))) . (len D) = upper_sum (f,D) by A1, FINSEQ_1:def_15; ::_thesis: verum end; theorem Th43: :: INTEGRA1:43 for A being non empty closed_interval Subset of REAL for D being Division of A for f being Function of A,REAL holds (PartSums (lower_volume (f,D))) . (len D) = lower_sum (f,D) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f being Function of A,REAL holds (PartSums (lower_volume (f,D))) . (len D) = lower_sum (f,D) let D be Division of A; ::_thesis: for f being Function of A,REAL holds (PartSums (lower_volume (f,D))) . (len D) = lower_sum (f,D) let f be Function of A,REAL; ::_thesis: (PartSums (lower_volume (f,D))) . (len D) = lower_sum (f,D) len (lower_volume (f,D)) = len D by Def7; then len D in Seg (len (lower_volume (f,D))) by FINSEQ_1:3; then len D in dom (lower_volume (f,D)) by FINSEQ_1:def_3; then A1: (PartSums (lower_volume (f,D))) . (len D) = Sum ((lower_volume (f,D)) | (len D)) by Def20; dom (lower_volume (f,D)) = Seg (len (lower_volume (f,D))) by FINSEQ_1:def_3; then dom (lower_volume (f,D)) = Seg (len D) by Def7; then (lower_volume (f,D)) | (Seg (len D)) = lower_volume (f,D) by RELAT_1:68; hence (PartSums (lower_volume (f,D))) . (len D) = lower_sum (f,D) by A1, FINSEQ_1:def_15; ::_thesis: verum end; theorem Th44: :: INTEGRA1:44 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A st D1 <= D2 holds indx (D2,D1,(len D1)) = len D2 proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A st D1 <= D2 holds indx (D2,D1,(len D1)) = len D2 let D1, D2 be Division of A; ::_thesis: ( D1 <= D2 implies indx (D2,D1,(len D1)) = len D2 ) len D1 in Seg (len D1) by FINSEQ_1:3; then A1: len D1 in dom D1 by FINSEQ_1:def_3; assume A2: D1 <= D2 ; ::_thesis: indx (D2,D1,(len D1)) = len D2 then D1 . (len D1) = D2 . (indx (D2,D1,(len D1))) by A1, Def19; then A3: D2 . (indx (D2,D1,(len D1))) = upper_bound A by Def2; len D2 in Seg (len D2) by FINSEQ_1:3; then A4: len D2 in dom D2 by FINSEQ_1:def_3; assume A5: indx (D2,D1,(len D1)) <> len D2 ; ::_thesis: contradiction A6: indx (D2,D1,(len D1)) in dom D2 by A2, A1, Def19; then indx (D2,D1,(len D1)) in Seg (len D2) by FINSEQ_1:def_3; then indx (D2,D1,(len D1)) <= len D2 by FINSEQ_1:1; then indx (D2,D1,(len D1)) < len D2 by A5, XXREAL_0:1; then D2 . (indx (D2,D1,(len D1))) < D2 . (len D2) by A4, A6, SEQM_3:def_1; hence contradiction by A3, Def2; ::_thesis: verum end; theorem Th45: :: INTEGRA1:45 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds upper_sum (f,D2) <= upper_sum (f,D1) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds upper_sum (f,D2) <= upper_sum (f,D1) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & f | A is bounded_above holds upper_sum (f,D2) <= upper_sum (f,D1) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & f | A is bounded_above implies upper_sum (f,D2) <= upper_sum (f,D1) ) assume that A1: D1 <= D2 and A2: f | A is bounded_above ; ::_thesis: upper_sum (f,D2) <= upper_sum (f,D1) len D1 in Seg (len D1) by FINSEQ_1:3; then len D1 in dom D1 by FINSEQ_1:def_3; then (PartSums (upper_volume (f,D1))) . (len D1) >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,(len D1))) by A1, A2, Th40; then upper_sum (f,D1) >= (PartSums (upper_volume (f,D2))) . (indx (D2,D1,(len D1))) by Th42; then upper_sum (f,D1) >= (PartSums (upper_volume (f,D2))) . (len D2) by A1, Th44; hence upper_sum (f,D2) <= upper_sum (f,D1) by Th42; ::_thesis: verum end; theorem Th46: :: INTEGRA1:46 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds lower_sum (f,D2) >= lower_sum (f,D1) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds lower_sum (f,D2) >= lower_sum (f,D1) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st D1 <= D2 & f | A is bounded_below holds lower_sum (f,D2) >= lower_sum (f,D1) let f be Function of A,REAL; ::_thesis: ( D1 <= D2 & f | A is bounded_below implies lower_sum (f,D2) >= lower_sum (f,D1) ) assume that A1: D1 <= D2 and A2: f | A is bounded_below ; ::_thesis: lower_sum (f,D2) >= lower_sum (f,D1) len D1 in Seg (len D1) by FINSEQ_1:3; then len D1 in dom D1 by FINSEQ_1:def_3; then (PartSums (lower_volume (f,D1))) . (len D1) <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,(len D1))) by A1, A2, Th41; then lower_sum (f,D1) <= (PartSums (lower_volume (f,D2))) . (indx (D2,D1,(len D1))) by Th43; then lower_sum (f,D1) <= (PartSums (lower_volume (f,D2))) . (len D2) by A1, Th44; hence lower_sum (f,D2) >= lower_sum (f,D1) by Th43; ::_thesis: verum end; theorem Th47: :: INTEGRA1:47 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A ex D being Division of A st ( D1 <= D & D2 <= D ) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A ex D being Division of A st ( D1 <= D & D2 <= D ) let D1, D2 be Division of A; ::_thesis: ex D being Division of A st ( D1 <= D & D2 <= D ) consider D3 being FinSequence of REAL such that A1: rng D3 = rng (D1 ^ D2) and A2: len D3 = card (rng (D1 ^ D2)) and A3: D3 is increasing by SEQ_4:140; reconsider D3 = D3 as non empty increasing FinSequence of REAL by A1, A3; A4: rng D2 c= A by Def2; rng D1 c= A by Def2; then (rng D1) \/ (rng D2) c= A by A4, XBOOLE_1:8; then A5: rng D3 c= A by A1, FINSEQ_1:31; D3 . (len D3) = upper_bound A proof assume A6: D3 . (len D3) <> upper_bound A ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( D3 . (len D3) > upper_bound A or D3 . (len D3) < upper_bound A ) by A6, XXREAL_0:1; supposeA7: D3 . (len D3) > upper_bound A ; ::_thesis: contradiction len D3 in Seg (len D3) by FINSEQ_1:3; then len D3 in dom D3 by FINSEQ_1:def_3; then D3 . (len D3) in rng D3 by FUNCT_1:def_3; then D3 . (len D3) in A by A5; then D3 . (len D3) in [.(lower_bound A),(upper_bound A).] by Th4; then D3 . (len D3) in { r where r is Real : ( lower_bound A <= r & r <= upper_bound A ) } by RCOMP_1:def_1; then ex a being Real st ( a = D3 . (len D3) & lower_bound A <= a & a <= upper_bound A ) ; hence contradiction by A7; ::_thesis: verum end; supposeA8: D3 . (len D3) < upper_bound A ; ::_thesis: contradiction A9: rng D1 c= rng (D1 ^ D2) by FINSEQ_1:29; len D1 in Seg (len D1) by FINSEQ_1:3; then A10: len D1 in dom D1 by FINSEQ_1:def_3; len D3 in Seg (len D3) by FINSEQ_1:3; then A11: len D3 in dom D3 by FINSEQ_1:def_3; D1 . (len D1) = upper_bound A by Def2; then upper_bound A in rng D1 by A10, FUNCT_1:def_3; then consider k being Nat such that A12: k in dom D3 and A13: D3 . k = upper_bound A by A1, A9, FINSEQ_2:10; k in Seg (len D3) by A12, FINSEQ_1:def_3; then k <= len D3 by FINSEQ_1:1; hence contradiction by A8, A11, A12, A13, SEQ_4:137; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; then reconsider D3 = D3 as Division of A by A5, Def2; len D2 = card (rng D2) by FINSEQ_4:62; then A14: len D2 <= len D3 by A2, FINSEQ_1:30, NAT_1:43; take D3 ; ::_thesis: ( D1 <= D3 & D2 <= D3 ) A15: rng D1 c= rng (D1 ^ D2) by FINSEQ_1:29; A16: rng D2 c= rng (D1 ^ D2) by FINSEQ_1:30; len D1 = card (rng D1) by FINSEQ_4:62; then len D1 <= len D3 by A2, FINSEQ_1:29, NAT_1:43; hence ( D1 <= D3 & D2 <= D3 ) by A1, A15, A16, A14, Def18; ::_thesis: verum end; theorem Th48: :: INTEGRA1:48 for A being non empty closed_interval Subset of REAL for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D1) <= upper_sum (f,D2) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D1, D2 being Division of A for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D1) <= upper_sum (f,D2) let D1, D2 be Division of A; ::_thesis: for f being Function of A,REAL st f | A is bounded holds lower_sum (f,D1) <= upper_sum (f,D2) let f be Function of A,REAL; ::_thesis: ( f | A is bounded implies lower_sum (f,D1) <= upper_sum (f,D2) ) consider D being Division of A such that A1: D1 <= D and A2: D2 <= D by Th47; assume A3: f | A is bounded ; ::_thesis: lower_sum (f,D1) <= upper_sum (f,D2) then A4: lower_sum (f,D) <= upper_sum (f,D) by Th28; upper_sum (f,D) <= upper_sum (f,D2) by A3, A2, Th45; then A5: lower_sum (f,D) <= upper_sum (f,D2) by A4, XXREAL_0:2; lower_sum (f,D1) <= lower_sum (f,D) by A3, A1, Th46; hence lower_sum (f,D1) <= upper_sum (f,D2) by A5, XXREAL_0:2; ::_thesis: verum end; begin theorem Th49: :: INTEGRA1:49 for A being non empty closed_interval Subset of REAL for f being Function of A,REAL st f | A is bounded holds upper_integral f >= lower_integral f proof let A be non empty closed_interval Subset of REAL; ::_thesis: for f being Function of A,REAL st f | A is bounded holds upper_integral f >= lower_integral f let f be Function of A,REAL; ::_thesis: ( f | A is bounded implies upper_integral f >= lower_integral f ) assume A1: f | A is bounded ; ::_thesis: upper_integral f >= lower_integral f A2: for b being real number st b in rng (upper_sum_set f) holds lower_integral f <= b proof let b be real number ; ::_thesis: ( b in rng (upper_sum_set f) implies lower_integral f <= b ) assume b in rng (upper_sum_set f) ; ::_thesis: lower_integral f <= b then consider D1 being Element of divs A such that D1 in dom (upper_sum_set f) and A3: b = (upper_sum_set f) . D1 by PARTFUN1:3; reconsider D1 = D1 as Division of A by Def3; A4: for a being real number st a in rng (lower_sum_set f) holds a <= upper_sum (f,D1) proof let a be real number ; ::_thesis: ( a in rng (lower_sum_set f) implies a <= upper_sum (f,D1) ) assume a in rng (lower_sum_set f) ; ::_thesis: a <= upper_sum (f,D1) then consider D2 being Element of divs A such that D2 in dom (lower_sum_set f) and A5: a = (lower_sum_set f) . D2 by PARTFUN1:3; reconsider D2 = D2 as Division of A by Def3; a = lower_sum (f,D2) by A5, Def11; hence a <= upper_sum (f,D1) by A1, Th48; ::_thesis: verum end; b = upper_sum (f,D1) by A3, Def10; hence lower_integral f <= b by A4, SEQ_4:45; ::_thesis: verum end; thus upper_integral f >= lower_integral f by A2, SEQ_4:43; ::_thesis: verum end; theorem Th50: :: INTEGRA1:50 for X, Y being Subset of REAL holds (-- X) ++ (-- Y) = -- (X ++ Y) proof let X, Y be Subset of REAL; ::_thesis: (-- X) ++ (-- Y) = -- (X ++ Y) for z being set st z in -- (X ++ Y) holds z in (-- X) ++ (-- Y) proof let z be set ; ::_thesis: ( z in -- (X ++ Y) implies z in (-- X) ++ (-- Y) ) assume A1: z in -- (X ++ Y) ; ::_thesis: z in (-- X) ++ (-- Y) reconsider XY = X ++ Y as Subset of REAL by MEMBERED:3; z in -- XY by A1; then consider x being Real such that A2: x in XY and A3: z = - x by MEASURE6:72; consider a, b being Real such that A4: a in X and A5: b in Y and A6: x = a + b by A2, MEASURE6:21; A7: - a in -- X by A4, MEMBER_1:11; A8: - b in -- Y by A5, MEMBER_1:11; z = (- a) + (- b) by A3, A6; hence z in (-- X) ++ (-- Y) by A7, A8, MEMBER_1:46; ::_thesis: verum end; then A9: -- (X ++ Y) c= (-- X) ++ (-- Y) by TARSKI:def_3; for z being set st z in (-- X) ++ (-- Y) holds z in -- (X ++ Y) proof let z be set ; ::_thesis: ( z in (-- X) ++ (-- Y) implies z in -- (X ++ Y) ) assume A10: z in (-- X) ++ (-- Y) ; ::_thesis: z in -- (X ++ Y) (-- X) ++ (-- Y) c= REAL by MEMBERED:3; then consider x, y being Real such that A11: x in -- X and A12: y in -- Y and A13: z = x + y by A10, MEASURE6:21; consider b being Real such that A14: b in Y and A15: y = - b by A12, MEASURE6:72; reconsider X = X as Subset of REAL ; consider a being Real such that A16: a in X and A17: x = - a by A11, MEASURE6:72; A18: a + b in X ++ Y by A16, A14, MEMBER_1:46; z = - (a + b) by A13, A17, A15; hence z in -- (X ++ Y) by A18, MEMBER_1:11; ::_thesis: verum end; then (-- X) ++ (-- Y) c= -- (X ++ Y) by TARSKI:def_3; hence (-- X) ++ (-- Y) = -- (X ++ Y) by A9, XBOOLE_0:def_10; ::_thesis: verum end; theorem Th51: :: INTEGRA1:51 for X, Y being Subset of REAL st X is bounded_above & Y is bounded_above holds X ++ Y is bounded_above proof let X, Y be Subset of REAL; ::_thesis: ( X is bounded_above & Y is bounded_above implies X ++ Y is bounded_above ) assume that A1: X is bounded_above and A2: Y is bounded_above ; ::_thesis: X ++ Y is bounded_above A3: -- Y is bounded_below by A2, MEASURE6:41; -- X is bounded_below by A1, MEASURE6:41; then A4: (-- X) ++ (-- Y) is bounded_below by A3, SEQ_4:124; reconsider XY = X ++ Y as Subset of REAL by MEMBERED:3; -- XY is bounded_below by Th50, A4; hence X ++ Y is bounded_above by MEASURE6:41; ::_thesis: verum end; theorem Th52: :: INTEGRA1:52 for X, Y being non empty Subset of REAL st X is bounded_above & Y is bounded_above holds upper_bound (X ++ Y) = (upper_bound X) + (upper_bound Y) proof let X, Y be non empty Subset of REAL; ::_thesis: ( X is bounded_above & Y is bounded_above implies upper_bound (X ++ Y) = (upper_bound X) + (upper_bound Y) ) assume that A1: X is bounded_above and A2: Y is bounded_above ; ::_thesis: upper_bound (X ++ Y) = (upper_bound X) + (upper_bound Y) A3: -- Y is bounded_below by A2, MEASURE6:41; A4: -- X is bounded_below by A1, MEASURE6:41; then lower_bound ((-- X) ++ (-- Y)) = (lower_bound (-- X)) + (lower_bound (-- Y)) by A3, SEQ_4:125; then A5: lower_bound ((-- X) ++ (-- Y)) = (- (upper_bound (-- (-- X)))) + (lower_bound (-- Y)) by A4, MEASURE6:43 .= (- (upper_bound X)) + (- (upper_bound (-- (-- Y)))) by A3, MEASURE6:43 .= - ((upper_bound X) + (upper_bound Y)) ; A6: (-- X) ++ (-- Y) = -- (X ++ Y) by Th50; then A7: -- (X ++ Y) is bounded_below by A4, A3, SEQ_4:124; reconsider XY = X ++ Y as Subset of REAL by MEMBERED:3; - (upper_bound (-- (-- XY))) = - ((upper_bound X) + (upper_bound Y)) by A6, A5, A7, MEASURE6:43; then upper_bound XY = (upper_bound X) + (upper_bound Y) ; hence upper_bound (X ++ Y) = (upper_bound X) + (upper_bound Y) ; ::_thesis: verum end; theorem Th53: :: INTEGRA1:53 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_above & g | A is bounded_above holds (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_above & g | A is bounded_above holds (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_above & g | A is bounded_above holds (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) let D be Division of A; ::_thesis: for f, g being Function of A,REAL st i in dom D & f | A is bounded_above & g | A is bounded_above holds (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) let f, g be Function of A,REAL; ::_thesis: ( i in dom D & f | A is bounded_above & g | A is bounded_above implies (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) ) assume A1: i in dom D ; ::_thesis: ( not f | A is bounded_above or not g | A is bounded_above or (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) ) dom (f + g) = A /\ A by FUNCT_2:def_1; then dom ((f + g) | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then A2: not rng ((f + g) | (divset (D,i))) is empty by RELAT_1:42; (f + g) | (divset (D,i)) = (f | (divset (D,i))) + (g | (divset (D,i))) by RFUNCT_1:44; then A3: rng ((f + g) | (divset (D,i))) c= (rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i)))) by Th10; assume f | A is bounded_above ; ::_thesis: ( not g | A is bounded_above or (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) ) then rng f is bounded_above by Th13; then A4: rng (f | (divset (D,i))) is bounded_above by RELAT_1:70, XXREAL_2:43; dom g = A by FUNCT_2:def_1; then dom (g | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then A5: not rng (g | (divset (D,i))) is empty by RELAT_1:42; A6: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; assume g | A is bounded_above ; ::_thesis: (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) then rng g is bounded_above by Th13; then A7: rng (g | (divset (D,i))) is bounded_above by RELAT_1:70, XXREAL_2:43; then A8: (rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i)))) is bounded_above by A4, Th51; dom f = A by FUNCT_2:def_1; then dom (f | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then not rng (f | (divset (D,i))) is empty by RELAT_1:42; then upper_bound ((rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i))))) = (upper_bound (rng (f | (divset (D,i))))) + (upper_bound (rng (g | (divset (D,i))))) by A4, A7, A5, Th52; then (upper_bound (rng ((f + g) | (divset (D,i))))) * (vol (divset (D,i))) <= ((upper_bound (rng (f | (divset (D,i))))) + (upper_bound (rng (g | (divset (D,i)))))) * (vol (divset (D,i))) by A8, A2, A6, A3, SEQ_4:48, XREAL_1:64; then (upper_volume ((f + g),D)) . i <= ((upper_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i)))) + ((upper_bound (rng (g | (divset (D,i))))) * (vol (divset (D,i)))) by A1, Def6; then (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_bound (rng (g | (divset (D,i))))) * (vol (divset (D,i)))) by A1, Def6; hence (upper_volume ((f + g),D)) . i <= ((upper_volume (f,D)) . i) + ((upper_volume (g,D)) . i) by A1, Def6; ::_thesis: verum end; theorem Th54: :: INTEGRA1:54 for i being Element of NAT for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_below & g | A is bounded_below holds ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i proof let i be Element of NAT ; ::_thesis: for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_below & g | A is bounded_below holds ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f, g being Function of A,REAL st i in dom D & f | A is bounded_below & g | A is bounded_below holds ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i let D be Division of A; ::_thesis: for f, g being Function of A,REAL st i in dom D & f | A is bounded_below & g | A is bounded_below holds ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i let f, g be Function of A,REAL; ::_thesis: ( i in dom D & f | A is bounded_below & g | A is bounded_below implies ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i ) assume that A1: i in dom D and A2: f | A is bounded_below and A3: g | A is bounded_below ; ::_thesis: ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i A4: 0 <= vol (divset (D,i)) by SEQ_4:11, XREAL_1:48; dom (f + g) = A /\ A by FUNCT_2:def_1; then dom ((f + g) | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then A5: not rng ((f + g) | (divset (D,i))) is empty by RELAT_1:42; rng g is bounded_below by A3, Th11; then A6: rng (g | (divset (D,i))) is bounded_below by RELAT_1:70, XXREAL_2:44; dom g = A by FUNCT_2:def_1; then dom (g | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then A7: not rng (g | (divset (D,i))) is empty by RELAT_1:42; (f + g) | (divset (D,i)) = (f | (divset (D,i))) + (g | (divset (D,i))) by RFUNCT_1:44; then A8: rng ((f + g) | (divset (D,i))) c= (rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i)))) by Th10; rng f is bounded_below by A2, Th11; then A9: rng (f | (divset (D,i))) is bounded_below by RELAT_1:70, XXREAL_2:44; then A10: (rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i)))) is bounded_below by A6, SEQ_4:124; dom f = A by FUNCT_2:def_1; then dom (f | (divset (D,i))) = divset (D,i) by A1, Th8, RELAT_1:62; then not rng (f | (divset (D,i))) is empty by RELAT_1:42; then lower_bound ((rng (f | (divset (D,i)))) ++ (rng (g | (divset (D,i))))) = (lower_bound (rng (f | (divset (D,i))))) + (lower_bound (rng (g | (divset (D,i))))) by A9, A6, A7, SEQ_4:125; then (lower_bound (rng ((f + g) | (divset (D,i))))) * (vol (divset (D,i))) >= ((lower_bound (rng (f | (divset (D,i))))) + (lower_bound (rng (g | (divset (D,i)))))) * (vol (divset (D,i))) by A10, A5, A4, A8, SEQ_4:47, XREAL_1:64; then (lower_volume ((f + g),D)) . i >= ((lower_bound (rng (f | (divset (D,i))))) * (vol (divset (D,i)))) + ((lower_bound (rng (g | (divset (D,i))))) * (vol (divset (D,i)))) by A1, Def7; then (lower_volume ((f + g),D)) . i >= ((lower_volume (f,D)) . i) + ((lower_bound (rng (g | (divset (D,i))))) * (vol (divset (D,i)))) by A1, Def7; hence ((lower_volume (f,D)) . i) + ((lower_volume (g,D)) . i) <= (lower_volume ((f + g),D)) . i by A1, Def7; ::_thesis: verum end; theorem Th55: :: INTEGRA1:55 for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st f | A is bounded_above & g | A is bounded_above holds upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f, g being Function of A,REAL st f | A is bounded_above & g | A is bounded_above holds upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) let D be Division of A; ::_thesis: for f, g being Function of A,REAL st f | A is bounded_above & g | A is bounded_above holds upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) let f, g be Function of A,REAL; ::_thesis: ( f | A is bounded_above & g | A is bounded_above implies upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) ) assume that A1: f | A is bounded_above and A2: g | A is bounded_above ; ::_thesis: upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) set H = upper_volume ((f + g),D); set G = upper_volume (g,D); set F = upper_volume (f,D); len (upper_volume (g,D)) = len D by Def6; then A3: upper_volume (g,D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; len (upper_volume (f,D)) = len D by Def6; then A4: upper_volume (f,D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; A5: for j being Nat st j in Seg (len D) holds (upper_volume ((f + g),D)) . j <= ((upper_volume (f,D)) + (upper_volume (g,D))) . j proof let j be Nat; ::_thesis: ( j in Seg (len D) implies (upper_volume ((f + g),D)) . j <= ((upper_volume (f,D)) + (upper_volume (g,D))) . j ) assume j in Seg (len D) ; ::_thesis: (upper_volume ((f + g),D)) . j <= ((upper_volume (f,D)) + (upper_volume (g,D))) . j then j in dom D by FINSEQ_1:def_3; then (upper_volume ((f + g),D)) . j <= ((upper_volume (f,D)) . j) + ((upper_volume (g,D)) . j) by A1, A2, Th53; hence (upper_volume ((f + g),D)) . j <= ((upper_volume (f,D)) + (upper_volume (g,D))) . j by A4, A3, RVSUM_1:11; ::_thesis: verum end; len (upper_volume ((f + g),D)) = len D by Def6; then A6: upper_volume ((f + g),D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; (upper_volume (f,D)) + (upper_volume (g,D)) is Element of (len D) -tuples_on REAL by A4, A3, FINSEQ_2:120; then Sum (upper_volume ((f + g),D)) <= Sum ((upper_volume (f,D)) + (upper_volume (g,D))) by A6, A5, RVSUM_1:82; hence upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) by A4, A3, RVSUM_1:89; ::_thesis: verum end; theorem Th56: :: INTEGRA1:56 for A being non empty closed_interval Subset of REAL for D being Division of A for f, g being Function of A,REAL st f | A is bounded_below & g | A is bounded_below holds (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for D being Division of A for f, g being Function of A,REAL st f | A is bounded_below & g | A is bounded_below holds (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) let D be Division of A; ::_thesis: for f, g being Function of A,REAL st f | A is bounded_below & g | A is bounded_below holds (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) let f, g be Function of A,REAL; ::_thesis: ( f | A is bounded_below & g | A is bounded_below implies (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) ) assume that A1: f | A is bounded_below and A2: g | A is bounded_below ; ::_thesis: (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) set H = lower_volume ((f + g),D); set G = lower_volume (g,D); set F = lower_volume (f,D); len (lower_volume (g,D)) = len D by Def7; then A3: lower_volume (g,D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; len (lower_volume (f,D)) = len D by Def7; then A4: lower_volume (f,D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; A5: for j being Nat st j in Seg (len D) holds ((lower_volume (f,D)) + (lower_volume (g,D))) . j <= (lower_volume ((f + g),D)) . j proof let j be Nat; ::_thesis: ( j in Seg (len D) implies ((lower_volume (f,D)) + (lower_volume (g,D))) . j <= (lower_volume ((f + g),D)) . j ) assume j in Seg (len D) ; ::_thesis: ((lower_volume (f,D)) + (lower_volume (g,D))) . j <= (lower_volume ((f + g),D)) . j then j in dom D by FINSEQ_1:def_3; then ((lower_volume (f,D)) . j) + ((lower_volume (g,D)) . j) <= (lower_volume ((f + g),D)) . j by A1, A2, Th54; hence ((lower_volume (f,D)) + (lower_volume (g,D))) . j <= (lower_volume ((f + g),D)) . j by A4, A3, RVSUM_1:11; ::_thesis: verum end; len (lower_volume ((f + g),D)) = len D by Def7; then A6: lower_volume ((f + g),D) is Element of (len D) -tuples_on REAL by FINSEQ_2:92; (lower_volume (f,D)) + (lower_volume (g,D)) is Element of (len D) -tuples_on REAL by A4, A3, FINSEQ_2:120; then Sum ((lower_volume (f,D)) + (lower_volume (g,D))) <= Sum (lower_volume ((f + g),D)) by A6, A5, RVSUM_1:82; hence (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) by A4, A3, RVSUM_1:89; ::_thesis: verum end; theorem :: INTEGRA1:57 for A being non empty closed_interval Subset of REAL for f, g being Function of A,REAL st f | A is bounded & g | A is bounded & f is integrable & g is integrable holds ( f + g is integrable & integral (f + g) = (integral f) + (integral g) ) proof let A be non empty closed_interval Subset of REAL; ::_thesis: for f, g being Function of A,REAL st f | A is bounded & g | A is bounded & f is integrable & g is integrable holds ( f + g is integrable & integral (f + g) = (integral f) + (integral g) ) let f, g be Function of A,REAL; ::_thesis: ( f | A is bounded & g | A is bounded & f is integrable & g is integrable implies ( f + g is integrable & integral (f + g) = (integral f) + (integral g) ) ) assume that A1: f | A is bounded and A2: g | A is bounded and A3: f is integrable and A4: g is integrable ; ::_thesis: ( f + g is integrable & integral (f + g) = (integral f) + (integral g) ) A5: (lower_integral f) + (lower_integral g) = (upper_integral f) + (lower_integral g) by A3, Def16 .= (integral f) + (integral g) by A4, Def16 ; A6: (f + g) | (A /\ A) is bounded by A1, A2, RFUNCT_1:83; for D being set st D in (divs A) /\ (dom (lower_sum_set (f + g))) holds (lower_sum_set (f + g)) . D <= ((upper_bound (rng f)) * (vol A)) + ((upper_bound (rng g)) * (vol A)) proof let D be set ; ::_thesis: ( D in (divs A) /\ (dom (lower_sum_set (f + g))) implies (lower_sum_set (f + g)) . D <= ((upper_bound (rng f)) * (vol A)) + ((upper_bound (rng g)) * (vol A)) ) assume D in (divs A) /\ (dom (lower_sum_set (f + g))) ; ::_thesis: (lower_sum_set (f + g)) . D <= ((upper_bound (rng f)) * (vol A)) + ((upper_bound (rng g)) * (vol A)) then reconsider D = D as Division of A by Def3; (lower_sum_set (f + g)) . D = lower_sum ((f + g),D) by Def11; then A7: (lower_sum_set (f + g)) . D <= upper_sum ((f + g),D) by A6, Th28; upper_sum (f,D) <= (upper_bound (rng f)) * (vol A) by A1, Th27; then A8: (upper_sum (f,D)) + (upper_sum (g,D)) <= ((upper_bound (rng f)) * (vol A)) + (upper_sum (g,D)) by XREAL_1:6; upper_sum (g,D) <= (upper_bound (rng g)) * (vol A) by A2, Th27; then A9: ((upper_bound (rng f)) * (vol A)) + (upper_sum (g,D)) <= ((upper_bound (rng f)) * (vol A)) + ((upper_bound (rng g)) * (vol A)) by XREAL_1:6; upper_sum ((f + g),D) <= (upper_sum (f,D)) + (upper_sum (g,D)) by A1, A2, Th55; then (lower_sum_set (f + g)) . D <= (upper_sum (f,D)) + (upper_sum (g,D)) by A7, XXREAL_0:2; then (lower_sum_set (f + g)) . D <= ((upper_bound (rng f)) * (vol A)) + (upper_sum (g,D)) by A8, XXREAL_0:2; hence (lower_sum_set (f + g)) . D <= ((upper_bound (rng f)) * (vol A)) + ((upper_bound (rng g)) * (vol A)) by A9, XXREAL_0:2; ::_thesis: verum end; then (lower_sum_set (f + g)) | (divs A) is bounded_above by RFUNCT_1:70; then A10: rng (lower_sum_set (f + g)) is bounded_above by Th13; then A11: f + g is lower_integrable by Def13; for D being set st D in (divs A) /\ (dom (upper_sum_set (f + g))) holds ((lower_bound (rng f)) * (vol A)) + ((lower_bound (rng g)) * (vol A)) <= (upper_sum_set (f + g)) . D proof let D be set ; ::_thesis: ( D in (divs A) /\ (dom (upper_sum_set (f + g))) implies ((lower_bound (rng f)) * (vol A)) + ((lower_bound (rng g)) * (vol A)) <= (upper_sum_set (f + g)) . D ) assume D in (divs A) /\ (dom (upper_sum_set (f + g))) ; ::_thesis: ((lower_bound (rng f)) * (vol A)) + ((lower_bound (rng g)) * (vol A)) <= (upper_sum_set (f + g)) . D then reconsider D = D as Division of A by Def3; (upper_sum_set (f + g)) . D = upper_sum ((f + g),D) by Def10; then A12: lower_sum ((f + g),D) <= (upper_sum_set (f + g)) . D by A6, Th28; (lower_bound (rng f)) * (vol A) <= lower_sum (f,D) by A1, Th25; then A13: ((lower_bound (rng f)) * (vol A)) + (lower_sum (g,D)) <= (lower_sum (f,D)) + (lower_sum (g,D)) by XREAL_1:6; (lower_bound (rng g)) * (vol A) <= lower_sum (g,D) by A2, Th25; then A14: ((lower_bound (rng f)) * (vol A)) + ((lower_bound (rng g)) * (vol A)) <= ((lower_bound (rng f)) * (vol A)) + (lower_sum (g,D)) by XREAL_1:6; (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) by A1, A2, Th56; then (lower_sum (f,D)) + (lower_sum (g,D)) <= (upper_sum_set (f + g)) . D by A12, XXREAL_0:2; then ((lower_bound (rng f)) * (vol A)) + (lower_sum (g,D)) <= (upper_sum_set (f + g)) . D by A13, XXREAL_0:2; hence ((lower_bound (rng f)) * (vol A)) + ((lower_bound (rng g)) * (vol A)) <= (upper_sum_set (f + g)) . D by A14, XXREAL_0:2; ::_thesis: verum end; then (upper_sum_set (f + g)) | (divs A) is bounded_below by RFUNCT_1:71; then A15: rng (upper_sum_set (f + g)) is bounded_below by Th11; A16: for D being Division of A st D in (divs A) /\ (dom (upper_sum_set (f + g))) holds ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_integral (f + g) proof let D be Division of A; ::_thesis: ( D in (divs A) /\ (dom (upper_sum_set (f + g))) implies ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_integral (f + g) ) (upper_sum (f,D)) + (upper_sum (g,D)) >= upper_sum ((f + g),D) by A1, A2, Th55; then A17: ((upper_sum_set f) . D) + (upper_sum (g,D)) >= upper_sum ((f + g),D) by Def10; assume D in (divs A) /\ (dom (upper_sum_set (f + g))) ; ::_thesis: ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_integral (f + g) then D in dom (upper_sum_set (f + g)) by XBOOLE_0:def_4; then (upper_sum_set (f + g)) . D in rng (upper_sum_set (f + g)) by FUNCT_1:def_3; then A18: (upper_sum_set (f + g)) . D >= upper_integral (f + g) by A15, SEQ_4:def_2; ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_sum ((f + g),D) by A17, Def10; then ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= (upper_sum_set (f + g)) . D by Def10; hence ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_integral (f + g) by A18, XXREAL_0:2; ::_thesis: verum end; A19: dom (upper_sum_set (f + g)) = divs A by FUNCT_2:def_1; A20: for a1 being real number st a1 in rng (upper_sum_set f) holds a1 >= (upper_integral (f + g)) - (upper_integral g) proof let a1 be real number ; ::_thesis: ( a1 in rng (upper_sum_set f) implies a1 >= (upper_integral (f + g)) - (upper_integral g) ) assume a1 in rng (upper_sum_set f) ; ::_thesis: a1 >= (upper_integral (f + g)) - (upper_integral g) then consider D1 being Element of divs A such that D1 in dom (upper_sum_set f) and A21: a1 = (upper_sum_set f) . D1 by PARTFUN1:3; reconsider D1 = D1 as Division of A by Def3; A22: a1 = upper_sum (f,D1) by A21, Def10; for a2 being real number st a2 in rng (upper_sum_set g) holds a2 >= (upper_integral (f + g)) - a1 proof let a2 be real number ; ::_thesis: ( a2 in rng (upper_sum_set g) implies a2 >= (upper_integral (f + g)) - a1 ) assume a2 in rng (upper_sum_set g) ; ::_thesis: a2 >= (upper_integral (f + g)) - a1 then consider D2 being Element of divs A such that D2 in dom (upper_sum_set g) and A23: a2 = (upper_sum_set g) . D2 by PARTFUN1:3; reconsider D2 = D2 as Division of A by Def3; consider D being Division of A such that A24: D1 <= D and A25: D2 <= D by Th47; A26: D in divs A by Def3; (upper_sum_set g) . D = upper_sum (g,D) by Def10; then A27: (upper_sum_set g) . D <= upper_sum (g,D2) by A2, A25, Th45; (upper_sum_set f) . D = upper_sum (f,D) by Def10; then (upper_sum_set f) . D <= upper_sum (f,D1) by A1, A24, Th45; then A28: ((upper_sum_set f) . D) + ((upper_sum_set g) . D) <= (upper_sum (f,D1)) + (upper_sum (g,D2)) by A27, XREAL_1:7; ((upper_sum_set f) . D) + ((upper_sum_set g) . D) >= upper_integral (f + g) by A19, A16, A26; then A29: (upper_sum (f,D1)) + (upper_sum (g,D2)) >= upper_integral (f + g) by A28, XXREAL_0:2; a2 = upper_sum (g,D2) by A23, Def10; hence a2 >= (upper_integral (f + g)) - a1 by A22, A29, XREAL_1:20; ::_thesis: verum end; then lower_bound (rng (upper_sum_set g)) >= (upper_integral (f + g)) - a1 by SEQ_4:43; then a1 + (lower_bound (rng (upper_sum_set g))) >= upper_integral (f + g) by XREAL_1:20; hence a1 >= (upper_integral (f + g)) - (upper_integral g) by XREAL_1:20; ::_thesis: verum end; upper_integral f >= (upper_integral (f + g)) - (upper_integral g) by A20, SEQ_4:43; then A30: (integral f) + (upper_integral g) >= upper_integral (f + g) by XREAL_1:20; A31: for D being Division of A st D in (divs A) /\ (dom (lower_sum_set (f + g))) holds ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_integral (f + g) proof let D be Division of A; ::_thesis: ( D in (divs A) /\ (dom (lower_sum_set (f + g))) implies ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_integral (f + g) ) (lower_sum (f,D)) + (lower_sum (g,D)) <= lower_sum ((f + g),D) by A1, A2, Th56; then A32: ((lower_sum_set f) . D) + (lower_sum (g,D)) <= lower_sum ((f + g),D) by Def11; assume D in (divs A) /\ (dom (lower_sum_set (f + g))) ; ::_thesis: ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_integral (f + g) then D in dom (lower_sum_set (f + g)) by XBOOLE_0:def_4; then (lower_sum_set (f + g)) . D in rng (lower_sum_set (f + g)) by FUNCT_1:def_3; then A33: (lower_sum_set (f + g)) . D <= lower_integral (f + g) by A10, SEQ_4:def_1; ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_sum ((f + g),D) by A32, Def11; then ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= (lower_sum_set (f + g)) . D by Def11; hence ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_integral (f + g) by A33, XXREAL_0:2; ::_thesis: verum end; A34: dom (lower_sum_set (f + g)) = divs A by FUNCT_2:def_1; A35: for a1 being real number st a1 in rng (lower_sum_set f) holds a1 <= (lower_integral (f + g)) - (lower_integral g) proof let a1 be real number ; ::_thesis: ( a1 in rng (lower_sum_set f) implies a1 <= (lower_integral (f + g)) - (lower_integral g) ) assume a1 in rng (lower_sum_set f) ; ::_thesis: a1 <= (lower_integral (f + g)) - (lower_integral g) then consider D1 being Element of divs A such that D1 in dom (lower_sum_set f) and A36: a1 = (lower_sum_set f) . D1 by PARTFUN1:3; reconsider D1 = D1 as Division of A by Def3; A37: a1 = lower_sum (f,D1) by A36, Def11; for a2 being real number st a2 in rng (lower_sum_set g) holds a2 <= (lower_integral (f + g)) - a1 proof let a2 be real number ; ::_thesis: ( a2 in rng (lower_sum_set g) implies a2 <= (lower_integral (f + g)) - a1 ) assume a2 in rng (lower_sum_set g) ; ::_thesis: a2 <= (lower_integral (f + g)) - a1 then consider D2 being Element of divs A such that D2 in dom (lower_sum_set g) and A38: a2 = (lower_sum_set g) . D2 by PARTFUN1:3; reconsider D2 = D2 as Division of A by Def3; consider D being Division of A such that A39: D1 <= D and A40: D2 <= D by Th47; A41: D in divs A by Def3; (lower_sum_set g) . D = lower_sum (g,D) by Def11; then A42: (lower_sum_set g) . D >= lower_sum (g,D2) by A2, A40, Th46; (lower_sum_set f) . D = lower_sum (f,D) by Def11; then (lower_sum_set f) . D >= lower_sum (f,D1) by A1, A39, Th46; then A43: ((lower_sum_set f) . D) + ((lower_sum_set g) . D) >= (lower_sum (f,D1)) + (lower_sum (g,D2)) by A42, XREAL_1:7; ((lower_sum_set f) . D) + ((lower_sum_set g) . D) <= lower_integral (f + g) by A34, A31, A41; then A44: (lower_sum (f,D1)) + (lower_sum (g,D2)) <= lower_integral (f + g) by A43, XXREAL_0:2; a2 = lower_sum (g,D2) by A38, Def11; hence a2 <= (lower_integral (f + g)) - a1 by A37, A44, XREAL_1:19; ::_thesis: verum end; then upper_bound (rng (lower_sum_set g)) <= (lower_integral (f + g)) - a1 by SEQ_4:45; then a1 + (upper_bound (rng (lower_sum_set g))) <= lower_integral (f + g) by XREAL_1:19; hence a1 <= (lower_integral (f + g)) - (lower_integral g) by XREAL_1:19; ::_thesis: verum end; upper_bound (rng (lower_sum_set f)) <= (lower_integral (f + g)) - (lower_integral g) by A35, SEQ_4:45; then A45: (lower_integral f) + (lower_integral g) <= lower_integral (f + g) by XREAL_1:19; A46: upper_integral (f + g) >= lower_integral (f + g) by A6, Th49; then (integral f) + (integral g) <= upper_integral (f + g) by A45, A5, XXREAL_0:2; then upper_integral (f + g) = (integral f) + (integral g) by A30, XXREAL_0:1; then A47: upper_integral (f + g) = lower_integral (f + g) by A45, A46, A5, XXREAL_0:1; f + g is upper_integrable by A15, Def12; hence ( f + g is integrable & integral (f + g) = (integral f) + (integral g) ) by A11, A45, A5, A30, A47, Def16, XXREAL_0:1; ::_thesis: verum end; theorem :: INTEGRA1:58 for i, j being Element of NAT for f being FinSequence st i in dom f & j in dom f & i <= j holds len (mid (f,i,j)) = (j - i) + 1 by Lm1;