reserve a,b,c for set;

theorem Th12:
  for X being set holds card SmallestPartition X = card X
proof
  let X be set;
  set A = SmallestPartition X;
  per cases;
  suppose
    X = {};
    hence thesis;
  end;
  suppose
    X <> {};
    then reconsider X as non empty set;

    deffunc F(object) = {$1};
A1: A = the set of all {x} where x is Element of X  by EQREL_1:37;
    then
A2: for a being object st a in X holds F(a) in A;
    consider f being Function of X,A such that
A3: for a being object st a in X holds f.a = F(a) from FUNCT_2:sch 2(A2);
A4: rng f = A
    proof
      thus rng f c= A;
      let a be object;
      assume a in A;
      then consider b being Element of X such that
A5:   a = {b} by A1;
      f.b = a by A3,A5;
      hence thesis by FUNCT_2:4;
    end;
A6: f is one-to-one
    proof
      let a,b be object;
      assume that
A7:   a in dom f and
A8:   b in dom f;
      assume f.a = f.b;
      then {a} = f.b by A3,A7
        .= {b} by A3,A8;
      hence thesis by ZFMISC_1:3;
    end;
    dom f = X by FUNCT_2:def 1;
    then X,A are_equipotent by A4,A6,WELLORD2:def 4;
    hence thesis by CARD_1:5;
  end;
end;
