 reserve x,y,z,t for object,X,Y,Z,W for set;
 reserve R,S,T for Relation;

theorem Th8:
  R c= [:X,Y:] implies R|Z = R /\ [:Z,Y:] & (Z|`R) = R /\ [:X,Z:]
proof
  assume
A1: R c= [:X,Y:];
  thus (R|Z) = R /\ [:Z,Y:]
  proof
    let x,y be object;
    thus [x,y] in (R|Z) implies [x,y] in R /\ [:Z,Y:]
    proof
      assume
A2:   [x,y] in (R|Z); then
A3:   x in Z by RELAT_1:def 11;
A4:   [x,y] in R by A2,RELAT_1:def 11;
      then y in Y by A1,ZFMISC_1:87;
      then [x,y] in [:Z,Y:] by A3,ZFMISC_1:87;
      hence thesis by A4,XBOOLE_0:def 4;
    end;
    thus [x,y] in R /\ [:Z,Y:] implies [x,y] in (R|Z)
    proof
      assume
A5:   [x,y] in R /\ [:Z,Y:];
      then [x,y] in [:Z,Y:] by XBOOLE_0:def 4; then
A6:   x in Z by ZFMISC_1:87;
      [x,y] in R by A5,XBOOLE_0:def 4;
      hence thesis by A6,RELAT_1:def 11;
    end;
  end;
  let x,y be object;
  thus [x,y] in (Z|`R) implies [x,y] in R /\ [:X,Z:]
  proof
    assume
A7: [x,y] in (Z|`R); then
A8: y in Z by RELAT_1:def 12;
A9: [x,y] in R by A7,RELAT_1:def 12;
    then x in X by A1,ZFMISC_1:87;
    then [x,y] in [:X,Z:] by A8,ZFMISC_1:87;
    hence thesis by A9,XBOOLE_0:def 4;
  end;
    assume
A10: [x,y] in R /\ [:X,Z:];
    then [x,y] in [:X,Z:] by XBOOLE_0:def 4; then
A11: y in Z by ZFMISC_1:87;
    [x,y] in R by A10,XBOOLE_0:def 4;
    hence thesis by A11,RELAT_1:def 12;
end;
