reserve x, y for set;

theorem Th10:
  for P being upper-bounded non empty Poset st the InternalRel
of P is well-ordering for x,y being Element of P st y < x ex z being Element of
  P st z is compact & y <= z & z <= x
proof
  let P be upper-bounded non empty Poset;
  set R = the InternalRel of P, A = order_type_of R;
A1: field RelIncl A = A by WELLORD2:def 1;
  assume
A2: R is well-ordering;
  then reconsider L = P as complete Chain by Th9;
  let x,y be Element of P;
  R, RelIncl A are_isomorphic by A2,WELLORD2:def 2;
  then consider f being Function such that
A3: f is_isomorphism_of R, RelIncl A;
  assume
A4: y < x;
  then y <= x;
  then
A5: [y,x] in R;
  then
A6: [f.y, f.x] in RelIncl A by A3;
  then
A7: f.x in A by A1,RELAT_1:15;
A8: f.x <> f.y by A3,A4,A5,WELLORD1:36;
A9: f.y in A by A6,A1,RELAT_1:15;
  then reconsider a = f.x, b = f.y as Ordinal by A7;
  b c= a by A6,A7,A9,WELLORD2:def 1;
  then b c< a by A8;
  then b in a by ORDINAL1:11;
  then
A10: succ b c= a by ORDINAL1:21;
  then
A11: succ b in A by A7,ORDINAL1:12;
  then
A12: [succ b, f.x] in RelIncl A by A7,A10,WELLORD2:def 1;
A13: b c= succ b by ORDINAL3:1;
  rng f = A by A3,A1;
  then consider z being object such that
A14: z in dom f and
A15: succ b = f.z by A11,FUNCT_1:def 3;
A16: field R = the carrier of P by ORDERS_1:15;
  then reconsider z as Element of P by A3,A14;
  take z;
A17: dom f = field R by A3;
  thus z is compact
  proof
    let D be non empty directed Subset of P such that
A18: z <= sup D and
A19: for d being Element of P st d in D holds not z <= d;
A20: L is complete;
    D is_<=_than y
    proof
      let c be Element of P;
A21:  f is one-to-one by A3;
      assume
A22:  c in D;
      then not z <= c by A19;
      then z >= c by A20,WAYBEL_0:def 29;
      then [c,z] in R;
      then
A23:  [f.c, succ b] in RelIncl A by A3,A15;
      then
A24:  f.c in A by A1,RELAT_1:15;
      then reconsider fc = f.c as Ordinal;
A25:  fc c= succ b by A11,A23,A24,WELLORD2:def 1;
      c <> z by A19,A22;
      then fc <> succ b by A15,A16,A17,A21,FUNCT_1:def 4;
      then fc c< succ b by A25;
      then fc in succ b by ORDINAL1:11;
      then fc c= b by ORDINAL1:22;
      then [fc,b] in RelIncl A by A9,A24,WELLORD2:def 1;
      hence [c,y] in R by A3,A16;
    end;
    then sup D <= y by A20,YELLOW_0:32;
    then z <= y by A18,YELLOW_0:def 2;
    then [z,y] in R;
    then [succ b, b] in RelIncl A by A3,A15;
    then succ b c= b by A9,A11,WELLORD2:def 1;
    then b = succ b by A13;
    hence contradiction by ORDINAL1:9;
  end;
  [f.y, succ b] in RelIncl A by A9,A13,A11,WELLORD2:def 1;
  hence [y,z] in R & [z,x] in R by A3,A15,A16,A12;
end;
