defpred S1[ set , set ] means for f being Function of F1(),F2()
for h being Function of F3(),F4() st f = $1 & h = $2 holds
h | F1() = f;
set F2 = { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
;
set F1 = { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } ;
A5: for f9 being set st f9 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } holds
ex g9 being set st
( g9 in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
& S1[f9,g9] )
proof
let f9 be set ; :: thesis: ( f9 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } implies ex g9 being set st
( g9 in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
& S1[f9,g9] ) )

assume f9 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } ; :: thesis: ex g9 being set st
( g9 in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
& S1[f9,g9] )

then consider f being Function of F1(),F2() such that
A6: f = f9 and
A7: P1[f,F1(),F2()] ;
consider h being
Function of F3(),F4() such that
A8: ( h | F1() = f & ( for x being set st x in F3() \ F1() holds
h . x = F5(x) ) ) from STIRL2_1:sch 2(A1, A2, A3);
A9: S1[f9,h] by A6, A8;
A10: rng f c= F2() ;
P1[h,F3(),F4()] by A4, A7, A8;
then h in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A8, A10;
hence ex g9 being set st
( g9 in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
& S1[f9,g9] ) by A9; :: thesis: verum
end;
consider ff being Function of { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } , { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
such that
A11: for x being set st x in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } holds
S1[x,ff . x] from FUNCT_2:sch 1(A5);
A12: ( F4() is empty implies F3() is empty )
proof end;
now
per cases ( F4() is empty or not F4() is empty ) ;
suppose A14: F4() is empty ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

set Empty = {} ;
A15: { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) } c= {{}}
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
or x in {{}} )

assume x in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: x in {{}}
then ex f being Function of F3(),F4() st
( f = x & P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) ;
then x = {} by A14;
hence x in {{}} by TARSKI:def 1; :: thesis: verum
end;
A16: { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } c= {{}}
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } or x in {{}} )
assume x in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } ; :: thesis: x in {{}}
then ex f being Function of F1(),F2() st
( f = x & P1[f,F1(),F2()] ) ;
then x = {} by A2, A14;
hence x in {{}} by TARSKI:def 1; :: thesis: verum
end;
now
per cases ( P1[ {} , {} , {} ] or not P1[ {} , {} , {} ] ) ;
suppose A17: P1[ {} , {} , {} ] ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

A18: rng {} = {} ;
A19: F2() is empty by A2, A14;
dom {} = {} ;
then {} is Function of F1(),F2() by A3, A19, A18, FUNCT_2:1;
then {} in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } by A3, A17, A19;
then A20: { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = {{}} by A16, ZFMISC_1:33;
A21: rng {} = {} ;
dom {} = {} ;
then reconsider Empty = {} as Function of F3(),F4() by A12, A14, A21, FUNCT_2:1;
A22: for x being set st x in F3() \ F1() holds
Empty . x = F5(x) by A12;
rng (Empty | F1()) c= F2() by A2, A14;
then {} in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A12, A14, A17, A22;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A15, A20, ZFMISC_1:33; :: thesis: verum
end;
suppose A23: P1[ {} , {} , {} ] ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

A24: not {} in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] }
proof
assume {} in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } ; :: thesis: contradiction
then ex f being Function of F1(),F2() st
( f = {} & P1[f,F1(),F2()] ) ;
hence contradiction by A2, A3, A14, A23; :: thesis: verum
end;
A25: ( { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) } = {} or { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
= {{}} ) by A15, ZFMISC_1:33;
A26: not {} in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
proof
assume {} in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: contradiction
then ex f being Function of F3(),F4() st
( f = {} & P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) ;
hence contradiction by A12, A14, A23; :: thesis: verum
end;
( { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = {} or { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = {{}} ) by A16, ZFMISC_1:33;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A24, A26, A25, TARSKI:def 1; :: thesis: verum
end;
end;
end;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: verum
end;
suppose A27: not F4() is empty ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

now
per cases ( { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
} is empty or not { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
is empty ) ;
suppose A28: { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) } is empty ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

{ f where f is Function of F1(),F2() : P1[f,F1(),F2()] } is empty
proof
assume not { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } is empty ; :: thesis: contradiction
then consider x being set such that
A29: x in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } by XBOOLE_0:def 1;
consider f being Function of F1(),F2() such that
f = x and
A30: P1[f,F1(),F2()] by A29;
A31: rng f c= F2() ;
consider h being Function of F3(),F4() such that
A32: ( h | F1() = f & ( for x being set st x in F3() \ F1() holds
h . x = F5(x) ) ) from STIRL2_1:sch 2(A1, A2, A3);
P1[h,F3(),F4()] by A4, A30, A32;
then h in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A32, A31;
hence contradiction by A28; :: thesis: verum
end;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by A28; :: thesis: verum
end;
suppose A33: not { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) } is empty ; :: thesis: card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}

