:: BVFUNC_2 semantic presentation

definition
let c1 be set ;
redefine func PARTITIONS as PARTITIONS c1 -> Part-Family of a1;
coherence
PARTITIONS c1 is Part-Family of c1
proof end;
end;

definition
let c1 be set ;
let c2 be non empty Part-Family of c1;
redefine mode Element as Element of c2 -> a_partition of a1;
coherence
for b1 being Element of c2 holds b1 is a_partition of c1
by T_1TOPSP:def 3;
end;

theorem Th1: :: BVFUNC_2:1
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of b1 ex b4 being Subset of b1 st
( b3 in b4 & ex b5 being Functionex b6 being Subset-Family of b1 st
( dom b5 = b2 & rng b5 = b6 & ( for b7 being set st b7 in b2 holds
b5 . b7 in b7 ) & b4 = Intersect b6 & b4 <> {} ) )
proof end;

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
func '/\' c2 -> a_partition of a1 means :Def1: :: BVFUNC_2:def 1
for b1 being set holds
( b1 in a3 iff ex b2 being Functionex b3 being Subset-Family of a1 st
( dom b2 = a2 & rng b2 = b3 & ( for b4 being set st b4 in a2 holds
b2 . b4 in b4 ) & b1 = Intersect b3 & b1 <> {} ) );
existence
ex b1 being a_partition of c1 st
for b2 being set holds
( b2 in b1 iff ex b3 being Functionex b4 being Subset-Family of c1 st
( dom b3 = c2 & rng b3 = b4 & ( for b5 being set st b5 in c2 holds
b3 . b5 in b5 ) & b2 = Intersect b4 & b2 <> {} ) )
proof end;
uniqueness
for b1, b2 being a_partition of c1 st ( for b3 being set holds
( b3 in b1 iff ex b4 being Functionex b5 being Subset-Family of c1 st
( dom b4 = c2 & rng b4 = b5 & ( for b6 being set st b6 in c2 holds
b4 . b6 in b6 ) & b3 = Intersect b5 & b3 <> {} ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being Functionex b5 being Subset-Family of c1 st
( dom b4 = c2 & rng b4 = b5 & ( for b6 being set st b6 in c2 holds
b4 . b6 in b6 ) & b3 = Intersect b5 & b3 <> {} ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines '/\' BVFUNC_2:def 1 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being a_partition of b1 holds
( b3 = '/\' b2 iff for b4 being set holds
( b4 in b3 iff ex b5 being Functionex b6 being Subset-Family of b1 st
( dom b5 = b2 & rng b5 = b6 & ( for b7 being set st b7 in b2 holds
b5 . b7 in b7 ) & b4 = Intersect b6 & b4 <> {} ) ) );

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
let c3 be set ;
pred c3 is_upper_min_depend_of c2 means :Def2: :: BVFUNC_2:def 2
( ( for b1 being a_partition of a1 st b1 in a2 holds
a3 is_a_dependent_set_of b1 ) & ( for b1 being set st b1 c= a3 & ( for b2 being a_partition of a1 st b2 in a2 holds
b1 is_a_dependent_set_of b2 ) holds
b1 = a3 ) );
end;

:: deftheorem Def2 defines is_upper_min_depend_of BVFUNC_2:def 2 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being set holds
( b3 is_upper_min_depend_of b2 iff ( ( for b4 being a_partition of b1 st b4 in b2 holds
b3 is_a_dependent_set_of b4 ) & ( for b4 being set st b4 c= b3 & ( for b5 being a_partition of b1 st b5 in b2 holds
b4 is_a_dependent_set_of b5 ) holds
b4 = b3 ) ) );

theorem Th2: :: BVFUNC_2:2
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of b1 st b2 <> {} holds
ex b4 being Subset of b1 st
( b3 in b4 & b4 is_upper_min_depend_of b2 )
proof end;

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
func '\/' c2 -> a_partition of a1 means :Def3: :: BVFUNC_2:def 3
for b1 being set holds
( b1 in a3 iff b1 is_upper_min_depend_of a2 ) if a2 <> {}
otherwise a3 = %I a1;
existence
( ( c2 <> {} implies ex b1 being a_partition of c1 st
for b2 being set holds
( b2 in b1 iff b2 is_upper_min_depend_of c2 ) ) & ( not c2 <> {} implies ex b1 being a_partition of c1 st b1 = %I c1 ) )
proof end;
uniqueness
for b1, b2 being a_partition of c1 holds
( ( c2 <> {} & ( for b3 being set holds
( b3 in b1 iff b3 is_upper_min_depend_of c2 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is_upper_min_depend_of c2 ) ) implies b1 = b2 ) & ( not c2 <> {} & b1 = %I c1 & b2 = %I c1 implies b1 = b2 ) )
proof end;
consistency
for b1 being a_partition of c1 holds verum
;
end;

:: deftheorem Def3 defines '\/' BVFUNC_2:def 3 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being a_partition of b1 holds
( ( b2 <> {} implies ( b3 = '\/' b2 iff for b4 being set holds
( b4 in b3 iff b4 is_upper_min_depend_of b2 ) ) ) & ( not b2 <> {} implies ( b3 = '\/' b2 iff b3 = %I b1 ) ) );

theorem Th3: :: BVFUNC_2:3
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being a_partition of b1 st b3 in b2 holds
b3 '>' '/\' b2
proof end;

theorem Th4: :: BVFUNC_2:4
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being a_partition of b1 st b3 in b2 holds
b3 '<' '\/' b2
proof end;

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
attr a2 is generating means :: BVFUNC_2:def 4
'/\' a2 = %I a1;
end;

:: deftheorem Def4 defines generating BVFUNC_2:def 4 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1) holds
( b2 is generating iff '/\' b2 = %I b1 );

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
attr a2 is independent means :: BVFUNC_2:def 5
for b1 being Function
for b2 being Subset-Family of a1 st dom b1 = a2 & rng b1 = b2 & ( for b3 being set st b3 in a2 holds
b1 . b3 in b3 ) holds
Intersect b2 <> {} ;
end;

:: deftheorem Def5 defines independent BVFUNC_2:def 5 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1) holds
( b2 is independent iff for b3 being Function
for b4 being Subset-Family of b1 st dom b3 = b2 & rng b3 = b4 & ( for b5 being set st b5 in b2 holds
b3 . b5 in b5 ) holds
Intersect b4 <> {} );

definition
let c1 be non empty set ;
let c2 be Subset of (PARTITIONS c1);
pred c2 is_a_coordinate means :: BVFUNC_2:def 6
( a2 is independent & a2 is generating );
end;

:: deftheorem Def6 defines is_a_coordinate BVFUNC_2:def 6 :
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1) holds
( b2 is_a_coordinate iff ( b2 is independent & b2 is generating ) );

definition
let c1 be non empty set ;
let c2 be a_partition of c1;
redefine func { as {c2} -> Subset of (PARTITIONS a1);
coherence
{c2} is Subset of (PARTITIONS c1)
proof end;
end;

definition
let c1 be non empty set ;
let c2 be a_partition of c1;
let c3 be Subset of (PARTITIONS c1);
func CompF c2,c3 -> a_partition of a1 equals :: BVFUNC_2:def 7
'/\' (a3 \ {a2});
correctness
coherence
'/\' (c3 \ {c2}) is a_partition of c1
;
;
end;

:: deftheorem Def7 defines CompF BVFUNC_2:def 7 :
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Subset of (PARTITIONS b1) holds CompF b2,b3 = '/\' (b3 \ {b2});

definition
let c1 be non empty set ;
let c2 be Element of Funcs c1,BOOLEAN ;
let c3 be Subset of (PARTITIONS c1);
let c4 be a_partition of c1;
pred c2 is_independent_of c4,c3 means :Def8: :: BVFUNC_2:def 8
a2 is_dependent_of CompF a4,a3;
end;

:: deftheorem Def8 defines is_independent_of BVFUNC_2:def 8 :
for b1 being non empty set
for b2 being Element of Funcs b1,BOOLEAN
for b3 being Subset of (PARTITIONS b1)
for b4 being a_partition of b1 holds
( b2 is_independent_of b4,b3 iff b2 is_dependent_of CompF b4,b3 );

definition
let c1 be non empty set ;
let c2 be Element of Funcs c1,BOOLEAN ;
let c3 be Subset of (PARTITIONS c1);
let c4 be a_partition of c1;
func All c2,c4,c3 -> Element of Funcs a1,BOOLEAN equals :: BVFUNC_2:def 9
B_INF a2,(CompF a4,a3);
correctness
coherence
B_INF c2,(CompF c4,c3) is Element of Funcs c1,BOOLEAN
;
;
end;

:: deftheorem Def9 defines All BVFUNC_2:def 9 :
for b1 being non empty set
for b2 being Element of Funcs b1,BOOLEAN
for b3 being Subset of (PARTITIONS b1)
for b4 being a_partition of b1 holds All b2,b4,b3 = B_INF b2,(CompF b4,b3);

definition
let c1 be non empty set ;
let c2 be Element of Funcs c1,BOOLEAN ;
let c3 be Subset of (PARTITIONS c1);
let c4 be a_partition of c1;
func Ex c2,c4,c3 -> Element of Funcs a1,BOOLEAN equals :: BVFUNC_2:def 10
B_SUP a2,(CompF a4,a3);
correctness
coherence
B_SUP c2,(CompF c4,c3) is Element of Funcs c1,BOOLEAN
;
;
end;

:: deftheorem Def10 defines Ex BVFUNC_2:def 10 :
for b1 being non empty set
for b2 being Element of Funcs b1,BOOLEAN
for b3 being Subset of (PARTITIONS b1)
for b4 being a_partition of b1 holds Ex b2,b4,b3 = B_SUP b2,(CompF b4,b3);

theorem Th5: :: BVFUNC_2:5
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds All b3,b4,b2 is_dependent_of CompF b4,b2
proof end;

theorem Th6: :: BVFUNC_2:6
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds Ex b3,b4,b2 is_dependent_of CompF b4,b2
proof end;

theorem Th7: :: BVFUNC_2:7
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds All (I_el b1),b4,b2 = I_el b1
proof end;

theorem Th8: :: BVFUNC_2:8
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds Ex (I_el b1),b4,b2 = I_el b1
proof end;

theorem Th9: :: BVFUNC_2:9
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds All (O_el b1),b4,b2 = O_el b1
proof end;

theorem Th10: :: BVFUNC_2:10
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds Ex (O_el b1),b4,b2 = O_el b1
proof end;

theorem Th11: :: BVFUNC_2:11
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds All b3,b4,b2 '<' b3
proof end;

theorem Th12: :: BVFUNC_2:12
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds b3 '<' Ex b3,b4,b2
proof end;

theorem Th13: :: BVFUNC_2:13
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds All (b3 '&' b4),b5,b2 = (All b3,b5,b2) '&' (All b4,b5,b2) by BVFUNC_1:42;

theorem Th14: :: BVFUNC_2:14
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds (All b3,b5,b2) 'or' (All b4,b5,b2) '<' All (b3 'or' b4),b5,b2
proof end;

theorem Th15: :: BVFUNC_2:15
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds All (b3 'imp' b4),b5,b2 '<' (All b3,b5,b2) 'imp' (All b4,b5,b2)
proof end;

theorem Th16: :: BVFUNC_2:16
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds Ex (b3 'or' b4),b5,b2 = (Ex b3,b5,b2) 'or' (Ex b4,b5,b2) by BVFUNC_1:43;

theorem Th17: :: BVFUNC_2:17
for b1 being non empty set
for b2, b3 being Element of Funcs b1,BOOLEAN
for b4 being Subset of (PARTITIONS b1)
for b5 being a_partition of b1 holds Ex (b2 '&' b3),b5,b4 '<' (Ex b2,b5,b4) '&' (Ex b3,b5,b4)
proof end;

theorem Th18: :: BVFUNC_2:18
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds (Ex b3,b5,b2) 'xor' (Ex b4,b5,b2) '<' Ex (b3 'xor' b4),b5,b2
proof end;

theorem Th19: :: BVFUNC_2:19
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds (Ex b3,b5,b2) 'imp' (Ex b4,b5,b2) '<' Ex (b3 'imp' b4),b5,b2
proof end;

theorem Th20: :: BVFUNC_2:20
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds 'not' (All b3,b4,b2) = Ex ('not' b3),b4,b2
proof end;

theorem Th21: :: BVFUNC_2:21
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3 being Element of Funcs b1,BOOLEAN
for b4 being a_partition of b1 holds 'not' (Ex b3,b4,b2) = All ('not' b3),b4,b2
proof end;

theorem Th22: :: BVFUNC_2:22
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b3 'imp' b4),b5,b2 = b3 'imp' (All b4,b5,b2)
proof end;

theorem Th23: :: BVFUNC_2:23
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 'imp' b3),b5,b2 = (Ex b4,b5,b2) 'imp' b3
proof end;

theorem Th24: :: BVFUNC_2:24
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b3 'or' b4),b5,b2 = b3 'or' (All b4,b5,b2)
proof end;

