:: INTEGRA2 semantic presentation

theorem Th1: :: INTEGRA2:1
for b1 being closed-interval Subset of REAL
for b2 being real number holds
( b2 in b1 iff ( inf b1 <= b2 & b2 <= sup b1 ) )
proof end;

definition
let c1 be FinSequence of REAL ;
attr a1 is non-decreasing means :Def1: :: INTEGRA2:def 1
for b1 being Nat holds
( b1 in dom a1 & b1 + 1 in dom a1 implies a1 . b1 <= a1 . (b1 + 1) );
end;

:: deftheorem Def1 defines non-decreasing INTEGRA2:def 1 :
for b1 being FinSequence of REAL holds
( b1 is non-decreasing iff for b2 being Nat holds
( b2 in dom b1 & b2 + 1 in dom b1 implies b1 . b2 <= b1 . (b2 + 1) ) );

registration
cluster non-decreasing FinSequence of REAL ;
existence
ex b1 being FinSequence of REAL st b1 is non-decreasing
proof end;
end;

theorem Th2: :: INTEGRA2:2
for b1 being non-decreasing FinSequence of REAL
for b2, b3 being Nat holds
( b2 in dom b1 & b3 in dom b1 & b2 <= b3 implies b1 . b2 <= b1 . b3 )
proof end;

theorem Th3: :: INTEGRA2:3
for b1 being FinSequence of REAL holds
ex b2 being non-decreasing FinSequence of REAL st b1,b2 are_fiberwise_equipotent
proof end;

theorem Th4: :: INTEGRA2:4
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4, b5 being Nat holds
( 1 <= b3 & b5 <= len b2 & b3 <= b4 & b4 < b5 implies (mid b2,b3,b4) ^ (mid b2,(b4 + 1),b5) = mid b2,b3,b5 )
proof end;

definition
let c1 be Subset of REAL ;
let c2 be real number ;
func c2 * c1 -> Subset of REAL means :Def2: :: INTEGRA2:def 2
for b1 being Real holds
( b1 in a3 iff ex b2 being Real st
( b2 in a1 & b1 = a2 * b2 ) );
existence
ex b1 being Subset of REAL st
for b2 being Real holds
( b2 in b1 iff ex b3 being Real st
( b3 in c1 & b2 = c2 * b3 ) )
proof end;
uniqueness
for b1, b2 being Subset of REAL holds
( ( for b3 being Real holds
( b3 in b1 iff ex b4 being Real st
( b4 in c1 & b3 = c2 * b4 ) ) ) & ( for b3 being Real holds
( b3 in b2 iff ex b4 being Real st
( b4 in c1 & b3 = c2 * b4 ) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def2 defines * INTEGRA2:def 2 :
for b1 being Subset of REAL
for b2 being real number
for b3 being Subset of REAL holds
( b3 = b2 * b1 iff for b4 being Real holds
( b4 in b3 iff ex b5 being Real st
( b5 in b1 & b4 = b2 * b5 ) ) );

theorem Th5: :: INTEGRA2:5
for b1, b2 being non empty set
for b3 being PartFunc of b1, REAL holds
( b3 is_bounded_above_on b1 & b2 c= b1 implies b3 | b2 is_bounded_above_on b2 )
proof end;

theorem Th6: :: INTEGRA2:6
for b1, b2 being non empty set
for b3 being PartFunc of b1, REAL holds
( b3 is_bounded_below_on b1 & b2 c= b1 implies b3 | b2 is_bounded_below_on b2 )
proof end;

theorem Th7: :: INTEGRA2:7
for b1 being Real
for b2 being non empty Subset of REAL holds
not b1 * b2 is empty
proof end;

theorem Th8: :: INTEGRA2:8
for b1 being Real
for b2 being Subset of REAL holds b1 * b2 = { (b1 * b3) where B is Real : b3 in b2 }
proof end;

theorem Th9: :: INTEGRA2:9
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_above & 0 <= b1 implies b1 * b2 is bounded_above )
proof end;

theorem Th10: :: INTEGRA2:10
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_above & b1 <= 0 implies b1 * b2 is bounded_below )
proof end;

theorem Th11: :: INTEGRA2:11
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_below & 0 <= b1 implies b1 * b2 is bounded_below )
proof end;

theorem Th12: :: INTEGRA2:12
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_below & b1 <= 0 implies b1 * b2 is bounded_above )
proof end;

theorem Th13: :: INTEGRA2:13
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_above & 0 <= b1 implies sup (b1 * b2) = b1 * (sup b2) )
proof end;

theorem Th14: :: INTEGRA2:14
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_above & b1 <= 0 implies inf (b1 * b2) = b1 * (sup b2) )
proof end;

theorem Th15: :: INTEGRA2:15
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_below & 0 <= b1 implies inf (b1 * b2) = b1 * (inf b2) )
proof end;

theorem Th16: :: INTEGRA2:16
for b1 being Real
for b2 being non empty Subset of REAL holds
( b2 is bounded_below & b1 <= 0 implies sup (b1 * b2) = b1 * (inf b2) )
proof end;

