per cases ( F2() = {} or F1() = {} or ( F1() <> {} & F2() <> {} ) ) ;
suppose A2: F2() = {} ; :: thesis: ex f being Function of F1(),F2() st
for x being set st x in F1() holds
P1[x,f . x]

consider f being Function of F1(),F2();
take f ; :: thesis: for x being set st x in F1() holds
P1[x,f . x]

now
let x be set ; :: thesis: not x in F1()
assume x in F1() ; :: thesis: contradiction
then ex y being set st
( y in F2() & P1[x,y] ) by A1;
hence contradiction by A2; :: thesis: verum
end;
hence for x being set st x in F1() holds
P1[x,f . x] ; :: thesis: verum
end;
suppose A3: F1() = {} ; :: thesis: ex f being Function of F1(),F2() st
for x being set st x in F1() holds
P1[x,f . x]

consider f being Function of F1(),F2();
take f ; :: thesis: for x being set st x in F1() holds
P1[x,f . x]

thus for x being set st x in F1() holds
P1[x,f . x] by A3; :: thesis: verum
end;
suppose ( F1() <> {} & F2() <> {} ) ; :: thesis: ex f being Function of F1(),F2() st
for x being set st x in F1() holds
P1[x,f . x]

then reconsider X = F1(), Y = F2() as non empty set ;
set M = { { ff where ff is Element of Y : P1[tt,ff] } where tt is Element of X : verum } ;
consider x0 being Element of X;
{ ff where ff is Element of Y : P1[x0,ff] } in { { ff where ff is Element of Y : P1[tt,ff] } where tt is Element of X : verum } ;
then reconsider M = { { ff where ff is Element of Y : P1[tt,ff] } where tt is Element of X : verum } as non empty set ;
now
let x be set ; :: thesis: ( x in M implies x <> {} )
assume x in M ; :: thesis: x <> {}
then consider t being Element of X such that
A4: x = { ff where ff is Element of Y : P1[t,ff] } ;
consider ff being set such that
A5: ( ff in Y & P1[t,ff] ) by A1;
ff in x by A4, A5;
hence x <> {} ; :: thesis: verum
end;
then consider C being Function such that
dom C = M and
A6: for x being set st x in M holds
C . x in x by WELLORD2:28;
deffunc H1( set ) -> set = C . { ff where ff is Element of Y : P1[$1,ff] } ;
consider f being Function such that
A7: dom f = X and
A8: for x being set st x in X holds
f . x = H1(x) from FUNCT_1:sch 3();
rng f c= Y
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng f or x in Y )
assume x in rng f ; :: thesis: x in Y
then consider y being set such that
A9: ( y in X & x = f . y ) by A7, FUNCT_1:def 5;
set y0 = { ff where ff is Element of Y : P1[y,ff] } ;
( x = C . { ff where ff is Element of Y : P1[y,ff] } & { ff where ff is Element of Y : P1[y,ff] } in M ) by A8, A9;
then x in { ff where ff is Element of Y : P1[y,ff] } by A6;
then ex ff being Element of Y st
( x = ff & P1[y,ff] ) ;
hence x in Y ; :: thesis: verum
end;
then reconsider f = f as Function of F1(),F2() by A7, Def1, RELSET_1:11;
take f ; :: thesis: for x being set st x in F1() holds
P1[x,f . x]

let x be set ; :: thesis: ( x in F1() implies P1[x,f . x] )
set x0 = { ff where ff is Element of Y : P1[x,ff] } ;
assume A10: x in F1() ; :: thesis: P1[x,f . x]
then A11: { ff where ff is Element of Y : P1[x,ff] } in M ;
f . x = C . { ff where ff is Element of Y : P1[x,ff] } by A8, A10;
then f . x in { ff where ff is Element of Y : P1[x,ff] } by A6, A11;
then ex ff being Element of Y st
( ff = f . x & P1[x,ff] ) ;
hence P1[x,f . x] ; :: thesis: verum
end;
end;