
theorem Th47: :: ACpart1:
for R being with_finite_stability# RelStr, A being StableSet of R,
    C being Clique-partition of R st card C = card A
  ex f being Function of A, C st f is bijective &
   for x being set st x in A holds x in f.x
proof
  let R be with_finite_stability# RelStr, A be StableSet of R,
      C be Clique-partition of R; assume that
A1: card C = card A;
  set cR = the carrier of R;
  per cases;
  suppose A2: R is empty;
  then  the carrier of R is empty;
  then A3: C = {};
      set f = the Function of A, C;
      dom f = {} by A2;
      then reconsider f = {} as Function of A, C by RELAT_1:41;
  A4: f is onto by A3,FUNCT_2:def 3,RELAT_1:38;
      take f;
      thus f is bijective by A4;
      thus thesis;
  end;
  suppose A5: R is non empty;
  defpred P[object,object] means
    ex D2 being set st D2 = $2 & $1 in A & $2 in C & $1 in D2;
A6: for x being object st x in A ex y being object st y in C & P[x,y] proof
     let x be object;
     assume A7: x in A;
       then reconsider x9 = x as Element of R;
       cR is non empty by A5;
       then x9 in cR;
       then x9 in union C by EQREL_1:def 4;
       then consider y being set such that
   A8: x in y and
   A9: y in C by TARSKI:def 4;
       take y;
       thus thesis by A7,A8,A9;
   end;
   consider f being Function of A, C such that
A10: for x being object st x in A holds P[x,f.x] from FUNCT_2:sch 1(A6);
   take f;
A11: f is one-to-one proof
     let x1,x2 be object such that
   A12: x1 in dom f and
   A13: x2 in dom f and
   A14: f.x1 = f.x2;
     P[x1,f.x1] by A12,A10;
    then
   A15: x1 in f.x1;
     P[x2,f.x2] by A13,A10;
    then
   A16: x2 in f.x2;
    f.x1 in C by A5,A12,FUNCT_2:5;
    then f.x1 is Clique of R by Def11;
     hence x1 = x2 by A12,A13,A15,A16,A14,Th15;
   end;
   C is finite by A1; then
   f is onto by A1,A11,FINSEQ_4:63;
   hence f is bijective by A11;
   let x be set;
   assume x in A;
   then P[x,f.x] by A10;
   hence x in f.x;
  end;
end;
