:: PROB_3 semantic presentation

Lemma1: for b1, b2, b3 being real number st 0 < b3 & b1 <= b2 holds
( b1 < b2 + b3 & b1 - b3 < b2 )
proof end;

theorem Th1: :: PROB_3:1
for b1 being FinSequence holds not 0 in dom b1
proof end;

theorem Th2: :: PROB_3:2
for b1 being Nat
for b2 being FinSequence holds
( b1 in dom b2 iff ( b1 <> 0 & b1 <= len b2 ) )
proof end;

theorem Th3: :: PROB_3:3
for b1 being real number
for b2 being Real_Sequence st ex b3 being Nat st
for b4 being Nat st b3 <= b4 holds
b2 . b4 = b1 holds
( b2 is convergent & lim b2 = b1 )
proof end;

theorem Th4: :: PROB_3:4
for b1 being Nat
for b2 being non empty set
for b3 being SigmaField of b2
for b4 being SetSequence of b3
for b5 being Probability of b3 holds (b5 * b4) . b1 >= 0
proof end;

theorem Th5: :: PROB_3:5
for b1 being Nat
for b2 being non empty set
for b3 being SigmaField of b2
for b4, b5 being SetSequence of b3
for b6 being Probability of b3 st b4 . b1 c= b5 . b1 holds
(b6 * b4) . b1 <= (b6 * b5) . b1
proof end;

theorem Th6: :: PROB_3:6
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 st b3 is non-decreasing holds
b4 * b3 is non-decreasing
proof end;

theorem Th7: :: PROB_3:7
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 st b3 is non-increasing holds
b4 * b3 is non-increasing
proof end;

theorem Th8: :: PROB_3:8
for b1 being set
for b2 being SetSequence of b1 ex b3 being SetSequence of b1 st
( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b3 . b4) /\ (b2 . (b4 + 1)) ) )
proof end;

theorem Th9: :: PROB_3:9
for b1 being set
for b2 being SetSequence of b1 ex b3 being SetSequence of b1 st
( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b3 . b4) \/ (b2 . (b4 + 1)) ) )
proof end;

definition
let c1 be set ;
let c2 be SetSequence of c1;
func Partial_Intersection c2 -> SetSequence of a1 means :Def1: :: PROB_3:def 1
( a3 . 0 = a2 . 0 & ( for b1 being Nat holds a3 . (b1 + 1) = (a3 . b1) /\ (a2 . (b1 + 1)) ) );
existence
ex b1 being SetSequence of c1 st
( b1 . 0 = c2 . 0 & ( for b2 being Nat holds b1 . (b2 + 1) = (b1 . b2) /\ (c2 . (b2 + 1)) ) )
by Th8;
uniqueness
for b1, b2 being SetSequence of c1 st b1 . 0 = c2 . 0 & ( for b3 being Nat holds b1 . (b3 + 1) = (b1 . b3) /\ (c2 . (b3 + 1)) ) & b2 . 0 = c2 . 0 & ( for b3 being Nat holds b2 . (b3 + 1) = (b2 . b3) /\ (c2 . (b3 + 1)) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines Partial_Intersection PROB_3:def 1 :
for b1 being set
for b2, b3 being SetSequence of b1 holds
( b3 = Partial_Intersection b2 iff ( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b3 . b4) /\ (b2 . (b4 + 1)) ) ) );

definition
let c1 be set ;
let c2 be SetSequence of c1;
func Partial_Union c2 -> SetSequence of a1 means :Def2: :: PROB_3:def 2
( a3 . 0 = a2 . 0 & ( for b1 being Nat holds a3 . (b1 + 1) = (a3 . b1) \/ (a2 . (b1 + 1)) ) );
existence
ex b1 being SetSequence of c1 st
( b1 . 0 = c2 . 0 & ( for b2 being Nat holds b1 . (b2 + 1) = (b1 . b2) \/ (c2 . (b2 + 1)) ) )
by Th9;
uniqueness
for b1, b2 being SetSequence of c1 st b1 . 0 = c2 . 0 & ( for b3 being Nat holds b1 . (b3 + 1) = (b1 . b3) \/ (c2 . (b3 + 1)) ) & b2 . 0 = c2 . 0 & ( for b3 being Nat holds b2 . (b3 + 1) = (b2 . b3) \/ (c2 . (b3 + 1)) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines Partial_Union PROB_3:def 2 :
for b1 being set
for b2, b3 being SetSequence of b1 holds
( b3 = Partial_Union b2 iff ( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b3 . b4) \/ (b2 . (b4 + 1)) ) ) );

