When you think about a function as a set, it is a set of ordered pairs. The first element of the pair belongs to the domain, the second to the range. When you refer to the function as a whole, it should be $f$ or $g$, not $f(x)$ which should be the value of the function at $x$. Seen as a set of ordered pairs, every pair that belongs to $f$ also belongs to $g$, so you can say $f \subset g$
Unless otherwise noted, the notation
$$ f : X \to Y $$
indicates that $f$ is a function with domain $X$ and codomain $Y$. This notation is agnostic with respect to the existence of a larger set $X'$ such that $X \subsetneq X'$. That is, with respect to the usual definitions of a function, there is no notion or notation for a function which "covers everything" in some set—the domain of a function is precisely the set on which that function is defined; no more, no less.
However, if this distinction is important, then it may be appropriate to discuss partial functions. From a set theoretic point of view, a partial function from $X$ to $Y$ is a subset of the Cartesian product $X\times Y$ which satisfies the property that
$$ (x,y) \in f \land (x',y') \in f \implies y=y'. $$
Equivalently, a partial function from $X$ to $Y$ is a function from $X'$ to $Y$, where $X' \subseteq X$. If $f : X \not\to Y$ is a partial function and $x \in X$, then either
- there is some (necessarily unique) $y \in Y$ such that $f(x) = y$, or
- $f(x)$ is undefined.
Note that I have used the notation $X \not\to Y$ in order to differentiate between a function (in the usual sense) and a partial function.
For example,
$$ \sqrt{\cdot} : \mathbb{R} \not\to \mathbb{R} $$
is a partial function, as the square root function is not defined for negative values. Here, if $x \in \mathbb{R}$, then either
- there is some $y \in [0,\infty)$ such that $y^2 = x$, and so $\sqrt{x} = y$, or
- there is no such $y$ (i.e. $x < 0$), and so $\sqrt{x}$ is undefined.
The function
$$ (\cdot)^2 : \mathbb{R} \not\to \mathbb{R}$$
is also a partial function, as the domain of this function is $\mathbb{R}$, and $\mathbb{R}\subseteq \mathbb{R}$. In a case like there—that is, if $X = X'$—then the function is called a total function.
While I am not aware of this use, I think that it would be reasonable to say that a partial function $f : X \not\to Y$ is a proper partial function if the set of $x \in X$ such that $f(x)$ is undefined is non-empty. In the notation used above, a proper partial function $f : X \to Y$ satisfies the property that $f$ is a function from $X' \to Y$, where $X'\subsetneq Y$.
Best Answer
Yes, the set of maps from $A$ to $B$ is a subset of $\mathcal{P}(\mathcal{P}(A \times B))$. It is more often written $B^A$ than $A \to B$. In the statement $(\forall f) (f \in B^A \Rightarrow f \in \mathcal{P}(A \times B))$, the domain of discourse is the not-a-set of all sets, assuming that you're working in ZFC.