This definition is a slight extension of $restriction that simultaneously restricts the codomain to a subset B of Y, under the condition that the range is contained in this subset. It is compatible with the previous definition.
$restriction
B
Y