reserve X,X1,X2,Y,Y1,Y2 for set, p,x,x1,x2,y,y1,y2,z,z1,z2 for object;
reserve f,g,g1,g2,h for Function,
  R,S for Relation;

theorem
  (R|X)"Y = X /\ (R"Y)
proof
  hereby
    let x be object;
    assume x in (R|X)"Y;
    then
A1: ex y being object st [x,y] in R|X & y in Y by RELAT_1:def 14;
    then
A2: x in X by RELAT_1:def 11;
    R|X c= R by RELAT_1:59;
    then x in R"Y by A1,RELAT_1:def 14;
    hence x in X /\ (R"Y) by A2,XBOOLE_0:def 4;
  end;
  let x be object;
  assume
A3: x in X /\ (R"Y);
  then x in R"Y by XBOOLE_0:def 4;
  then consider y being object such that
A4: [x,y] in R and
A5: y in Y by RELAT_1:def 14;
  x in X by A3,XBOOLE_0:def 4;
  then [x,y] in R|X by A4,RELAT_1:def 11;
  hence thesis by A5,RELAT_1:def 14;
end;