{ f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) ) } c= rng ff
proof
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
or y in rng ff )

assume y in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: y in rng ff
then consider f being Function of F3(),F4() such that
A34: f = y and
A35: P1[f,F3(),F4()] and
A36: rng (f | F1()) c= F2() and
A37: for x being set st x in F3() \ F1() holds
f . x = F5(x) ;
A38: dom (f | F1()) = (dom f) /\ F1() by RELAT_1:61;
dom f = F3() by A27, FUNCT_2:def 1;
then A39: dom (f | F1()) = F1() by A2, A38, XBOOLE_1:28;
then reconsider h = f | F1() as Function of F1(),(rng (f | F1())) by FUNCT_2:1;
( rng (f | F1()) is empty implies F1() is empty ) by A39, RELAT_1:42;
then reconsider h = h as Function of F1(),F2() by A36, FUNCT_2:6;
P1[f | F1(),F1(),F2()] by A4, A35, A37;
then A40: h in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } ;
A41: dom ff = { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } by A33, FUNCT_2:def 1;
then ff . h in rng ff by A40, FUNCT_1:def 3;
then ff . h in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
;
then consider ffh being Function of F3(),F4() such that
A42: ffh = ff . h and
P1[ffh,F3(),F4()] and
rng (ffh | F1()) c= F2() and
A43: for x being set st x in F3() \ F1() holds
ffh . x = F5(x) ;
now
let x be set ; :: thesis: ( x in F3() implies ffh . x = f . x )
assume A44: x in F3() ; :: thesis: ffh . x = f . x
now
per cases ( x in F1() or not x in F1() ) ;
suppose x in F1() ; :: thesis: ffh . x = f . x
then A45: x in dom h by A3, FUNCT_2:def 1;
ffh | F1() = h by A11, A40, A42;
then h . x = ffh . x by A45, FUNCT_1:47;
hence ffh . x = f . x by A45, FUNCT_1:47; :: thesis: verum
end;
suppose not x in F1() ; :: thesis: ffh . x = f . x
then A46: x in F3() \ F1() by A44, XBOOLE_0:def 5;
then ffh . x = F5(x) by A43;
hence ffh . x = f . x by A37, A46; :: thesis: verum
end;
end;
end;
hence ffh . x = f . x ; :: thesis: verum
end;
then ffh = f by FUNCT_2:12;
hence y in rng ff by A34, A40, A41, A42, FUNCT_1:def 3; :: thesis: verum
end;
then A47: rng ff = { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by XBOOLE_0:def 10;
for x1, x2 being set st x1 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } & x2 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } & ff . x1 = ff . x2 holds
x1 = x2
proof
let x1, x2 be set ; :: thesis: ( x1 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } & x2 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } & ff . x1 = ff . x2 implies x1 = x2 )
assume that
A48: x1 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } and
A49: x2 in { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } and
A50: ff . x1 = ff . x2 ; :: thesis: x1 = x2
A51: ex f2 being Function of F1(),F2() st
( x2 = f2 & P1[f2,F1(),F2()] ) by A49;
dom ff = { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } by A33, FUNCT_2:def 1;
then ff . x1 in rng ff by A48, FUNCT_1:def 3;
then ff . x1 in { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
;
then consider F1 being Function of F3(),F4() such that
A52: ff . x1 = F1 and
P1[F1,F3(),F4()] and
rng (F1 | F1()) c= F2() and
for x being set st x in F3() \ F1() holds
F1 . x = F5(x) ;
consider f1 being Function of F1(),F2() such that
A53: x1 = f1 and
P1[f1,F1(),F2()] by A48;
F1 | F1() = f1 by A11, A48, A53, A52;
hence x1 = x2 by A11, A49, A50, A53, A51, A52; :: thesis: verum
end;
then A54: ff is one-to-one by A33, FUNCT_2:19;
dom ff = { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } by A33, FUNCT_2:def 1;
then { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } , { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
are_equipotent by A47, A54, WELLORD2:def 4;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
by CARD_1:5; :: thesis: verum
end;
end;
end;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: verum
end;
end;
end;
hence card { f where f is Function of F1(),F2() : P1[f,F1(),F2()] } = card { f where f is Function of F3(),F4() : ( P1[f,F3(),F4()] & rng (f | F1()) c= F2() & ( for x being set st x in F3() \ F1() holds
f . x = F5(x) ) )
}
; :: thesis: verum