reserve X,Y,Z for set,
  a,b,c,d,x,y,z,u for object,
  R for Relation,
  A,B,C for Ordinal;
reserve H for Function;
reserve f,g for Function;

theorem Th11:
  for X ex R st R well_orders X
proof
  deffunc F(object) = {$1};
  defpred P[object] means $1 is Ordinal;
  let X;
  consider Class being set such that
A1: X in Class and
A2: Y in Class & Z c= Y implies Z in Class and
  Y in Class implies bool Y in Class and
A3: Y c= Class implies Y,Class are_equipotent or Y in Class by ZFMISC_1:112;
  consider ON being set such that
A4: for x being object holds x in ON iff x in Class & P[x]
from XBOOLE_0:sch 1;
  for Y st Y in ON holds Y is Ordinal & Y c= ON
  proof
    let Y;
    assume
A5: Y in ON;
    hence Y is Ordinal by A4;
    reconsider A = Y as Ordinal by A4,A5;
    let x be object;
    assume
A6: x in Y;
    then x in A;
    then reconsider B = x as Ordinal;
A7: B c= A by A6,ORDINAL1:def 2;
    A in Class by A4,A5;
    then B in Class by A2,A7;
    hence thesis by A4;
  end;
  then reconsider ON as epsilon-transitive epsilon-connected set
by ORDINAL1:19;
A8: ON c= Class
  by A4;
A9: ON,Class are_equipotent
  proof
    assume not thesis;
    then ON in Class by A3,A8;
    then ON in ON by A4;
    hence contradiction;
  end;
  field RelIncl ON = ON by Def1;
  then consider R such that
A10: R well_orders Class by A9,Lm1;
  consider f such that
A11: dom f = X & for x being object st x in X holds f.x = F(x)
   from FUNCT_1:sch 3;
A12: rng f c= Class
  proof
    let x be object;
    assume x in rng f;
    then consider y being object such that
A13: y in dom f and
A14: x = f.y by FUNCT_1:def 3;
A15: { y } c= X
    by A11,A13,TARSKI:def 1;
    f.y = { y } by A11,A13;
    hence thesis by A1,A2,A14,A15;
  end;
A16: X,rng f are_equipotent
  proof
    take f;
    thus f is one-to-one
    proof
      let x,y be object;
      assume that
A17:  x in dom f & y in dom f and
A18:  f.x = f.y;
      f.x = { x } & f.y = { y } by A11,A17;
      hence thesis by A18,ZFMISC_1:3;
    end;
    thus thesis by A11;
  end;
  set Q = R|_2 Class;
  field Q = Class by A10,Th10;
  then
A19: field(Q|_2 rng f) = rng f by A10,A12,Th10,WELLORD1:31;
  Q is well-ordering by A10,Th10;
  hence thesis by A16,A19,Lm1,WELLORD1:25;
end;