theorem Th17: :: INTEGRA2:17
for b1 being Real
for b2 being non empty set
for b3 being Function of b2, REAL holds rng (b1 (#) b3) = b1 * (rng b3)
proof end;

theorem Th18: :: INTEGRA2:18
for b1 being Real
for b2, b3 being non empty set
for b4 being PartFunc of b2, REAL holds rng (b1 (#) (b4 | b3)) = b1 * (rng (b4 | b3))
proof end;

theorem Th19: :: INTEGRA2:19
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being Element of divs b2 holds
( b3 is_bounded_on b2 & b1 >= 0 implies (upper_sum_set (b1 (#) b3)) . b4 >= (b1 * (inf (rng b3))) * (vol b2) )
proof end;

theorem Th20: :: INTEGRA2:20
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being Element of divs b2 holds
( b3 is_bounded_on b2 & b1 <= 0 implies (upper_sum_set (b1 (#) b3)) . b4 >= (b1 * (sup (rng b3))) * (vol b2) )
proof end;

theorem Th21: :: INTEGRA2:21
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being Element of divs b2 holds
( b3 is_bounded_on b2 & b1 >= 0 implies (lower_sum_set (b1 (#) b3)) . b4 <= (b1 * (sup (rng b3))) * (vol b2) )
proof end;

theorem Th22: :: INTEGRA2:22
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being Element of divs b2 holds
( b3 is_bounded_on b2 & b1 <= 0 implies (lower_sum_set (b1 (#) b3)) . b4 <= (b1 * (inf (rng b3))) * (vol b2) )
proof end;

theorem Th23: :: INTEGRA2:23
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4
for b6 being Nat holds
( b6 in Seg (len b5) & b3 is_bounded_above_on b2 & b1 >= 0 implies (upper_volume (b1 (#) b3),b5) . b6 = b1 * ((upper_volume b3,b5) . b6) )
proof end;

theorem Th24: :: INTEGRA2:24
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4
for b6 being Nat holds
( b6 in Seg (len b5) & b3 is_bounded_above_on b2 & b1 <= 0 implies (lower_volume (b1 (#) b3),b5) . b6 = b1 * ((upper_volume b3,b5) . b6) )
proof end;

theorem Th25: :: INTEGRA2:25
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4
for b6 being Nat holds
( b6 in Seg (len b5) & b3 is_bounded_below_on b2 & b1 >= 0 implies (lower_volume (b1 (#) b3),b5) . b6 = b1 * ((lower_volume b3,b5) . b6) )
proof end;

theorem Th26: :: INTEGRA2:26
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4
for b6 being Nat holds
( b6 in Seg (len b5) & b3 is_bounded_below_on b2 & b1 <= 0 implies (upper_volume (b1 (#) b3),b5) . b6 = b1 * ((lower_volume b3,b5) . b6) )
proof end;

theorem Th27: :: INTEGRA2:27
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4 holds
( b3 is_bounded_above_on b2 & b1 >= 0 implies upper_sum (b1 (#) b3),b5 = b1 * (upper_sum b3,b5) )
proof end;

theorem Th28: :: INTEGRA2:28
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4 holds
( b3 is_bounded_above_on b2 & b1 <= 0 implies lower_sum (b1 (#) b3),b5 = b1 * (upper_sum b3,b5) )
proof end;

theorem Th29: :: INTEGRA2:29
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4 holds
( b3 is_bounded_below_on b2 & b1 >= 0 implies lower_sum (b1 (#) b3),b5 = b1 * (lower_sum b3,b5) )
proof end;

theorem Th30: :: INTEGRA2:30
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL
for b4 being non empty Division of b2
for b5 being Element of b4 holds
( b3 is_bounded_below_on b2 & b1 <= 0 implies upper_sum (b1 (#) b3),b5 = b1 * (lower_sum b3,b5) )
proof end;

theorem Th31: :: INTEGRA2:31
for b1 being Real
for b2 being closed-interval Subset of REAL
for b3 being Function of b2, REAL holds
( b3 is_bounded_on b2 & b3 is_integrable_on b2 implies ( b1 (#) b3 is_integrable_on b2 & integral (b1 (#) b3) = b1 * (integral b3) ) )
proof end;

theorem Th32: :: INTEGRA2:32
for b1 being closed-interval Subset of REAL
for b2 being Function of b1, REAL holds
( b2 is_bounded_on b1 & b2 is_integrable_on b1 & ( for b3 being Real holds
( b3 in b1 implies b2 . b3 >= 0 ) ) implies integral b2 >= 0 )
proof end;

theorem Th33: :: INTEGRA2:33
for b1 being closed-interval Subset of REAL
for b2, b3 being Function of b1, REAL holds
( b2 is_bounded_on b1 & b2 is_integrable_on b1 & b3 is_bounded_on b1 & b3 is_integrable_on b1 implies ( b2 - b3 is_integrable_on b1 & integral (b2 - b3) = (integral b2) - (integral b3) ) )
proof end;

theorem Th34: :: INTEGRA2:34
for b1 being closed-interval Subset of REAL
for b2, b3 being Function of b1, REAL holds
( b2 is_bounded_on b1 & b2 is_integrable_on b1 & b3 is_bounded_on b1 & b3 is_integrable_on b1 & ( for b4 being Real holds
( b4 in b1 implies b2 . b4 >= b3 . b4 ) ) implies integral b2 >= integral b3 )
proof end;

theorem Th35: :: INTEGRA2:35
for b1 being closed-interval Subset of REAL
for b2 being Function of b1, REAL holds
( b2 is_bounded_on b1 implies rng (upper_sum_set b2) is bounded_below )
proof end;

theorem Th36: :: INTEGRA2:36
for b1 being closed-interval Subset of REAL
for b2 being Function of b1, REAL holds
( b2 is_bounded_on b1 implies rng (lower_sum_set b2) is bounded_above )
proof end;

definition
let c1 be closed-interval Subset of REAL ;
mode DivSequence is Function of NAT , divs a1;
end;

definition
let c1 be closed-interval Subset of REAL ;
let c2 be DivSequence of c1;
func delta c2 -> Real_Sequence means :: INTEGRA2:def 3
for b1 being Nat holds a3 . b1 = delta (a2 . b1);
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = delta (c2 . b2)
proof end;
uniqueness
for b1, b2 being Real_Sequence holds
( ( for b3 being Nat holds b1 . b3 = delta (c2 . b3) ) & ( for b3 being Nat holds b2 . b3 = delta (c2 . b3) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def3 defines delta INTEGRA2:def 3 :
for b1 being closed-interval Subset of REAL
for b2 being DivSequence of b1
for b3 being Real_Sequence holds
( b3 = delta b2 iff for b4 being Nat holds b3 . b4 = delta (b2 . b4) );

definition
let c1 be closed-interval Subset of REAL ;
let c2 be PartFunc of c1, REAL ;
let c3 be DivSequence of c1;
func upper_sum c2,c3 -> Real_Sequence means :: INTEGRA2:def 4
for b1 being Nat holds a4 . b1 = upper_sum a2,(a3 . b1);
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = upper_sum c2,(c3 . b2)
proof end;
uniqueness
for b1, b2 being Real_Sequence holds
( ( for b3 being Nat holds b1 . b3 = upper_sum c2,(c3 . b3) ) & ( for b3 being Nat holds b2 . b3 = upper_sum c2,(c3 . b3) ) implies b1 = b2 )
proof end;
func lower_sum c2,c3 -> Real_Sequence means :: INTEGRA2:def 5
for b1 being Nat holds a4 . b1 = lower_sum a2,(a3 . b1);
existence
ex b1 being Real_Sequence st
for b2 being Nat holds b1 . b2 = lower_sum c2,(c3 . b2)
proof end;
uniqueness
for b1, b2 being Real_Sequence holds
( ( for b3 being Nat holds b1 . b3 = lower_sum c2,(c3 . b3) ) & ( for b3 being Nat holds b2 . b3 = lower_sum c2,(c3 . b3) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def4 defines upper_sum INTEGRA2:def 4 :
for b1 being closed-interval Subset of REAL
for b2 being PartFunc of b1, REAL
for b3 being DivSequence of b1
for b4 being Real_Sequence holds
( b4 = upper_sum b2,b3 iff for b5 being Nat holds b4 . b5 = upper_sum b2,(b3 . b5) );

:: deftheorem Def5 defines lower_sum INTEGRA2:def 5 :
for b1 being closed-interval Subset of REAL
for b2 being PartFunc of b1, REAL
for b3 being DivSequence of b1
for b4 being Real_Sequence holds
( b4 = lower_sum b2,b3 iff for b5 being Nat holds b4 . b5 = lower_sum b2,(b3 . b5) );

theorem Th37: :: INTEGRA2:37
for b1 being closed-interval Subset of REAL
for b2, b3 being Element of divs b1 holds
( b2 <= b3 implies for b4 being Nat holds
not ( b4 in dom b3 & ( for b5 being Nat holds
not ( b5 in dom b2 & divset b3,b4 c= divset b2,b5 ) ) ) )
proof end;

theorem Th38: :: INTEGRA2:38
for b1, b2 being non empty finite Subset of REAL holds
( b1 c= b2 implies max b1 <= max b2 )
proof end;

theorem Th39: :: INTEGRA2:39
for b1, b2 being non empty finite Subset of REAL holds
( ex b3 being Real st
( b3 in b2 & max b1 <= b3 ) implies max b1 <= max b2 )
proof end;

theorem Th40: :: INTEGRA2:40
for b1, b2 being closed-interval Subset of REAL holds
( b1 c= b2 implies vol b1 <= vol b2 )
proof end;

theorem Th41: :: INTEGRA2:41
for b1 being closed-interval Subset of REAL
for b2, b3 being Element of divs b1 holds
( b2 <= b3 implies delta b2 >= delta b3 )
proof end;