reserve a,b,c,d,x,y,z for object, X,Y,Z for set;
reserve R,S,T for Relation;
reserve F,G for Function;

theorem Th28:
  R is well-ordering & Y c= field R implies (Y = field R or (ex a
st a in field R & Y = R-Seg(a) ) iff for a st a in Y for b st [b,a] in R holds
  b in Y )
proof
  assume that
A1: R is well-ordering and
A2: Y c= field R;
  now
    given a such that
    a in field R and
A3: Y = R-Seg(a);
    let b such that
A4: b in Y;
A5: [b,a] in R by A3,A4,Th1;
    let c such that
A6: [c,b] in R;
A7: [c,a] in R by A1,A6,A5,Lm2;
    b <> a by A3,A4,Th1;
    then c <> a by A1,A6,A5,Lm3;
    hence c in Y by A3,A7,Th1;
  end;
  hence Y = field R or (ex a st a in field R & Y = R-Seg(a) ) implies for a st
  a in Y for b st [b,a] in R holds b in Y by RELAT_1:15;
  assume
A8: for a st a in Y for b st [b,a] in R holds b in Y;
  assume Y <> field R;
  then ex d being object st not ( d in field R iff d in Y ) by TARSKI:2;
  then field R \ Y <> {} by A2,XBOOLE_0:def 5;
  then consider a such that
A9: a in field R \ Y and
A10: for b st b in field R \ Y holds [a,b] in R by A1,Th6;
A11: now
    let b be object;
    assume
A12: b in R-Seg(a);
    then
A13: [b,a] in R by Th1;
    assume
A14: not b in Y;
    b in field R by A13,RELAT_1:15;
    then b in field R \ Y by A14,XBOOLE_0:def 5;
    then
A15: [a,b] in R by A10;
    b <> a by A12,Th1;
    hence contradiction by A1,A13,A15,Lm3;
  end;
  take a;
  thus a in field R by A9;
  now
A16: not a in Y by A9,XBOOLE_0:def 5;
    let b be object;
    assume
A17: b in Y;
    assume not b in R-Seg(a);
    then
A18: not [b,a] in R or a = b by Th1;
    a <> b by A9,A17,XBOOLE_0:def 5;
    then [a,b] in R by A2,A1,A9,A17,A18,Lm4;
    hence contradiction by A8,A17,A16;
  end;
  hence Y = R-Seg(a) by A11,TARSKI:2;
end;
