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 Th27:
  R is well-ordering & b in R-Seg(a) implies (R |_2 (R-Seg(a)))
  -Seg(b) = R-Seg(b)
proof
  assume that
A1: R is well-ordering and
A2: b in R-Seg(a);
  set S = R |_2 (R-Seg(a));
  now
    let c be object;
    assume
A3: c in R-Seg(b);
    then
A4: [c,b] in R by Th1;
A5: [b,a] in R by A2,Th1;
    then
A6: [c,a] in R by A1,A4,Lm2;
A7: c <> b by A3,Th1;
    then c <> a by A1,A4,A5,Lm3;
    then c in R-Seg(a) by A6,Th1;
    then [c,b] in [:R-Seg(a),R-Seg(a):] by A2,ZFMISC_1:87;
    then [c,b] in S by A4,XBOOLE_0:def 4;
    hence c in S-Seg(b) by A7,Th1;
  end;
  then
A8: R-Seg(b) c= S-Seg(b);
  now
    let c be object;
    assume
A9: c in S-Seg(b);
    then [c,b] in S by Th1;
    then
A10: [c,b] in R by XBOOLE_0:def 4;
    c <> b by A9,Th1;
    hence c in R-Seg(b) by A10,Th1;
  end;
  then S-Seg(b) c= R-Seg(b);
  hence thesis by A8;
end;
