
theorem Th31: :: Prop (iii) -> (i)
  for R being non empty RelStr st R is quasi_ordered &
  (for N being non empty Subset of R
  holds min-classes N is finite & min-classes N is non empty)
  holds R is Dickson
proof
  let R be non empty RelStr such that
A1: R is quasi_ordered and
A2: for N being non empty Subset of R
  holds min-classes N is finite & min-classes N is non empty;
A3: R is transitive by A1;
A4: R is reflexive by A1;
  set IR = the InternalRel of R, CR = the carrier of R;
  set IR9 = the InternalRel of R\~;
  let N be Subset of CR;
  per cases;
  suppose
A5: N = {} CR;
    take B = {};
    thus B is_Dickson-basis_of N,R by A5;
    thus thesis;
  end;
  suppose not N is empty;
    then reconsider N9=N as non empty Subset of CR;
    reconsider MCN9 = min-classes N9 as finite non empty Subset-Family of CR
    by A2;
    take B = the set of all the Element of x where x is Element of MCN9 ;
    thus B is_Dickson-basis_of N,R
    proof
      now
        let x be object;
        assume x in B;
        then consider y being Element of MCN9 such that
A6:     x = the Element of y;
A7:     ex z being Element of R\~ st ( z is_minimal_wrt N, IR9)&( y
        = Class(EqRel R, z) /\ N) by Def8;
        y is non empty by Th21;
        hence x in N by A6,A7,XBOOLE_0:def 4;
      end;
      hence B c= N;
      let a be Element of R such that
A8:   a in N;
      defpred P[Element of R] means $1 <= a;
      set NN9 = {d where d is Element of N9 : P[d]};
A9:   NN9 is Subset of N9 from DOMAIN_1:sch 7;
      a <= a by A4,ORDERS_2:1;
      then a in NN9 by A8;
      then reconsider NN9 as non empty Subset of CR by A9,XBOOLE_1:1;
      set m = the Element of min-classes NN9;
A10:  min-classes NN9 is non empty by A2;
      then reconsider m9 = m as non empty set by Th21;
      set c = the Element of m9;
      consider y being Element of R\~ such that
      y is_minimal_wrt NN9, IR9 and
A11:  m9 = Class(EqRel R, y) /\ NN9 by A10,Def8;
A12:  c in Class(EqRel R, y) by A11,XBOOLE_0:def 4;
A13:  c in NN9 by A11,XBOOLE_0:def 4;
      reconsider c as Element of R\~ by A12;
      reconsider c9=c as Element of R;
A14:  ex d being Element of N9 st ( c = d)&( d <= a) by A13;
A15:  c is_minimal_wrt NN9, IR9 by A1,A10,Th18;
      now
        assume not c is_minimal_wrt N, IR9;
        then consider w being set such that
A16:    w in N and
A17:    w <> c and
A18:    [w,c] in IR9 by A14,WAYBEL_4:def 25;
        reconsider w9 = w as Element of R by A18,ZFMISC_1:87;
        w9 <= c9 by A18;
        then w9 <= a by A3,A14,ORDERS_2:3;
        then w9 in NN9 by A16;
        hence contradiction by A15,A17,A18,WAYBEL_4:def 25;
      end;
      then
A19:  Class(EqRel R, c) /\ N in min-classes N by Def8;
      then
A20:  Class(EqRel R, c) /\ N is non empty by Th21;
      set t = the Element of Class(EqRel R, c) /\ N;
      t in N by A20,XBOOLE_0:def 4;
      then reconsider t as Element of R;
      take t;
      thus t in B by A19;
      t in Class(EqRel R, c) by A20,XBOOLE_0:def 4;
      then [t,c] in EqRel R by EQREL_1:19;
      then [t,c] in IR /\ IR~ by A1,Def4;
      then [t,c] in IR by XBOOLE_0:def 4;
      then t <= c9;
      hence thesis by A3,A14,ORDERS_2:3;
    end;

:: !!! Choice
    deffunc F(set) = the Element of $1;
    defpred P[set] means not contradiction;
    {F(x) where x is Element of MCN9 : P[x]} is finite from PRE_CIRC: sch 1;
    hence thesis;
  end;
end;
