reserve A,X,X1,X2,Y,Y1,Y2 for set, a,b,c,d,x,y,z for object;
reserve P,P1,P2,Q,R,S for Relation;

theorem
  R"Y = R"(rng R /\ Y)
proof
  for x being object holds x in R"Y iff x in R"(rng R /\ Y)
  proof let x be object;
    thus x in R"Y implies x in R"(rng R /\ Y)
    proof
      assume x in R"Y;
      then consider y such that
A1:   y in rng R and
A2:   [x,y] in R and
A3:   y in Y by Th123;
      y in rng R /\ Y by A1,A3,XBOOLE_0:def 4;
      hence thesis by A2,Def12;
    end;
    assume x in R"(rng R /\ Y);
    then consider y such that
    y in rng R and
A4: [x,y] in R and
A5: y in rng R /\ Y by Th123;
    y in Y by A5,XBOOLE_0:def 4;
    hence thesis by A4,Def12;
  end;
  hence thesis by TARSKI:2;
end;