theorem Th25: :: BVFUNC_2:25
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 'or' b3),b5,b2 = (All b4,b5,b2) 'or' b3 by Th24;

theorem Th26: :: BVFUNC_2:26
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 'or' b3),b5,b2 '<' (Ex b4,b5,b2) 'or' b3
proof end;

theorem Th27: :: BVFUNC_2:27
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b3 '&' b4),b5,b2 = b3 '&' (All b4,b5,b2)
proof end;

theorem Th28: :: BVFUNC_2:28
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 '&' b3),b5,b2 = (All b4,b5,b2) '&' b3 by Th27;

theorem Th29: :: BVFUNC_2:29
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds All (b3 '&' b4),b5,b2 '<' (Ex b3,b5,b2) '&' b4
proof end;

theorem Th30: :: BVFUNC_2:30
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b3 'xor' b4),b5,b2 '<' b3 'xor' (All b4,b5,b2)
proof end;

theorem Th31: :: BVFUNC_2:31
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 'xor' b3),b5,b2 '<' (All b4,b5,b2) 'xor' b3 by Th30;

theorem Th32: :: BVFUNC_2:32
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b3 'eqv' b4),b5,b2 '<' b3 'eqv' (All b4,b5,b2)
proof end;

theorem Th33: :: BVFUNC_2:33
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
All (b4 'eqv' b3),b5,b2 '<' (All b4,b5,b2) 'eqv' b3 by Th32;

