let A be Subset of B; :: thesis: A is finite
per cases ( A is empty or not A is empty ) ;
suppose A is empty ; :: thesis: A is finite
end;
suppose not A is empty ; :: thesis: A is finite
then consider x1 being set such that
A1: x1 in A by XBOOLE_0:def 1;
consider p being Function such that
A2: rng p = B and
A3: dom p in omega by Def1;
deffunc H1( set ) -> set = p . B;
deffunc H2( set ) -> set = x1;
defpred S1[ set ] means p . B in A;
consider q being Function such that
A4: dom q = dom p and
A5: for x being set st x in dom p holds
( ( S1[x] implies q . x = H1(x) ) & ( not S1[x] implies q . x = H2(x) ) ) from PARTFUN1:sch 1();
now
let y be set ; :: thesis: ( ( y in A implies ex x being set st
( x in dom q & y = q . x ) ) & ( ex x being set st
( x in dom q & y = q . x ) implies b1 in A ) )

thus ( y in A implies ex x being set st
( x in dom q & y = q . x ) ) :: thesis: ( ex x being set st
( x in dom q & y = q . x ) implies b1 in A )
proof
assume A6: y in A ; :: thesis: ex x being set st
( x in dom q & y = q . x )

then consider x being set such that
A7: x in dom p and
A8: p . x = y by A2, FUNCT_1:def 5;
take x ; :: thesis: ( x in dom q & y = q . x )
thus x in dom q by A4, A7; :: thesis: y = q . x
thus y = q . x by A5, A6, A7, A8; :: thesis: verum
end;
given x being set such that A9: x in dom q and
A10: y = q . x ; :: thesis: b1 in A
per cases ( p . x in A or not p . x in A ) ;
suppose p . x in A ; :: thesis: b1 in A
hence y in A by A4, A5, A9, A10; :: thesis: verum
end;
suppose not p . x in A ; :: thesis: b1 in A
hence y in A by A1, A4, A5, A9, A10; :: thesis: verum
end;
end;
end;
then rng q = A by FUNCT_1:def 5;
hence A is finite by A3, A4, Def1; :: thesis: verum
end;
end;