let F be non empty finite set ; :: thesis: for A being non empty FinSequence of bool F st ( for i being Element of NAT st i in dom A holds
card (A . i) = 1 ) & A is Hall holds
ex X being set st X is_a_system_of_different_representatives_of A

let A be non empty FinSequence of bool F; :: thesis: ( ( for i being Element of NAT st i in dom A holds
card (A . i) = 1 ) & A is Hall implies ex X being set st X is_a_system_of_different_representatives_of A )

assume A1: for i being Element of NAT st i in dom A holds
card (A . i) = 1 ; :: thesis: ( not A is Hall or ex X being set st X is_a_system_of_different_representatives_of A )
assume A2: A is Hall ; :: thesis: ex X being set st X is_a_system_of_different_representatives_of A
A3: card {{} } = 1 by CARD_1:50;
reconsider dA = dom A as non empty set ;
deffunc H1( Element of dA) -> set = A . $1;
A4: for a being Element of dA holds F meets H1(a)
proof
let a be Element of dA; :: thesis: F meets H1(a)
A5: rng A c= bool F by FINSEQ_1:def 4;
A6: A . a in rng A by FUNCT_1:12;
consider z being Element of A . a;
A is non-empty by A2, Th15;
then A . a <> {} ;
then z in A . a ;
hence F meets H1(a) by A5, A6, XBOOLE_0:3; :: thesis: verum
end;
ex f being Function of dA,F st
for a being Element of dA holds f . a in H1(a) from FUNCT_2:sch 11(A4);
then consider f being Function of dA,F such that
A7: for a being Element of dA holds f . a in H1(a) ;
A8: dom f = dom A by FUNCT_2:def 1;
consider n being Nat such that
A9: dom A = Seg n by FINSEQ_1:def 2;
A10: f is FinSequence by A8, A9, FINSEQ_1:def 2;
rng f c= F
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng f or x in F )
assume x in rng f ; :: thesis: x in F
then consider y being set such that
A11: ( y in dom f & x = f . y ) by FUNCT_1:def 5;
A12: f . y in A . y by A7, A8, A11;
A13: A . y in rng A by A8, A11, FUNCT_1:12;
rng A c= bool F by FINSEQ_1:def 4;
hence x in F by A11, A12, A13; :: thesis: verum
end;
then reconsider f = f as FinSequence of F by A10, FINSEQ_1:def 4;
A14: dom A = dom f by FUNCT_2:def 1;
A15: for i being Element of NAT st i in dom f holds
f . i in A . i by A7, A8;
for i, j being Element of NAT st i in dom f & j in dom f & i <> j holds
f . i <> f . j
proof
let i, j be Element of NAT ; :: thesis: ( i in dom f & j in dom f & i <> j implies f . i <> f . j )
assume A16: ( i in dom f & j in dom f & i <> j ) ; :: thesis: f . i <> f . j
thus f . i <> f . j :: thesis: verum
proof
assume A17: f . i = f . j ; :: thesis: contradiction
set J = {i,j};
A18: card {i,j} = 2 by A16, CARD_2:76;
A19: ( i in dom A & j in dom A ) by A16, FUNCT_2:def 1;
then A20: {i,j} c= dom A by ZFMISC_1:38;
card (A . i) = card {{} } by A1, A3, A14, A16;
then consider y being set such that
A21: A . i = {y} by CARD_1:49;
card (A . j) = card {{} } by A1, A3, A19;
then consider z being set such that
A22: A . j = {z} by CARD_1:49;
A23: A . i = {(f . i)}
proof
thus A . i c= {(f . i)} :: according to XBOOLE_0:def 10 :: thesis: {(f . i)} c= A . i
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in A . i or x in {(f . i)} )
assume A24: x in A . i ; :: thesis: x in {(f . i)}
x = f . i
proof
assume A25: x <> f . i ; :: thesis: contradiction
f . i in A . i by A7, A8, A16;
then f . i = y by A21, TARSKI:def 1;
hence contradiction by A21, A24, A25, TARSKI:def 1; :: thesis: verum
end;
hence x in {(f . i)} by TARSKI:def 1; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {(f . i)} or x in A . i )
assume x in {(f . i)} ; :: thesis: x in A . i
then x = f . i by TARSKI:def 1;
hence x in A . i by A7, A8, A16; :: thesis: verum
end;
A26: A . j = {(f . j)}
proof
thus A . j c= {(f . j)} :: according to XBOOLE_0:def 10 :: thesis: {(f . j)} c= A . j
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in A . j or x in {(f . j)} )
assume A27: x in A . j ; :: thesis: x in {(f . j)}
x = f . j
proof
assume A28: x <> f . j ; :: thesis: contradiction
f . j in A . j by A7, A8, A16;
then f . j = z by A22, TARSKI:def 1;
hence contradiction by A22, A27, A28, TARSKI:def 1; :: thesis: verum
end;
hence x in {(f . j)} by TARSKI:def 1; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {(f . j)} or x in A . j )
assume x in {(f . j)} ; :: thesis: x in A . j
then x = f . j by TARSKI:def 1;
hence x in A . j by A7, A8, A16; :: thesis: verum
end;
A29: {(f . i),(f . j)} = {(f . i)} by A17, ENUMSET1:69;
card (union A,{i,j}) = card ((A . i) \/ (A . j)) by A19, Th6
.= card {(f . i),(f . j)} by A23, A26, ENUMSET1:41
.= 1 by A29, CARD_1:50 ;
hence contradiction by A2, A18, A20, Def4; :: thesis: verum
end;
end;
then for i, j being set st i in dom f & j in dom f & f . i = f . j holds
i = j ;
then f is one-to-one by FUNCT_1:def 8;
then f is_a_system_of_different_representatives_of A by A14, A15, Def3;
hence ex X being set st X is_a_system_of_different_representatives_of A ; :: thesis: verum