reserve A,B,C for Ordinal,
  K,L,M,N for Cardinal,
  x,y,y1,y2,z,u for object,X,Y,Z,Z1,Z2 for set,
  n for Nat,
  f,f1,g,h for Function,
  Q,R for Relation;
reserve ff for Cardinal-Function;

theorem Th20:
  card pi(X,x) c= card X
proof
  consider Y such that
A1: for y being object holds y in Y iff y in X & P[y] from XBOOLE_0:sch 1;
  defpred R[object,object] means ex g st $1 = g & $2 = g.x;
A2: for y being object st y in Y ex z being object st R[y,z]
  proof
    let y be object;
    assume y in Y;
    then reconsider y as Function by A1;
    take y.x, y;
    thus thesis;
  end;
  consider f such that
A3: dom f = Y &
   for y being object st y in Y holds R[y,f.y] from CLASSES1:sch 1(A2);
  now
    let y be object;
    thus y in rng f implies ex f st f in X & y = f.x
    proof
      assume y in rng f;
      then consider z being object such that
A4:   z in dom f and
A5:   y = f.z by FUNCT_1:def 3;
      consider g such that
A6:   z = g and
A7:   f.z = g.x by A3,A4;
      take g;
      thus thesis by A1,A3,A4,A5,A6,A7;
    end;
    given g such that
A8: g in X and
A9: y = g.x;
A10: g in Y by A1,A8;
    then ex f1 st g = f1 & f.g = f1.x by A3;
    hence y in rng f by A3,A9,A10,FUNCT_1:def 3;
  end;
  then rng f = pi(X,x) by Def6;
  then
A11: card pi(X,x) c= card Y by A3,CARD_1:12;
  Y c= X
  by A1;
  then card Y c= card X by CARD_1:11;
  hence thesis by A11;
end;
