
theorem Th29:
  for R being RelStr, N being Subset of R, x being Element of R\~
  st R is quasi_ordered & x in N &
  ((the InternalRel of R)-Seg(x)) /\ N c= Class(EqRel R,x)
  holds x is_minimal_wrt N, the InternalRel of R\~
proof
  let R be RelStr, N be Subset of R, x be Element of R\~ such that
A1: R is quasi_ordered and
A2: x in N and
A3: ((the InternalRel of R)-Seg(x)) /\ N c= Class(EqRel R,x);
  set IR = the InternalRel of R;
  set IR9= the InternalRel of R\~;
  now
    assume ex y being set st y in N & y<>x & [y,x] in IR9;
    then consider y being set such that
A4: y in N and
A5: y <> x and
A6: [y,x] in IR9;
A7: not [y,x] in IR~ by A6,XBOOLE_0:def 5;
    y in IR-Seg(x) by A5,A6,WELLORD1:1;
    then y in IR-Seg(x) /\ N by A4,XBOOLE_0:def 4;
    then [y,x] in EqRel R by A3,EQREL_1:19;
    then [y,x] in IR /\ IR~ by A1,Def4;
    hence contradiction by A7,XBOOLE_0:def 4;
  end;
  hence thesis by A2,WAYBEL_4:def 25;
end;
