I'm working through the beginnings of the graph theory necessary for pasting diagrams in $2$-categories using Johnson and Yau's 2-Dimensional Categories, and I'm not quite sure what the relation they're using to quotient by for their geometric realization is. For reference:
Definition. A graph $G$ is a triplet $(V_G,E_G,\psi_G)$ where $V_G$ is a finite set called the set of vertices, $E_G$ is a finite set called the set of edges, and $\psi_G:E_G\to V_G\times V_G$ is a function called the incidence function. The geometric realization of $G$, denoted $|G|$, is the topological quotient $$|G|=\Big[\big(\coprod_{v\in V_G}\{v\}\big)\coprod\big(\coprod_{c\in E_G}[0,1]_e\big)\Big]\big/\sim$$ where $\{v\}$ is a one point space indexed by a vertex $v\in V_G$, $[0,1]_e$ is a copy of the unit interval indexed by an edge $e\in E_G$, and the identification $\sim$ is generated by $$u\sim0\in[0,1]_e\ni1\sim v\ \ \ \ \text{if}\ \ \ \ \psi_G(e)=(u,v).$$
What is the equivalence relation $\sim$?
Unless I'm mistaken $\coprod_{v\in V_G}\{v\}$ is homeomorphic to $V_G$ with the discrete topology and $$\coprod_{e\in E_G}[0,1]_e=\{(e,x):x\in[0,1]_e\}$$ with open sets of the form $$U=\coprod_{e\in I}(a_e,b_e)$$ (endpoints $[0$ and $1]$ allowed) for some subset $I\subseteq E_G$, so the coproduct of these sets should be $$X=\big(\coprod_{v\in V_G}\{v\}\big)\coprod\big(\coprod_{c\in E_G}[0,1]_e\big)=\{(n,y):(n=0\wedge y\in\coprod_{v\in V_G}\{v\})\vee(n=1\wedge y\in\coprod_{c\in E_G}[0,1]_e)\}$$ with opens of the form $$V\coprod U$$ with $V\subseteq V_G$ and $U$ as above, so I would expect the relation $\sim$ to be expressible as a subset of $X\times X$ but I can't see exactly how to get there from their definition. Any assistance is appreciated.
The answer was just to think about it some more. The relation $\sim$ is, unless I'm mistaken, the smallest equivalence relation generated by the relation
$$\sim'=\{(u,(e,0)):\pi_0(\psi_G(e))=u\}\cup\{(v,(e,1)):\pi_1(\psi_G(e))=v\}.$$
By taking the coproduct above we are essentially creating a copy of all the vertices $V_G$ and a copy of the unit interval for each edge $e\in E_G$, and the quotient by $\sim$ glues the tails and heads of each edge $e$ (viewed as the first and second coordinate of $\psi_G(e)$ respectively) to the beginnings and ends of the unit intervals indexed by $e$, respectively.
Further, since $\psi_G$ is a function each edge has only two unique vertices as its head/tail so no vertices are related to the same interval endpoints, thus the relational closure $\sim$ of $\sim'$ should only add the diagonal $\Delta X\subseteq X\times X$ and mirror images of existing pairs to $\sim'$. That is, if we let $\langle\pi_1,\pi_0\rangle:X\times X\to X\times X$ be the isomorphism interchanging coordinates, an explicit expression for $\sim$ is $$\sim\ =\ \sim'\ \cup\ \Delta X\ \cup\ \langle\pi_1,\pi_0\rangle(\sim').$$
EDIT: I missed a term for the transitive closure, which is necessary for vertices $u$ which are the tail of one or more edges $\{e_i\}_{0<i\leq m}$ and the head of one or more edges $\{e'_I\}_{0<i\leq m}$ simultaneously. We will then have $$u\sim'(e_0,0)\wedge\dots\wedge u\sim'(e_n)\wedge u\sim'(e'_0,1)\wedge\dots\wedge u\sim'(e'_m,1)$$ so the corresponding beginnings and ends of the unit intervals for these edges will need to be glued together. This adds three more terms to the relational closure corresponding to tails glued together ($TT$), heads glued to tails ($HT$), and heads glued together ($HH$). Explicitly, to the above definition of $\sim$ we need to union in
$$TT=\{((e,0),(e',0)):\pi_0(\psi_G(e))=\pi_0(\psi_G(e'))\}$$
$$HT=\{((e,1),(e',0)):\pi_1(\psi_G(e))=\pi_0(\psi_G(e'))\}$$
$$HH=\{((e,1),(e',1)):\pi_1(\psi_G(e))=\pi_1(\psi_G(e'))\}$$
and $\langle\pi_1,\pi_0\rangle(HT)=TH$ as well since this subset is not necessarily symmetric. This finally yields $$\sim\ =\ \sim'\ \cup\ \Delta X\ \cup\ \langle\pi_1,\pi_0\rangle(\sim')\ \cup HH\ \cup\ HT\ \cup\ TH\cup\ TT.$$