The restriction of a function f:X→Y to a subset U of X is simply the composite of f and the inclusion function of U:
U \stackrel{i_U}\to X \stackrel{f}\to Y .
It is often written as f ∣U:U→Y, or a variation on that theme.