reserve m for Cardinal,
  A,B,C for Ordinal,
  x,y,z,X,Y,Z,W for set,
  f for Function;
reserve f,g for Function,
  L for Sequence,
  F for Cardinal-Function;

theorem Th29:
  W is Tarski & W is epsilon-transitive & X in W implies the_rank_of X in W
proof
  assume that
A1: W is Tarski and
A2: W is epsilon-transitive;
A3: On W = card W by A1,Th9;
  defpred P[Ordinal] means ex X st $1 = the_rank_of X & X in W & not $1 in W;
  assume that
A4: X in W and
A5: not the_rank_of X in W;
A6: ex A st P[A] by A4,A5;
  consider A such that
A7: P[A] and
A8: for B st P[B] holds A c= B from ORDINAL1:sch 1(A6);
  consider X such that
A9: A = the_rank_of X and
A10: X in W and
A11: not A in W by A7;
  defpred P[object] means ex Y st Y in X & $1 = the_rank_of Y;
  consider LL being set such that
A12: for x being object holds x in LL iff x in On W & P[x]
from XBOOLE_0:sch 1;
  consider ff being Cardinal-Function such that
A13: dom ff = LL & for x st x in LL holds ff.x = g(x) from CARD_3:sch 1;
A14: LL c= On W
  by A12;
A15: product ff c= Funcs(LL,W)
  proof
    let x be object;
    assume x in product ff;
    then consider g such that
A16: x = g and
A17: dom g = dom ff and
A18: for x being object st x in dom ff holds g.x in ff.x by CARD_3:def 5;
    rng g c= W
    proof
      let y be object;
      assume y in rng g;
      then consider x being object such that
A19:  x in dom g and
A20:  y = g.x by FUNCT_1:def 3;
      reconsider x as set by TARSKI:1;
A21:  ff.x = card bool x by A13,A17,A19;
      x in W by A14,A13,A17,A19,ORDINAL1:def 9;
      then bool x in W by A1;
      then card bool x in W by A1,Th11;
      then
A22:  card bool x c= W by A1,Th5;
      y in ff.x by A17,A18,A19,A20;
      hence thesis by A21,A22;
    end;
    hence thesis by A13,A16,A17,FUNCT_2:def 2;
  end;
  now
    let Z;
    assume Z in union LL;
    then consider Y such that
A23: Z in Y and
A24: Y in LL by TARSKI:def 4;
    Y in On W by A12,A24;
    then reconsider Y as Ordinal by ORDINAL1:def 9;
A25: Y c= union LL by A24,ZFMISC_1:74;
A26: Z in Y by A23;
    hence Z is Ordinal;
    reconsider A = Z as Ordinal by A26;
    A c= Y by A23,ORDINAL1:def 2;
    hence Z c= union LL by A25;
  end;
  then reconsider ULL = union LL as epsilon-transitive epsilon-connected set
by ORDINAL1:19;
A27: dom Card id LL = dom id LL by CARD_3:def 2;
A28: dom id LL = LL by RELAT_1:45;
  now
    let x be object;
    assume
A29: x in dom Card id LL;
    then
A30: (Card id LL).x = card ((id LL).x) by A27,CARD_3:def 2;
A31: (id LL).x = x by A28,A27,A29,FUNCT_1:18;
    reconsider xx=x as set by TARSKI:1;
    ff.x = card bool xx by A13,A28,A27,A29;
    hence (Card id LL).x in ff.x by A31,A30,CARD_1:14;
  end;
  then
A32: Sum Card id LL in Product ff by A13,A28,A27,CARD_3:41;
  Union id LL = union rng id LL by CARD_3:def 4
    .= ULL by RELAT_1:45;
  then
A33: card ULL in Product ff by A32,CARD_3:39,ORDINAL1:12;
  consider f such that
A34: dom f = X & for x being object st x in X holds f.x = f(x)
from FUNCT_1:sch 3;
  LL c= rng f
  proof
    let x be object;
    assume x in LL;
    then consider Y such that
A35: Y in X and
A36: x = the_rank_of Y by A12;
    f.Y = x by A34,A35,A36;
    hence thesis by A34,A35,FUNCT_1:def 3;
  end;
  then
A37: card LL c= card X by A34,CARD_1:12;
  card X in card W by A1,A10,Th1;
  then card LL <> card W by A37,ORDINAL1:12;
  then
A38: not LL,W are_equipotent by CARD_1:5;
A39: card product ff = Product ff by CARD_3:def 8;
A40: X c= W by A2,A10;
  X c= Rank card W
  proof
    let x be object;
            reconsider xx=x as set by TARSKI:1;
    assume
A41: x in X;
    then not A c= the_rank_of xx by A9,CLASSES1:68,ORDINAL1:5;
    then the_rank_of xx in W by A8,A40,A41;
    then the_rank_of xx in card W by A3,ORDINAL1:def 9;
    then
A42: Rank the_rank_of xx in Rank card W by CLASSES1:36;
    xx c= Rank the_rank_of xx by CLASSES1:def 9;
    hence thesis by A42,CLASSES1:41;
  end;
  then
A43: A c= On W by A9,A3,CLASSES1:65;
  On W c= ULL
  proof
    let x be object;
    assume
A44: x in On W;
    then reconsider B = x as Ordinal by ORDINAL1:def 9;
    now
      assume
A45:  for Y st Y in X holds the_rank_of Y c= B;
      X c= Rank succ B
      proof
        let y be object;
         reconsider yy=y as set by TARSKI:1;
        assume y in X;
        then the_rank_of yy c= B by A45;
        then the_rank_of yy in succ B by ORDINAL1:22;
        hence thesis by CLASSES1:66;
      end;
      then
A46:  A c= succ B by A9,CLASSES1:65;
      B in W by A44,ORDINAL1:def 9;
      then succ B in W by A1,Th5;
      hence contradiction by A1,A11,A46,CLASSES1:def 1;
    end;
    then consider Y such that
A47: Y in X and
A48: not the_rank_of Y c= B;
    the_rank_of Y in A by A9,A47,CLASSES1:68;
    then the_rank_of Y in LL by A43,A12,A47;
    then
A49: the_rank_of Y c= ULL by ZFMISC_1:74;
    B in the_rank_of Y by A48,ORDINAL1:16;
    hence thesis by A49;
  end;
  then
A50: card On W c= card ULL by CARD_1:11;
  On W c= W by ORDINAL2:7;
  then LL c= W by A14;
  then LL in W by A1,A38;
  then Funcs(LL,W) c= W by A1,A2,Th22;
  then product ff c= W by A15;
  then
A51: Product ff c= card W by A39,CARD_1:11;
  On W = card W by A1,Th9;
  hence contradiction by A33,A51,A50,CARD_1:4;
end;
