reserve X,Y,x,y for set;
reserve A for non empty Poset;
reserve a,a1,a2,a3,b,c for Element of A;
reserve S,T for Subset of A;
reserve f for Choice_Function of BOOL(the carrier of A);
reserve fC,fC1,fC2 for Chain of f;
reserve R for Relation,
  A for non empty Poset,
  C for Chain of A,
  S for Subset of A,
  a,a1,a2,b,c1,c2 for Element of A;

theorem Th55:
  (for C ex a st for b st b in C holds b <= a) implies ex a st
  for b holds not a < b
proof
  set f = the Choice_Function of BOOL(the carrier of A);
  reconsider F = union(Chains(f)) as Chain of f by Th45;
  assume for C ex a st for b st b in C holds b <= a;
  then consider a such that
A1: for b st b in F holds b <= a;
  take a;
  let b;
  assume
A2: a < b;
  now
    let a1;
    assume a1 in F;
    then a1 <= a by A1;
    hence a1 < b by A2,Th7;
  end;
  then b in {a1 : for a2 st a2 in F holds a2 < a1};
  then not UpperCone(F) in {{}} by TARSKI:def 1;
  then
A3: UpperCone(F) in BOOL(the carrier of A) by XBOOLE_0:def 5;
  not {} in BOOL(the carrier of A) by ORDERS_1:1;
  then
A4: f.UpperCone(F) in UpperCone(F) by A3,ORDERS_1:89;
  then reconsider c = f.UpperCone(F) as Element of A;
  reconsider Z = F \/ {c} as Subset of A;
A5: ex c11 being Element of A st c11 = c & for a2 st a2 in F holds a2 < c11
  by A4;
A6: the InternalRel of A is_connected_in Z
  proof
    let x,y be object;
    assume
A7: x in Z & y in Z;
    then reconsider x1 = x, y1 = y as Element of A;
    now
      per cases by A7,XBOOLE_0:def 3;
      suppose
        x1 in F & y1 in F;
        then x1 <= y1 or y1 <= x1 by Th11;
        hence thesis;
      end;
      suppose
A8:     x1 in F & y1 in {c};
        then y1 = c by TARSKI:def 1;
        then x1 < y1 by A5,A8;
        then x1 <= y1;
        hence thesis;
      end;
      suppose
A9:     x1 in {c} & y1 in F;
        then x1 = c by TARSKI:def 1;
        then y1 < x1 by A5,A9;
        then y1 <= x1;
        hence thesis;
      end;
      suppose
A10:    x1 in {c} & y1 in {c};
        then x1 = c by TARSKI:def 1;
        hence thesis by A10,TARSKI:def 1;
      end;
    end;
    hence thesis;
  end;
A11: now
    let a1;
    assume
A12: a1 in Z;
    now
      per cases;
      suppose
A13:    a1 = c;
        InitSegm(Z,c) = F
        proof
          thus InitSegm(Z,c) c= F
          proof
            let x be object;
            assume that
A14:        x in InitSegm(Z,c) and
A15:        not x in F;
            x in Z by A14,XBOOLE_0:def 4;
            then x in {c} by A15,XBOOLE_0:def 3;
            then
A16:        x = c by TARSKI:def 1;
            x in LowerCone{c} by A14,XBOOLE_0:def 4;
            hence contradiction by A16,Th21;
          end;
          let x be object;
          assume
A17:      x in F;
          then reconsider y = x as Element of A;
          y < c by A5,A17;
          then
A18:      x in LowerCone{c} by Th23;
          x in Z by A17,XBOOLE_0:def 3;
          hence thesis by A18,XBOOLE_0:def 4;
        end;
        hence f.UpperCone(InitSegm(Z,a1)) = a1 by A13;
      end;
      suppose
        a1 <> c;
        then not a1 in {c} by TARSKI:def 1;
        then
A19:    a1 in F by A12,XBOOLE_0:def 3;
A20:    InitSegm(Z,a1) c= InitSegm(F,a1)
        proof
          let x be object;
          assume
A21:      x in InitSegm(Z,a1);
          then
A22:      x in LowerCone{a1} by XBOOLE_0:def 4;
          now
            assume
A23:        not x in F;
            x in Z by A21,XBOOLE_0:def 4;
            then x in {c} by A23,XBOOLE_0:def 3;
            then x = c by TARSKI:def 1;
            then
