:: MESFUNC2 semantic presentation

definition
let c1 be non empty set ;
let c2 be PartFunc of c1, ExtREAL ;
pred c2 is_finite means :Def1: :: MESFUNC2:def 1
for b1 being Element of a1 holds
not ( b1 in dom a2 & not |.(a2 . b1).| < +infty );
end;

:: deftheorem Def1 defines is_finite MESFUNC2:def 1 :
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds
( b2 is_finite iff for b3 being Element of b1 holds
not ( b3 in dom b2 & not |.(b2 . b3).| < +infty ) );

theorem Th1: :: MESFUNC2:1
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds b2 = 1 (#) b2
proof end;

theorem Th2: :: MESFUNC2:2
for b1 being non empty set
for b2, b3 being PartFunc of b1, ExtREAL holds
( ( b2 is_finite or b3 is_finite ) implies ( dom (b2 + b3) = (dom b2) /\ (dom b3) & dom (b2 - b3) = (dom b2) /\ (dom b3) ) )
proof end;

theorem Th3: :: MESFUNC2:3
for b1 being non empty set
for b2 being SigmaField of b1
for b3, b4 being PartFunc of b1, ExtREAL
for b5 being Function of RAT ,b2
for b6 being Real
for b7 being Element of b2 holds
( b3 is_finite & b4 is_finite & ( for b8 being Rational holds b5 . b8 = (b7 /\ (less_dom b3,(R_EAL b8))) /\ (b7 /\ (less_dom b4,(R_EAL (b6 - b8)))) ) implies b7 /\ (less_dom (b3 + b4),(R_EAL b6)) = union (rng b5) )
proof end;

theorem Th4: :: MESFUNC2:4
ex b1 being Function of NAT , RAT st
( b1 is one-to-one & dom b1 = NAT & rng b1 = RAT )
proof end;

theorem Th5: :: MESFUNC2:5
for b1, b2, b3 being non empty set
for b4 being Function of b1,b3 holds
not ( b1,b2 are_equipotent & ( for b5 being Function of b2,b3 holds
not rng b4 = rng b5 ) )
proof end;

theorem Th6: :: MESFUNC2:6
for b1 being non empty set
for b2 being Real
for b3 being SigmaField of b1
for b4, b5 being PartFunc of b1, ExtREAL
for b6 being Element of b3 holds
not ( b4 is_measurable_on b6 & b5 is_measurable_on b6 & ( for b7 being Function of RAT ,b3 holds
not for b8 being Rational holds b7 . b8 = (b6 /\ (less_dom b4,(R_EAL b8))) /\ (b6 /\ (less_dom b5,(R_EAL (b2 - b8)))) ) )
proof end;

theorem Th7: :: MESFUNC2:7
for b1 being non empty set
for b2 being SigmaField of b1
for b3, b4 being PartFunc of b1, ExtREAL
for b5 being Element of b2 holds
( b3 is_finite & b4 is_finite & b3 is_measurable_on b5 & b4 is_measurable_on b5 implies b3 + b4 is_measurable_on b5 )
proof end;

theorem Th8: :: MESFUNC2:8
canceled;

theorem Th9: :: MESFUNC2:9
for b1 being non empty set
for b2, b3 being PartFunc of b1, ExtREAL holds b2 - b3 = b2 + (- b3)
proof end;

theorem Th10: :: MESFUNC2:10
for b1 being Real holds R_EAL (- b1) = - (R_EAL b1) by SUPINF_2:3;

theorem Th11: :: MESFUNC2:11
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds - b2 = (- 1) (#) b2
proof end;

theorem Th12: :: MESFUNC2:12
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Real holds
( b2 is_finite implies b3 (#) b2 is_finite )
proof end;

theorem Th13: :: MESFUNC2:13
for b1 being non empty set
for b2 being SigmaField of b1
for b3, b4 being PartFunc of b1, ExtREAL
for b5 being Element of b2 holds
( b3 is_finite & b4 is_finite & b3 is_measurable_on b5 & b4 is_measurable_on b5 & b5 c= dom b4 implies b3 - b4 is_measurable_on b5 )
proof end;

definition
let c1 be non empty set ;
let c2 be PartFunc of c1, ExtREAL ;
deffunc H1( Element of c1) -> Element of ExtREAL = max (c2 . a1),0. ;
func max+ c2 -> PartFunc of a1, ExtREAL means :Def2: :: MESFUNC2:def 2
( dom a3 = dom a2 & ( for b1 being Element of a1 holds
( b1 in dom a3 implies a3 . b1 = max (a2 . b1),0. ) ) );
existence
ex b1 being PartFunc of c1, ExtREAL st
( dom b1 = dom c2 & ( for b2 being Element of c1 holds
( b2 in dom b1 implies b1 . b2 = max (c2 . b2),0. ) ) )
proof end;
uniqueness
for b1, b2 being PartFunc of c1, ExtREAL holds
( dom b1 = dom c2 & ( for b3 being Element of c1 holds
( b3 in dom b1 implies b1 . b3 = max (c2 . b3),0. ) ) & dom b2 = dom c2 & ( for b3 being Element of c1 holds
( b3 in dom b2 implies b2 . b3 = max (c2 . b3),0. ) ) implies b1 = b2 )
proof end;
deffunc H2( Element of c1) -> Element of ExtREAL = max (- (c2 . a1)),0. ;
func max- c2 -> PartFunc of a1, ExtREAL means :Def3: :: MESFUNC2:def 3
( dom a3 = dom a2 & ( for b1 being Element of a1 holds
( b1 in dom a3 implies a3 . b1 = max (- (a2 . b1)),0. ) ) );
existence
ex b1 being PartFunc of c1, ExtREAL st
( dom b1 = dom c2 & ( for b2 being Element of c1 holds
( b2 in dom b1 implies b1 . b2 = max (- (c2 . b2)),0. ) ) )
proof end;
uniqueness
for b1, b2 being PartFunc of c1, ExtREAL holds
( dom b1 = dom c2 & ( for b3 being Element of c1 holds
( b3 in dom b1 implies b1 . b3 = max (- (c2 . b3)),0. ) ) & dom b2 = dom c2 & ( for b3 being Element of c1 holds
( b3 in dom b2 implies b2 . b3 = max (- (c2 . b3)),0. ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def2 defines max+ MESFUNC2:def 2 :
for b1 being non empty set
for b2, b3 being PartFunc of b1, ExtREAL holds
( b3 = max+ b2 iff ( dom b3 = dom b2 & ( for b4 being Element of b1 holds
( b4 in dom b3 implies b3 . b4 = max (b2 . b4),0. ) ) ) );

:: deftheorem Def3 defines max- MESFUNC2:def 3 :
for b1 being non empty set
for b2, b3 being PartFunc of b1, ExtREAL holds
( b3 = max- b2 iff ( dom b3 = dom b2 & ( for b4 being Element of b1 holds
( b4 in dom b3 implies b3 . b4 = max (- (b2 . b4)),0. ) ) ) );

theorem Th14: :: MESFUNC2:14
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 implies 0. <= (max+ b2) . b3 )
proof end;

theorem Th15: :: MESFUNC2:15
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 implies 0. <= (max- b2) . b3 )
proof end;

theorem Th16: :: MESFUNC2:16
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds max- b2 = max+ (- b2)
proof end;

theorem Th17: :: MESFUNC2:17
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & 0. < (max+ b2) . b3 implies (max- b2) . b3 = 0. )
proof end;

theorem Th18: :: MESFUNC2:18
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & 0. < (max- b2) . b3 implies (max+ b2) . b3 = 0. )
proof end;

theorem Th19: :: MESFUNC2:19
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds
( dom b2 = dom ((max+ b2) - (max- b2)) & dom b2 = dom ((max+ b2) + (max- b2)) )
proof end;

theorem Th20: :: MESFUNC2:20
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 implies ( ( (max+ b2) . b3 = b2 . b3 or (max+ b2) . b3 = 0. ) & ( (max- b2) . b3 = - (b2 . b3) or (max- b2) . b3 = 0. ) ) )
proof end;

theorem Th21: :: MESFUNC2:21
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & (max+ b2) . b3 = b2 . b3 implies (max- b2) . b3 = 0. )
proof end;

theorem Th22: :: MESFUNC2:22
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & (max+ b2) . b3 = 0. implies (max- b2) . b3 = - (b2 . b3) )
proof end;

