
theorem Th18: :: Lemma 4.36
  for R being non empty RelStr, N being Subset of R, x being set
  st R is quasi_ordered & x in min-classes N
  holds for y being Element of R\~ st y in x
  holds y is_minimal_wrt N, the InternalRel of R\~
proof
  let R be non empty RelStr, N be Subset of R, x be set such that
A1: R is quasi_ordered and
A2: x in min-classes N;
  set IR = the InternalRel of R, CR = the carrier of R;
  set IR9 = the InternalRel of R\~;
  let c be Element of R\~ such that
A3: c in x;
  consider b being Element of R\~ such that
A4: b is_minimal_wrt N, IR9 and
A5: x = Class(EqRel R, b) /\ N by A2,Def8;
  c in Class(EqRel R, b) by A3,A5,XBOOLE_0:def 4;
  then [c,b] in EqRel R by EQREL_1:19;
  then [c,b] in IR /\ IR~ by A1,Def4;
  then
A6: [c,b] in IR by XBOOLE_0:def 4;
A7: now
    assume ex d being set st d in N & d <> c & [d,c] in IR9;
    then consider d being set such that
A8: d in N and d <> c and
A9: [d,c] in IR9;
A10: not [d,c] in IR~ by A9,XBOOLE_0:def 5;
    R is transitive by A1;
    then
A11: IR is_transitive_in CR;
    then
A12: [d,b] in IR by A6,A8,A9;
    now
      assume [d,b] in IR~;
      then [b,d] in IR by RELAT_1:def 7;
      then [c,d] in IR by A6,A8,A11;
      hence contradiction by A10,RELAT_1:def 7;
    end;
    then
A13: [d,b] in IR9 by A12,XBOOLE_0:def 5;
    b <> d by A6,A10,RELAT_1:def 7;
    hence contradiction by A4,A8,A13,WAYBEL_4:def 25;
  end;
  c in N by A3,A5,XBOOLE_0:def 4;
  hence thesis by A7,WAYBEL_4:def 25;
end;
