Given two sets $A$ and $B$, the function set $B^A$ is characterized by the universal property that the functor $(-)^A:\mathrm{Set} \to \mathrm{Set}$ is the right adjoint of the functor $(-)\times A:\mathrm{Set} \to \mathrm{Set}$. What is the universal property of the set of injections between two sets $A$ and $B$ in the category of sets, if any such universal property exists?



Universal property of the set of injections in the category of sets
$\newcommand{\Inj}{\operatorname{Inj}}\newcommand{\Set}{\mathrm{Set}}$**Maps $X \to \Inj(A,B)$ correspond to monomorphisms $A \times X \to B \times X$ in the slice $\Set/X$, which can be thought of as “$X$-indexed monomorphisms $A \to B$”.**


This isn’t hard to check: the main tool is that for any objects over $X$, say $A' \to X$ and $B' \to X$, maps $f : A' \to B'$ over $X$ correspond to $X$-indexed families of maps between their fibers $f\_x : A'\_x \to B'\_x$, and such $f$ is a mono in $\Set/X$ precisely if each $f\_x$ is a mono (equivalently, injection) in $\Set$.


There’s a general philosophical point here. Interesting universal properties are often most naturally described in terms of *slices* of the ambient category; an “$X$-indexed family of whatsits” will usually be a whatsit in $\mathcal{E}/X$. Objects of $\mathcal{E}/X$ are viewed as $X$-indexed families of objects of $\mathcal{E}$ — this “relative viewpoint” was famously exploited and popularised by Grothendieck, in the category of schemes, i.e. the “spaces” of algebraic geometry — and if you started with plain objects of $\mathcal{E}$ (like your original $A$ and $B$), then to mention them in $\mathcal{E}/X$, you use the *constant* families of objects $A \times X \to X$, as above.