A24:        ex c1 st c1 = c & for c2 st c2 in {a1} holds c1 < c2 by A22;
A25:        a1 < c by A5,A19;
            a1 in {a1} by TARSKI:def 1;
            then c < a1 by A24;
            hence contradiction by A25,Th4;
          end;
          hence thesis by A22,XBOOLE_0:def 4;
        end;
        InitSegm(F,a1) c= InitSegm(Z,a1) by Th28,XBOOLE_1:7;
        then InitSegm(Z,a1) = InitSegm(F,a1) by A20;
        hence f.UpperCone(InitSegm(Z,a1)) = a1 by A19,Def12;
      end;
    end;
    hence f.UpperCone(InitSegm(Z,a1)) = a1;
  end;
  the InternalRel of A is_reflexive_in the carrier of A by Def2;
  then
A26: the InternalRel of A is_reflexive_in Z;
  then the InternalRel of A is_strongly_connected_in Z by A6,ORDERS_1:7;
  then
A27: Z is Chain of A by Def7;
A28: the InternalRel of A is_well_founded_in Z
  proof
    let Y;
    assume that
A29: Y c= Z and
A30: Y <> {};
    now
      per cases;
      case
A31:    Y = {c};
        take x = c;
        thus x in Y by A31,TARSKI:def 1;
        assume (the InternalRel of A)-Seg(x) meets Y;
        then consider x9 being object such that
A32:    x9 in (the InternalRel of A)-Seg(x) and
A33:    x9 in Y by XBOOLE_0:3;
        x9 = c by A31,A33,TARSKI:def 1;
        hence contradiction by A32,WELLORD1:1;
      end;
      case
A34:    Y <> {c};
        set X = Y \ {c};
A35:    now
          assume X = {};
          then Y c= {c} by XBOOLE_1:37;
          hence contradiction by A30,A34,ZFMISC_1:33;
        end;
A36:    X c= F
        proof
          let x be object;
          assume that
A37:      x in X and
A38:      not x in F;
          x in Y by A37;
          then x in {c} by A29,A38,XBOOLE_0:def 3;
          hence thesis by A37,XBOOLE_0:def 5;
        end;
        the InternalRel of A well_orders F by Def12;
        then the InternalRel of A well_orders X by A36,Lm4;
        then the InternalRel of A is_well_founded_in X;
        then consider x being object such that
A39:    x in X and
A40:    (the InternalRel of A)-Seg(x) misses X by A35;
        take x9 = x;
        thus x9 in Y by A39;
A41:    (the InternalRel of A)-Seg(x) /\ X = {} by A40;
        now
          per cases;
          suppose
A42:        c in Y;
A43:        now
              x9 in F by A36,A39;
              then reconsider x99 = x9 as Element of A;
              assume
A44:          c in (the InternalRel of A)-Seg(x9);
              then [c,x9] in the InternalRel of A by WELLORD1:1;
              then
A45:          c <= x99;
A46:          x99 < c by A5,A36,A39;
              c <> x99 by A44,WELLORD1:1;
              then c < x99 by A45;
              hence contradiction by A46,Th4;
            end;
A47:        now
              set x = the Element of (the InternalRel of A)-Seg(x9) /\ {c };
              assume
A48:          (the InternalRel of A)-Seg(x9) /\ {c} <> {};
              then x in {c} by XBOOLE_0:def 4;
              then x = c by TARSKI:def 1;
              hence contradiction by A43,A48,XBOOLE_0:def 4;
            end;
            {c} c= Y by A42,ZFMISC_1:31;
            then Y = X \/ {c} by XBOOLE_1:45;
            then (the InternalRel of A)-Seg(x9) /\ Y = {} \/ {} by A41,A47,
XBOOLE_1:23
              .= {};
            hence (the InternalRel of A)-Seg(x9) misses Y;
          end;
          suppose
            not c in Y;
            then Y misses {c} by ZFMISC_1:50;
            hence (the InternalRel of A)-Seg(x9) misses Y by A40,XBOOLE_1:83;
          end;
        end;
        hence (the InternalRel of A)-Seg(x9) misses Y;
      end;
    end;
    hence thesis;
  end;
  the InternalRel of A is_transitive_in the carrier of A by Def3;
  then
A49: the InternalRel of A is_transitive_in Z;
  the InternalRel of A is_antisymmetric_in the carrier of A by Def4;
  then the InternalRel of A is_antisymmetric_in Z;
  then the InternalRel of A well_orders Z by A26,A49,A6,A28;
  then reconsider Z as Chain of f by A27,A11,Def12;
  c in {c} by TARSKI:def 1;
  then
A50: c in Z by XBOOLE_0:def 3;
  Z in Chains(f) by Def13;
  then c in F by A50,TARSKI:def 4;
  hence thesis by A5;
end;
