reserve n,m,k for Nat,
  X,Y,Z for set,
  f for Function of X,Y,
  H for Subset of X;

theorem
  for X being infinite set, P being a_partition of the_subsets_of_card(n,X)
  st card P = k
  ex H being Subset of X st H is infinite & H is_homogeneous_for P
proof
  let X be infinite set;
  let P be a_partition of the_subsets_of_card(n,X);
  assume
A1: card P = k;
  then P,k are_equipotent by CARD_1:def 2;
  then consider F1 be Function such that
A2: F1 is one-to-one and
A3: dom F1 = P and
A4: rng F1 = k by WELLORD2:def 4;
  reconsider F1 as Function of P,k by A3,A4,FUNCT_2:1;
  set F=F1*proj P;
  reconsider F as Function of the_subsets_of_card(n,X),k;
  consider H be Subset of X such that
A5: H is infinite and
A6: F|the_subsets_of_card(n,H) is constant by A1,Th14;
  take H;
  thus H is infinite by A5;
  set h = the Element of the_subsets_of_card(n,H);
a7:  the_subsets_of_card(n,H) is non empty by A5;
A8: the_subsets_of_card(n,H) c= the_subsets_of_card(n,X) by Lm1;
  then reconsider h as Element of the_subsets_of_card(n,X) by a7;
  set E = EqClass(h,P);
  reconsider E as Element of P by EQREL_1:def 6;
  for x being object holds x in the_subsets_of_card(n,H) implies x in E
  proof
    let x be object;
    assume
A9: x in the_subsets_of_card(n,H);
    then reconsider x9=x as Element of the_subsets_of_card(n,X) by A8;
A10: dom F = the_subsets_of_card(n,X) by A1,FUNCT_2:def 1;
    then h in dom F /\ the_subsets_of_card(n,H) by A5,XBOOLE_0:def 4;
    then
A11: h in dom(F|the_subsets_of_card(n,H)) by RELAT_1:61;
    x9 in dom F /\ the_subsets_of_card(n,H) by A9,A10,XBOOLE_0:def 4;
    then
A12: x9 in dom(F|the_subsets_of_card(n,H)) by RELAT_1:61;
    F.x9 = F|the_subsets_of_card(n,H).x9 by A9,FUNCT_1:49
      .= F|the_subsets_of_card(n,H).h by A6,A12,A11,FUNCT_1:def 10
      .= F.h by A5,FUNCT_1:49;
    then F1.((proj P).x9) = (F1*proj P).h by A10,FUNCT_1:12
      .= F1.((proj P).h) by A10,FUNCT_1:12;
    then h in E & (proj P).h = (proj P).x9 by A2,A3,EQREL_1:def 6,FUNCT_1:def 4
;
    hence thesis by Th13;
  end;
  then the_subsets_of_card(n,H) c= E;
  hence thesis;
end;