theorem Th34: :: BVFUNC_2:34
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
Ex (b3 'or' b4),b5,b2 = b3 'or' (Ex b4,b5,b2)
proof end;

theorem Th35: :: BVFUNC_2:35
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
Ex (b4 'or' b3),b5,b2 = (Ex b4,b5,b2) 'or' b3 by Th34;

theorem Th36: :: BVFUNC_2:36
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
Ex (b3 '&' b4),b5,b2 = b3 '&' (Ex b4,b5,b2)
proof end;

theorem Th37: :: BVFUNC_2:37
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
Ex (b4 '&' b3),b5,b2 = (Ex b4,b5,b2) '&' b3 by Th36;

theorem Th38: :: BVFUNC_2:38
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds b3 'imp' (Ex b4,b5,b2) '<' Ex (b3 'imp' b4),b5,b2
proof end;

theorem Th39: :: BVFUNC_2:39
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 holds (Ex b3,b5,b2) 'imp' b4 '<' Ex (b3 'imp' b4),b5,b2
proof end;

theorem Th40: :: BVFUNC_2:40
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
b3 'xor' (Ex b4,b5,b2) '<' Ex (b3 'xor' b4),b5,b2
proof end;

theorem Th41: :: BVFUNC_2:41
for b1 being non empty set
for b2 being Subset of (PARTITIONS b1)
for b3, b4 being Element of Funcs b1,BOOLEAN
for b5 being a_partition of b1 st b3 is_independent_of b5,b2 holds
(Ex b4,b5,b2) 'xor' b3 '<' Ex (b4 'xor' b3),b5,b2 by Th40;