theorem Th10: :: PROB_3:10
for b1 being Nat
for b2 being set
for b3 being SetSequence of b2 holds (Partial_Intersection b3) . b1 c= b3 . b1
proof end;

theorem Th11: :: PROB_3:11
for b1 being Nat
for b2 being set
for b3 being SetSequence of b2 holds b3 . b1 c= (Partial_Union b3) . b1
proof end;

theorem Th12: :: PROB_3:12
for b1 being set
for b2 being SetSequence of b1 holds Partial_Intersection b2 is non-increasing
proof end;

theorem Th13: :: PROB_3:13
for b1 being set
for b2 being SetSequence of b1 holds Partial_Union b2 is non-decreasing
proof end;

theorem Th14: :: PROB_3:14
for b1 being Nat
for b2, b3 being set
for b4 being SetSequence of b2 holds
( b3 in (Partial_Intersection b4) . b1 iff for b5 being Nat st b5 <= b1 holds
b3 in b4 . b5 )
proof end;

theorem Th15: :: PROB_3:15
for b1 being Nat
for b2, b3 being set
for b4 being SetSequence of b2 holds
( b3 in (Partial_Union b4) . b1 iff ex b5 being Nat st
( b5 <= b1 & b3 in b4 . b5 ) )
proof end;

theorem Th16: :: PROB_3:16
for b1 being set
for b2 being SetSequence of b1 holds Intersection (Partial_Intersection b2) = Intersection b2
proof end;

theorem Th17: :: PROB_3:17
for b1 being set
for b2 being SetSequence of b1 holds Union (Partial_Union b2) = Union b2
proof end;

theorem Th18: :: PROB_3:18
for b1 being set
for b2 being SetSequence of b1 ex b3 being SetSequence of b1 st
( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b2 . (b4 + 1)) \ ((Partial_Union b2) . b4) ) )
proof end;

