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 Th123:
  x in R"Y iff ex y st y in rng R & [x,y] in R & y in Y
proof
  thus x in R"Y implies ex y st y in rng R & [x,y] in R & y in Y
  proof
    assume x in R"Y;
    then consider y such that
A1: [x,y] in R & y in Y by Def12;
    take y;
    thus thesis by A1,XTUPLE_0:def 13;
  end;
  thus thesis by Def12;
end;
