
theorem Th5:
  for L being RelStr, Y being set, a being set
  holds (the InternalRel of L)-Seg(a) misses Y & a in Y iff
  a is_minimal_wrt Y, the InternalRel of L
proof
  let L be RelStr, Y be set, a be set;
  set IR = the InternalRel of L;
  hereby
    assume that
A1: IR-Seg(a) misses Y and
A2: a in Y;
A3: IR-Seg(a) /\ Y = {} by A1,XBOOLE_0:def 7;
    now
      assume ex y being set st y in Y & y<>a & [y,a] in IR;
      then consider y being set such that
A4:   y in Y and
A5:   y <> a and
A6:   [y,a] in IR;
      y in IR-Seg(a) by A5,A6,WELLORD1:1;
      hence contradiction by A3,A4,XBOOLE_0:def 4;
    end;
    hence a is_minimal_wrt Y, IR by A2,WAYBEL_4:def 25;
  end;
  assume
A7: a is_minimal_wrt Y, IR;
  now
    assume not IR-Seg(a) misses Y;
    then IR-Seg(a) /\ Y <> {} by XBOOLE_0:def 7;
    then consider y being object such that
A8: y in IR-Seg(a) /\ Y by XBOOLE_0:def 1;
A9: y in IR-Seg(a) by A8,XBOOLE_0:def 4;
A10: y in Y by A8,XBOOLE_0:def 4;
A11: y <> a by A9,WELLORD1:1;
    [y,a] in IR by A9,WELLORD1:1;
    hence contradiction by A7,A10,A11,WAYBEL_4:def 25;
  end;
  hence IR-Seg(a) misses Y;
  thus thesis by A7,WAYBEL_4:def 25;
end;