theorem Th23: :: MESFUNC2:23
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & (max- b2) . b3 = - (b2 . b3) implies (max+ b2) . b3 = 0. )
proof end;

theorem Th24: :: MESFUNC2:24
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being Element of b1 holds
( b3 in dom b2 & (max- b2) . b3 = 0. implies (max+ b2) . b3 = b2 . b3 )
proof end;

theorem Th25: :: MESFUNC2:25
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds b2 = (max+ b2) - (max- b2)
proof end;

theorem Th26: :: MESFUNC2:26
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds |.b2.| = (max+ b2) + (max- b2)
proof end;

theorem Th27: :: MESFUNC2:27
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being SigmaField of b1
for b4 being Element of b3 holds
( b2 is_measurable_on b4 implies max+ b2 is_measurable_on b4 )
proof end;

theorem Th28: :: MESFUNC2:28
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being SigmaField of b1
for b4 being Element of b3 holds
( b2 is_measurable_on b4 & b4 c= dom b2 implies max- b2 is_measurable_on b4 )
proof end;

theorem Th29: :: MESFUNC2:29
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being PartFunc of b1, ExtREAL
for b4 being Element of b2 holds
( b3 is_measurable_on b4 & b4 c= dom b3 implies |.b3.| is_measurable_on b4 )
proof end;

