let R be with_finite_stability# RelStr ; :: thesis: for A being StableSet of R
for C being Clique-partition of R st card C = card A holds
ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) )

let A be StableSet of R; :: thesis: for C being Clique-partition of R st card C = card A holds
ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) )

let C be Clique-partition of R; :: thesis: ( card C = card A implies ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) ) )

assume A: card C = card A ; :: thesis: ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) )

set cR = the carrier of R;
per cases ( R is empty or not R is empty ) ;
suppose S1: R is empty ; :: thesis: ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) )

then the carrier of R is empty ;
then A1: C = {} by EQREL_1:41;
consider f being Function of A,C;
dom f = {} by S1;
then reconsider f = {} as Function of A,C by RELAT_1:64;
G1: f is onto by RELAT_1:60, A1, FUNCT_2:def 3;
take f ; :: thesis: ( f is bijective & ( for x being set st x in A holds
x in f . x ) )

thus f is bijective by G1; :: thesis: for x being set st x in A holds
x in f . x

thus for x being set st x in A holds
x in f . x ; :: thesis: verum
end;
suppose S1: not R is empty ; :: thesis: ex f being Function of A,C st
( f is bijective & ( for x being set st x in A holds
x in f . x ) )

defpred S1[ set , set ] means ( $1 in A & $2 in C & $1 in $2 );
P: for x being set st x in A holds
ex y being set st
( y in C & S1[x,y] )
proof
let x be set ; :: thesis: ( x in A implies ex y being set st
( y in C & S1[x,y] ) )

assume A1: x in A ; :: thesis: ex y being set st
( y in C & S1[x,y] )

then reconsider x9 = x as Element of R ;
not the carrier of R is empty by S1;
then x9 in the carrier of R ;
then x9 in union C by EQREL_1:def 6;
then consider y being set such that
B1: x in y and
C1: y in C by TARSKI:def 4;
take y ; :: thesis: ( y in C & S1[x,y] )
thus ( y in C & S1[x,y] ) by A1, B1, C1; :: thesis: verum
end;
consider f being Function of A,C such that
Q: for x being set st x in A holds
S1[x,f . x] from FUNCT_2:sch 1(P);
take f ; :: thesis: ( f is bijective & ( for x being set st x in A holds
x in f . x ) )

R: f is one-to-one
proof
let x1, x2 be set ; :: according to FUNCT_1:def 8 :: thesis: ( not x1 in proj1 f or not x2 in proj1 f or not f . x1 = f . x2 or x1 = x2 )
assume that
A1: x1 in dom f and
B1: x2 in dom f and
C1: f . x1 = f . x2 ; :: thesis: x1 = x2
F1: x1 in f . x1 by A1, Q;
G1: x2 in f . x2 by B1, Q;
f . x1 in C by S1, A1, FUNCT_2:7;
then f . x1 is Clique of R by LCpart;
hence x1 = x2 by A1, B1, F1, G1, C1, ACClique; :: thesis: verum
end;
C is finite by A;
then rng f = C by A, R, FINSEQ_4:78;
then f is onto by FUNCT_2:def 3;
hence f is bijective by R; :: thesis: for x being set st x in A holds
x in f . x

let x be set ; :: thesis: ( x in A implies x in f . x )
assume x in A ; :: thesis: x in f . x
hence x in f . x by Q; :: thesis: verum
end;
end;