It is well-known that the category of topological pairs is of great use in algebraic topology. Its construction is standard.
Similarly, I just read in Jacobs' "Categorical Logic and Type Theory" about the category of predicates, which is the category of pairs of sets $(X,A)$ where $A \subseteq X$, with morphisms $u: (X,A) \to (Y,B)$ being commutative squares $$ \begin{array}{ccc} X &\to &Y \\ \uparrow & & \uparrow \\ A &\to &B. \end{array} $$
Now clearly these two constructions are almost the same, probably the cases $\mathcal{C} = \mathrm{Top}, \mathrm{Set}$ of a general procedure. It is not something so simple as the arrow category $\mathcal{C}^2$ because of the subobject condition, but it shouldn't be very far. My questions are:
- In what level of generality can we apply this construction?
- What is the procedure in general? (Does it even have a name?)
- Are there other examples that are used in nature?