theorem Th30: :: MESFUNC2:30
for b1, b2 being set holds rng (chi b1,b2) c= {0. ,1. } by MESFUNC1:def 8;

definition
let c1, c2 be set ;
redefine func chi as chi c1,c2 -> PartFunc of a2, ExtREAL ;
coherence
chi c1,c2 is PartFunc of c2, ExtREAL
proof end;
end;

theorem Th31: :: MESFUNC2:31
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Element of b2 holds chi b3,b1 is_finite
proof end;

theorem Th32: :: MESFUNC2:32
for b1 being non empty set
for b2 being SigmaField of b1
for b3, b4 being Element of b2 holds chi b3,b1 is_measurable_on b4
proof end;

registration
let c1 be set ;
let c2 be SigmaField of c1;
cluster disjoint_valued FinSequence of a2;
existence
ex b1 being FinSequence of c2 st b1 is disjoint_valued
proof end;
end;

definition
let c1 be set ;
let c2 be SigmaField of c1;
mode Finite_Sep_Sequence is disjoint_valued FinSequence of a2;
end;

theorem Th33: :: MESFUNC2:33
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Function holds
not ( b3 is Finite_Sep_Sequence of b2 & ( for b4 being Sep_Sequence of b2 holds
not ( union (rng b3) = union (rng b4) & ( for b5 being Nat holds
( b5 in dom b3 implies b3 . b5 = b4 . b5 ) ) & ( for b5 being Nat holds
( not b5 in dom b3 implies b4 . b5 = {} ) ) ) ) )
proof end;

theorem Th34: :: MESFUNC2:34
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Function holds
( b3 is Finite_Sep_Sequence of b2 implies union (rng b3) in b2 )
proof end;

definition
let c1 be non empty set ;
let c2 be SigmaField of c1;
let c3 be PartFunc of c1, ExtREAL ;
canceled;
pred c3 is_simple_func_in c2 means :Def5: :: MESFUNC2:def 5
( a3 is_finite & ex b1 being Finite_Sep_Sequence of a2 st
( dom a3 = union (rng b1) & ( for b2 being Nat
for b3, b4 being Element of a1 holds
( b2 in dom b1 & b3 in b1 . b2 & b4 in b1 . b2 implies a3 . b3 = a3 . b4 ) ) ) );
end;

:: deftheorem Def4 MESFUNC2:def 4 :
canceled;

:: deftheorem Def5 defines is_simple_func_in MESFUNC2:def 5 :
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being PartFunc of b1, ExtREAL holds
( b3 is_simple_func_in b2 iff ( b3 is_finite & ex b4 being Finite_Sep_Sequence of b2 st
( dom b3 = union (rng b4) & ( for b5 being Nat
for b6, b7 being Element of b1 holds
( b5 in dom b4 & b6 in b4 . b5 & b7 in b4 . b5 implies b3 . b6 = b3 . b7 ) ) ) ) );

theorem Th35: :: MESFUNC2:35
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL holds
( b2 is_finite implies rng b2 is Subset of REAL )
proof end;

theorem Th36: :: MESFUNC2:36
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Nat
for b4 being Relation holds
( b4 is Finite_Sep_Sequence of b2 implies b4 | (Seg b3) is Finite_Sep_Sequence of b2 )
proof end;

theorem Th37: :: MESFUNC2:37
for b1 being non empty set
for b2 being PartFunc of b1, ExtREAL
for b3 being SigmaField of b1
for b4 being Element of b3 holds
( b2 is_simple_func_in b3 implies b2 is_measurable_on b4 )
proof end;