definition
let c1 be set ;
let c2 be SetSequence of c1;
func Partial_Diff_Union c2 -> SetSequence of a1 means :Def3: :: PROB_3:def 3
( a3 . 0 = a2 . 0 & ( for b1 being Nat holds a3 . (b1 + 1) = (a2 . (b1 + 1)) \ ((Partial_Union a2) . b1) ) );
existence
ex b1 being SetSequence of c1 st
( b1 . 0 = c2 . 0 & ( for b2 being Nat holds b1 . (b2 + 1) = (c2 . (b2 + 1)) \ ((Partial_Union c2) . b2) ) )
by Th18;
uniqueness
for b1, b2 being SetSequence of c1 st b1 . 0 = c2 . 0 & ( for b3 being Nat holds b1 . (b3 + 1) = (c2 . (b3 + 1)) \ ((Partial_Union c2) . b3) ) & b2 . 0 = c2 . 0 & ( for b3 being Nat holds b2 . (b3 + 1) = (c2 . (b3 + 1)) \ ((Partial_Union c2) . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def3 defines Partial_Diff_Union PROB_3:def 3 :
for b1 being set
for b2, b3 being SetSequence of b1 holds
( b3 = Partial_Diff_Union b2 iff ( b3 . 0 = b2 . 0 & ( for b4 being Nat holds b3 . (b4 + 1) = (b2 . (b4 + 1)) \ ((Partial_Union b2) . b4) ) ) );

theorem Th19: :: PROB_3:19
for b1 being Nat
for b2, b3 being set
for b4 being SetSequence of b2 holds
( b3 in (Partial_Diff_Union b4) . b1 iff ( b3 in b4 . b1 & ( for b5 being Nat st b5 < b1 holds
not b3 in b4 . b5 ) ) )
proof end;

theorem Th20: :: PROB_3:20
for b1 being Nat
for b2 being set
for b3 being SetSequence of b2 holds (Partial_Diff_Union b3) . b1 c= b3 . b1
proof end;

theorem Th21: :: PROB_3:21
for b1 being Nat
for b2 being set
for b3 being SetSequence of b2 holds (Partial_Diff_Union b3) . b1 c= (Partial_Union b3) . b1
proof end;

theorem Th22: :: PROB_3:22
for b1 being set
for b2 being SetSequence of b1 holds Partial_Union (Partial_Diff_Union b2) = Partial_Union b2
proof end;

theorem Th23: :: PROB_3:23
for b1 being set
for b2 being SetSequence of b1 holds Union (Partial_Diff_Union b2) = Union b2
proof end;

definition
let c1 be set ;
let c2 be SetSequence of c1;
redefine attr disjoint_valued as a2 is disjoint_valued means :Def4: :: PROB_3:def 4
for b1, b2 being Nat st b1 <> b2 holds
a2 . b1 misses a2 . b2;
compatibility
( c2 is disjoint_valued iff for b1, b2 being Nat st b1 <> b2 holds
c2 . b1 misses c2 . b2 )
proof end;
end;

:: deftheorem Def4 defines disjoint_valued PROB_3:def 4 :
for b1 being set
for b2 being SetSequence of b1 holds
( b2 is disjoint_valued iff for b3, b4 being Nat st b3 <> b4 holds
b2 . b3 misses b2 . b4 );

theorem Th24: :: PROB_3:24
for b1 being set
for b2 being SetSequence of b1 holds Partial_Diff_Union b2 is disjoint_valued
proof end;

definition
let c1 be set ;
let c2 be SigmaField of c1;
let c3 be SetSequence of c2;
func @Partial_Intersection c3 -> SetSequence of a2 equals :: PROB_3:def 5
Partial_Intersection a3;
coherence
Partial_Intersection c3 is SetSequence of c2
proof end;
end;

:: deftheorem Def5 defines @Partial_Intersection PROB_3:def 5 :
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Intersection b3 = Partial_Intersection b3;

definition
let c1 be set ;
let c2 be SigmaField of c1;
let c3 be SetSequence of c2;
func @Partial_Union c3 -> SetSequence of a2 equals :: PROB_3:def 6
Partial_Union a3;
coherence
Partial_Union c3 is SetSequence of c2
proof end;
end;

:: deftheorem Def6 defines @Partial_Union PROB_3:def 6 :
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Union b3 = Partial_Union b3;

definition
let c1 be set ;
let c2 be SigmaField of c1;
let c3 be SetSequence of c2;
func @Partial_Diff_Union c3 -> SetSequence of a2 equals :: PROB_3:def 7
Partial_Diff_Union a3;
coherence
Partial_Diff_Union c3 is SetSequence of c2
proof end;
end;

:: deftheorem Def7 defines @Partial_Diff_Union PROB_3:def 7 :
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Diff_Union b3 = Partial_Diff_Union b3;

theorem Th25: :: PROB_3:25
for b1 being set
for b2 being SigmaField of b1
for b3, b4 being SetSequence of b2 st b3 = @Partial_Intersection b4 holds
( b3 . 0 = b4 . 0 & ( for b5 being Nat holds b3 . (b5 + 1) = (b3 . b5) /\ (b4 . (b5 + 1)) ) ) by Def1;

theorem Th26: :: PROB_3:26
for b1 being set
for b2 being SigmaField of b1
for b3, b4 being SetSequence of b2 st b3 = @Partial_Union b4 holds
( b3 . 0 = b4 . 0 & ( for b5 being Nat holds b3 . (b5 + 1) = (b3 . b5) \/ (b4 . (b5 + 1)) ) ) by Def2;

theorem Th27: :: PROB_3:27
for b1 being Nat
for b2 being set
for b3 being SigmaField of b2
for b4 being SetSequence of b3 holds (@Partial_Intersection b4) . b1 c= b4 . b1 by Th10;

theorem Th28: :: PROB_3:28
for b1 being Nat
for b2 being set
for b3 being SigmaField of b2
for b4 being SetSequence of b3 holds b4 . b1 c= (@Partial_Union b4) . b1 by Th11;

theorem Th29: :: PROB_3:29
for b1 being Nat
for b2, b3 being set
for b4 being SigmaField of b2
for b5 being SetSequence of b4 holds
( b3 in (@Partial_Intersection b5) . b1 iff for b6 being Nat st b6 <= b1 holds
b3 in b5 . b6 ) by Th14;

theorem Th30: :: PROB_3:30
for b1 being Nat
for b2, b3 being set
for b4 being SigmaField of b2
for b5 being SetSequence of b4 holds
( b3 in (@Partial_Union b5) . b1 iff ex b6 being Nat st
( b6 <= b1 & b3 in b5 . b6 ) ) by Th15;

theorem Th31: :: PROB_3:31
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Intersection b3 is non-increasing by Th12;

theorem Th32: :: PROB_3:32
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Union b3 is non-decreasing by Th13;

theorem Th33: :: PROB_3:33
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds Intersection (@Partial_Intersection b3) = Intersection b3 by Th16;

theorem Th34: :: PROB_3:34
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds Union (@Partial_Union b3) = Union b3 by Th17;

theorem Th35: :: PROB_3:35
for b1 being set
for b2 being SigmaField of b1
for b3, b4 being SetSequence of b2 st b3 = @Partial_Diff_Union b4 holds
( b3 . 0 = b4 . 0 & ( for b5 being Nat holds b3 . (b5 + 1) = (b4 . (b5 + 1)) \ ((@Partial_Union b4) . b5) ) ) by Def3;

theorem Th36: :: PROB_3:36
for b1 being Nat
for b2, b3 being set
for b4 being SigmaField of b2
for b5 being SetSequence of b4 holds
( b3 in (@Partial_Diff_Union b5) . b1 iff ( b3 in b5 . b1 & ( for b6 being Nat st b6 < b1 holds
not b3 in b5 . b6 ) ) ) by Th19;

theorem Th37: :: PROB_3:37
for b1 being Nat
for b2 being set
for b3 being SigmaField of b2
for b4 being SetSequence of b3 holds (@Partial_Diff_Union b4) . b1 c= b4 . b1 by Th20;

theorem Th38: :: PROB_3:38
for b1 being Nat
for b2 being set
for b3 being SigmaField of b2
for b4 being SetSequence of b3 holds (@Partial_Diff_Union b4) . b1 c= (@Partial_Union b4) . b1 by Th21;

theorem Th39: :: PROB_3:39
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Union (@Partial_Diff_Union b3) = @Partial_Union b3 by Th22;

theorem Th40: :: PROB_3:40
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds Union (@Partial_Diff_Union b3) = Union b3 by Th23;

theorem Th41: :: PROB_3:41
for b1 being set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 holds @Partial_Diff_Union b3 is disjoint_valued by Th24;

theorem Th42: :: PROB_3:42
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 holds b4 * (@Partial_Union b3) is non-decreasing
proof end;

theorem Th43: :: PROB_3:43
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 holds b4 * (@Partial_Intersection b3) is non-increasing
proof end;

theorem Th44: :: PROB_3:44
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 holds Partial_Sums (b4 * b3) is non-decreasing
proof end;

theorem Th45: :: PROB_3:45
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 holds (b4 * (@Partial_Union b3)) . 0 = (Partial_Sums (b4 * b3)) . 0
proof end;

theorem Th46: :: PROB_3:46
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 holds
( b4 * (@Partial_Union b3) is convergent & lim (b4 * (@Partial_Union b3)) = sup (b4 * (@Partial_Union b3)) & lim (b4 * (@Partial_Union b3)) = b4 . (Union b3) )
proof end;

theorem Th47: :: PROB_3:47
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2 st b3 is disjoint_valued holds
for b4, b5 being Nat st b4 < b5 holds
(@Partial_Union b3) . b4 misses b3 . b5
proof end;

theorem Th48: :: PROB_3:48
for b1 being Nat
for b2 being non empty set
for b3 being SigmaField of b2
for b4 being SetSequence of b3
for b5 being Probability of b3 st b4 is disjoint_valued holds
(b5 * (@Partial_Union b4)) . b1 = (Partial_Sums (b5 * b4)) . b1
proof end;

theorem Th49: :: PROB_3:49
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 st b3 is disjoint_valued holds
b4 * (@Partial_Union b3) = Partial_Sums (b4 * b3)
proof end;

theorem Th50: :: PROB_3:50
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 st b3 is disjoint_valued holds
( Partial_Sums (b4 * b3) is convergent & lim (Partial_Sums (b4 * b3)) = sup (Partial_Sums (b4 * b3)) & lim (Partial_Sums (b4 * b3)) = b4 . (Union b3) )
proof end;

theorem Th51: :: PROB_3:51
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being SetSequence of b2
for b4 being Probability of b2 st b3 is disjoint_valued holds
b4 . (Union b3) = Sum (b4 * b3)
proof end;

definition
let c1 be set ;
let c2 be FinSequence of bool c1;
let c3 be Nat;
redefine func . as c2 . c3 -> Subset of a1;
coherence
c2 . c3 is Subset of c1
proof end;
end;

theorem Th52: :: PROB_3:52
for b1 being set ex b2 being FinSequence of bool b1 st
for b3 being Nat st b3 in dom b2 holds
b2 . b3 = b1
proof end;

theorem Th53: :: PROB_3:53
for b1 being set
for b2 being FinSequence of bool b1 holds union (rng b2) is Subset of b1
proof end;

definition
let c1 be set ;
let c2 be FinSequence of bool c1;
redefine func Union as Union c2 -> Subset of a1;
coherence
Union c2 is Subset of c1
proof end;
end;

theorem Th54: :: PROB_3:54
for b1, b2 being set
for b3 being FinSequence of bool b1 holds
( b2 in Union b3 iff ex b4 being Nat st
( b4 in dom b3 & b2 in b3 . b4 ) )
proof end;

definition
let c1 be set ;
let c2 be FinSequence of bool c1;
func Complement c2 -> FinSequence of bool a1 means :Def8: :: PROB_3:def 8
( len a3 = len a2 & ( for b1 being Nat st b1 in dom a3 holds
a3 . b1 = (a2 . b1) ` ) );
existence
ex b1 being FinSequence of bool c1 st
( len b1 = len c2 & ( for b2 being Nat st b2 in dom b1 holds
b1 . b2 = (c2 . b2) ` ) )
proof end;
uniqueness
for b1, b2 being FinSequence of bool c1 st len b1 = len c2 & ( for b3 being Nat st b3 in dom b1 holds
b1 . b3 = (c2 . b3) ` ) & len b2 = len c2 & ( for b3 being Nat st b3 in dom b2 holds
b2 . b3 = (c2 . b3) ` ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines Complement PROB_3:def 8 :
for b1 being set
for b2, b3 being FinSequence of bool b1 holds
( b3 = Complement b2 iff ( len b3 = len b2 & ( for b4 being Nat st b4 in dom b3 holds
b3 . b4 = (b2 . b4) ` ) ) );

definition
let c1 be set ;
let c2 be FinSequence of bool c1;
func Intersection c2 -> Subset of a1 equals :Def9: :: PROB_3:def 9
(Union (Complement a2)) ` if a2 <> {}
otherwise {} ;
coherence
( ( c2 <> {} implies (Union (Complement c2)) ` is Subset of c1 ) & ( not c2 <> {} implies {} is Subset of c1 ) )
by SUBSET_1:4;
consistency
for b1 being Subset of c1 holds verum
;
end;

:: deftheorem Def9 defines Intersection PROB_3:def 9 :
for b1 being set
for b2 being FinSequence of bool b1 holds
( ( b2 <> {} implies Intersection b2 = (Union (Complement b2)) ` ) & ( not b2 <> {} implies Intersection b2 = {} ) );

theorem Th55: :: PROB_3:55
for b1 being set
for b2 being FinSequence of bool b1 holds dom (Complement b2) = dom b2
proof end;

theorem Th56: :: PROB_3:56
for b1, b2 being set
for b3 being FinSequence of bool b1 st b3 <> {} holds
( b2 in Intersection b3 iff for b4 being Nat st b4 in dom b3 holds
b2 in b3 . b4 )
proof end;

theorem Th57: :: PROB_3:57
for b1, b2 being set
for b3 being FinSequence of bool b1 st b3 <> {} holds
( b2 in meet (rng b3) iff for b4 being Nat st b4 in dom b3 holds
b2 in b3 . b4 )
proof end;

theorem Th58: :: PROB_3:58
for b1 being set
for b2 being FinSequence of bool b1 holds Intersection b2 = meet (rng b2)
proof end;

theorem Th59: :: PROB_3:59
for b1 being set
for b2 being FinSequence of bool b1 ex b3 being SetSequence of b1 st
( ( for b4 being Nat st b4 in dom b2 holds
b3 . b4 = b2 . b4 ) & ( for b4 being Nat st not b4 in dom b2 holds
b3 . b4 = {} ) )
proof end;

theorem Th60: :: PROB_3:60
for b1 being set
for b2 being FinSequence of bool b1
for b3 being SetSequence of b1 st ( for b4 being Nat st b4 in dom b2 holds
b3 . b4 = b2 . b4 ) & ( for b4 being Nat st not b4 in dom b2 holds
b3 . b4 = {} ) holds
( b3 . 0 = {} & Union b3 = Union b2 )
proof end;

definition
let c1 be set ;
let c2 be SigmaField of c1;
mode FinSequence of c2 -> FinSequence of bool a1 means :Def10: :: PROB_3:def 10
for b1 being Nat st b1 in dom a3 holds
a3 . b1 in a2;
existence
ex b1 being FinSequence of bool c1 st
for b2 being Nat st b2 in dom b1 holds
b1 . b2 in c2
proof end;
end;

:: deftheorem Def10 defines FinSequence PROB_3:def 10 :
for b1 being set
for b2 being SigmaField of b1
for b3 being FinSequence of bool b1 holds
( b3 is FinSequence of b2 iff for b4 being Nat st b4 in dom b3 holds
b3 . b4 in b2 );

definition
let c1 be set ;
let c2 be SigmaField of c1;
let c3 be FinSequence of c2;
let c4 be Nat;
redefine func . as c3 . c4 -> Event of a2;
coherence
c3 . c4 is Event of c2
proof end;
end;

theorem Th61: :: PROB_3:61
for b1 being set
for b2 being SigmaField of b1
for b3 being FinSequence of b2 ex b4 being SetSequence of b2 st
( ( for b5 being Nat st b5 in dom b3 holds
b4 . b5 = b3 . b5 ) & ( for b5 being Nat st not b5 in dom b3 holds
b4 . b5 = {} ) )
proof end;

theorem Th62: :: PROB_3:62
for b1 being set
for b2 being SigmaField of b1
for b3 being FinSequence of b2 holds Union b3 in b2
proof end;

definition
let c1 be set ;
let c2 be SigmaField of c1;
let c3 be FinSequence of c2;
func @Complement c3 -> FinSequence of a2 equals :: PROB_3:def 11
Complement a3;
coherence
Complement c3 is FinSequence of c2
proof end;
end;

:: deftheorem Def11 defines @Complement PROB_3:def 11 :
for b1 being set
for b2 being SigmaField of b1
for b3 being FinSequence of b2 holds @Complement b3 = Complement b3;

theorem Th63: :: PROB_3:63
for b1 being set
for b2 being SigmaField of b1
for b3 being FinSequence of b2 holds Intersection b3 in b2
proof end;

theorem Th64: :: PROB_3:64
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Probability of b2
for b4 being FinSequence of b2 holds dom (b3 * b4) = dom b4
proof end;

theorem Th65: :: PROB_3:65
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Probability of b2
for b4 being FinSequence of b2 holds b3 * b4 is FinSequence of REAL
proof end;

definition
let c1 be non empty set ;
let c2 be SigmaField of c1;
let c3 be FinSequence of c2;
let c4 be Probability of c2;
redefine func * as c4 * c3 -> FinSequence of REAL ;
coherence
c3 * c4 is FinSequence of REAL
by Th65;
end;

theorem Th66: :: PROB_3:66
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Probability of b2
for b4 being FinSequence of b2 holds len (b3 * b4) = len b4
proof end;

theorem Th67: :: PROB_3:67
for b1 being FinSequence of REAL st len b1 = 0 holds
Sum b1 = 0
proof end;

theorem Th68: :: PROB_3:68
for b1 being FinSequence of REAL st len b1 >= 1 holds
ex b2 being Real_Sequence st
( b2 . 1 = b1 . 1 & ( for b3 being Nat st 0 <> b3 & b3 < len b1 holds
b2 . (b3 + 1) = (b2 . b3) + (b1 . (b3 + 1)) ) & Sum b1 = b2 . (len b1) )
proof end;

theorem Th69: :: PROB_3:69
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Probability of b2
for b4 being FinSequence of b2
for b5 being SetSequence of b2 st ( for b6 being Nat st b6 in dom b4 holds
b5 . b6 = b4 . b6 ) & ( for b6 being Nat st not b6 in dom b4 holds
b5 . b6 = {} ) holds
( Partial_Sums (b3 * b5) is convergent & Sum (b3 * b5) = (Partial_Sums (b3 * b5)) . (len b4) & b3 . (Union b5) <= Sum (b3 * b5) & Sum (b3 * b4) = Sum (b3 * b5) )
proof end;

theorem Th70: :: PROB_3:70
for b1 being non empty set
for b2 being SigmaField of b1
for b3 being Probability of b2
for b4 being FinSequence of b2 holds
( b3 . (Union b4) <= Sum (b3 * b4) & ( b4 is disjoint_valued implies b3 . (Union b4) = Sum (b3 * b4) ) )
proof end;

definition
let c1 be set ;
let c2 be Subset-Family of c1;
attr a2 is non-decreasing-closed means :Def12: :: PROB_3:def 12
for b1 being SetSequence of a1 st b1 is non-decreasing & ( for b2 being Nat holds b1 . b2 in a2 ) holds
Union b1 in a2;
attr a2 is non-increasing-closed means :Def13: :: PROB_3:def 13
for b1 being SetSequence of a1 st b1 is non-increasing & ( for b2 being Nat holds b1 . b2 in a2 ) holds
Intersection b1 in a2;
end;

:: deftheorem Def12 defines non-decreasing-closed PROB_3:def 12 :
for b1 being set
for b2 being Subset-Family of b1 holds
( b2 is non-decreasing-closed iff for b3 being SetSequence of b1 st b3 is non-decreasing & ( for b4 being Nat holds b3 . b4 in b2 ) holds
Union b3 in b2 );

:: deftheorem Def13 defines non-increasing-closed PROB_3:def 13 :
for b1 being set
for b2 being Subset-Family of b1 holds
( b2 is non-increasing-closed iff for b3 being SetSequence of b1 st b3 is non-increasing & ( for b4 being Nat holds b3 . b4 in b2 ) holds
Intersection b3 in b2 );

theorem Th71: :: PROB_3:71
for b1 being set
for b2 being Subset-Family of b1 holds
( b2 is non-decreasing-closed iff for b3 being SetSequence of b1 st b3 is non-decreasing & ( for b4 being Nat holds b3 . b4 in b2 ) holds
lim b3 in b2 )
proof end;

theorem Th72: :: PROB_3:72
for b1 being set
for b2 being Subset-Family of b1 holds
( b2 is non-increasing-closed iff for b3 being SetSequence of b1 st b3 is non-increasing & ( for b4 being Nat holds b3 . b4 in b2 ) holds
lim b3 in b2 )
proof end;

theorem Th73: :: PROB_3:73
for b1 being set holds
( bool b1 is non-decreasing-closed & bool b1 is non-increasing-closed )
proof end;

definition
let c1 be set ;
mode MonotoneClass of c1 -> Subset-Family of a1 means :Def14: :: PROB_3:def 14
( a2 is non-decreasing-closed & a2 is non-increasing-closed );
existence
ex b1 being Subset-Family of c1 st
( b1 is non-decreasing-closed & b1 is non-increasing-closed )
proof end;
end;

:: deftheorem Def14 defines MonotoneClass PROB_3:def 14 :
for b1 being set
for b2 being Subset-Family of b1 holds
( b2 is MonotoneClass of b1 iff ( b2 is non-decreasing-closed & b2 is non-increasing-closed ) );

theorem Th74: :: PROB_3:74
for b1, b2 being set holds
( b1 is MonotoneClass of b2 iff ( b1 c= bool b2 & ( for b3 being SetSequence of b2 st b3 is monotone & ( for b4 being Nat holds b3 . b4 in b1 ) holds
lim b3 in b1 ) ) )
proof end;

theorem Th75: :: PROB_3:75
for b1 being set
for b2 being Field_Subset of b1 holds
( b2 is SigmaField of b1 iff b2 is MonotoneClass of b1 )
proof end;

theorem Th76: :: PROB_3:76
for b1 being non empty set holds bool b1 is MonotoneClass of b1
proof end;

theorem Th77: :: PROB_3:77
for b1 being non empty set
for b2 being Subset-Family of b1 ex b3 being MonotoneClass of b1 st
( b2 c= b3 & ( for b4 being set st b2 c= b4 & b4 is MonotoneClass of b1 holds
b3 c= b4 ) )
proof end;

definition
let c1 be non empty set ;
let c2 be Subset-Family of c1;
func monotoneclass c2 -> MonotoneClass of a1 means :Def15: :: PROB_3:def 15
( a2 c= a3 & ( for b1 being set st a2 c= b1 & b1 is MonotoneClass of a1 holds
a3 c= b1 ) );
existence
ex b1 being MonotoneClass of c1 st
( c2 c= b1 & ( for b2 being set st c2 c= b2 & b2 is MonotoneClass of c1 holds
b1 c= b2 ) )
by Th77;
uniqueness
for b1, b2 being MonotoneClass of c1 st c2 c= b1 & ( for b3 being set st c2 c= b3 & b3 is MonotoneClass of c1 holds
b1 c= b3 ) & c2 c= b2 & ( for b3 being set st c2 c= b3 & b3 is MonotoneClass of c1 holds
b2 c= b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def15 defines monotoneclass PROB_3:def 15 :
for b1 being non empty set
for b2 being Subset-Family of b1
for b3 being MonotoneClass of b1 holds
( b3 = monotoneclass b2 iff ( b2 c= b3 & ( for b4 being set st b2 c= b4 & b4 is MonotoneClass of b1 holds
b3 c= b4 ) ) );

theorem Th78: :: PROB_3:78
for b1 being non empty set
for b2 being Field_Subset of b1 holds monotoneclass b2 is Field_Subset of b1
proof end;

theorem Th79: :: PROB_3:79
for b1 being non empty set
for b2 being Field_Subset of b1 holds sigma b2 = monotoneclass b2
proof end;