Is there a notation for saying that a function is defined on some subset of a set?

71 Views Asked by At

Let $X,Y$ be sets and let $f$ assign to every $x \in X$ some unique $y \in Y$. Then we may write $f: X \to Y$. This notation has the advantage that $f(X)$ need not be $Y$ but must be "within" $Y$. But it has a "disadvantage" that $f$ must eat every point of $X$. So I wonder if there is in literature any notation that may "remedy" this relatively unpleasant feature.

If there is one such, then we may be kept from constantly saying, say "let $A$ be an open subset of $\mathbb{R}^{n}$ and let $f: A \to \mathbb{R}$...".