Categorical Pasting Lemma If I'm not mistaken, the pasting lemma for a two-element open cover $X=A\cup B$ of a topological space is equivalent to saying that the following square is a pushout in $\mathsf{Top}$: $$\begin{matrix} A\cup B & \longleftarrow & B \\ \uparrow && \uparrow \\ A & \longleftarrow & A\cap B\end{matrix}$$ where the arrows are the canonical embeddings.
Is my statement true, and if so, how can I categorically formulate the pasting lemma for general open covers $ \left\{  U_i\right\}  _{i\in I}$?
 A: Let $\{ U_i : i \in I \}$ be an open cover of $X$. Let $\mathcal{J}$ be the poset of subsets of $I$ of size $1$ or $2$, ordered by inclusion, and consider the diagram $V : \mathcal{J}^\mathrm{op} \to \mathbf{Top}$ sending each $J \subseteq I$ to $\bigcap_{j \in J} U_j$. Then $X \cong \varinjlim_{\mathcal{J}} V$. (Just check the universal property!)
What is essential in the above is that each $U_i$ is open in $X$. On the other hand, you might like to verify for yourself that we can replace the poset of subsets of $I$ of size $1$ or $2$ with the poset of non-empty finite subsets of $I$.
A: If $X = \bigcup_k U_k$, the thing you want to do is express $X$ as a quotient of the disjoint union $\coprod_k U_k$ of the open sets by the equivalence relation $P_i \sim P_j$ whenever $P \in X$ appears both in $U_i$ and $U_j$.
(My topology-fu is rusty; make sure the above claim is correct in general! Or at least in the generality you care about)
We can express this with a coequalizer. For each $i$ and $j$, we define a pair of functions $U_i \cap U_j \to \coprod_k U_k$: $f_{ij}$ is the inclusion of $U_i \cap U_j$ into the copy of $U_i$ in the disjoint union, and $g_{ij}$ is the inclusion into $U_j$.
To get this for all of the intersections at once, we take the disjoint union of all the intersections. We get two different maps
$$ \coprod_{ij}( U_i \cap U_j) \to \coprod_k U_k $$
one corresponding to applying $f$ to each component of the disjoint union, and one corresponding to applying $g$ to each component of the disjoint union.
Every instance $P \sim Q$ of the equivalence relation appears as $P = f(x)$ and $Q = g(x)$ for some $x$ in the domain, and conversely we always have $f(x) \sim g(x)$. Therefore, the coequalizer is the quotient of $\coprod_k U_k$ by $\sim$, which is isomorphic to $X$.
