Awodey example 5.15: How to show pullback? I found it's intuitive but I am not sure how to show it's a pullback. Consider following diagram:

where $I$ is an index set, $\alpha$ converts $J$ to $I$, and $A_i$ is a family indexed by $I$. After $\alpha$ is given, $\beta, q, p$ are naturally induced maps. The book claims the diagram is a pullback. A few inspection indeed confirms it. For any $A_{\alpha(j)}$, we have 
$Q \to P \to I$ generates $A_{\alpha(j)} \to A_{\alpha(j)} \to \alpha(j)$,
$Q \to J \to I$ generates $A_{\alpha(j)} \to j \to \alpha(j)$.
From this, clearly any function $z_1, z_2$ satisfy $\alpha z_1 = p z_2$ should factor through $Q$ indeed. But this inspection looks pretty informal. I would like to prove by definition. How should I argue $Z \to Q$ exists and unique?
 A: For definiteness of notation, let us say that $\coprod_{i\in I} A_i$ is defined as the set $\bigcup_{i\in I}\{i\}\times A_i$.  The map $p:P\to I$ is then the first projection (sending $(i,a)$ to $i$); let us write $\pi:P\to\bigcup A_i$ for the second projection (so $\pi(i,a)=a$).
Given such $z_1:Z\to J$ and $z_2:Z\to P$, we can then define $z:Z\to Q$ by the formula $$z(x)=(z_1(x),\pi(z_2(x))).$$  First, we verify that $z(x)$ really is an element of $Q=\bigcup_{j\in J}\{j\}\times A_{\alpha(j)}$.  Indeed, $z_1(x)\in J$, and $\pi(z_2(x))\in A_{p(z_2(x))}=A_{\alpha(z_1(x))}$.
Next, we verify that $qz=z_1$ and $\beta z=z_2$.  Indeed, $q(z(x))$ is the first coordinate of $z(x)$ which is $z_1(x)$ by definition.  The map $\beta$ is defined by $\beta(j,a)=(\alpha(j),a)$, so $$\beta(z(x))=(\alpha(z_1(x)),\pi(z_2(x)))=(p(z_2(x)),\pi(z_2(x))).$$  Since $p$ and $\pi$ are just the two coordinate functions on $P$, this means $\beta(z(x))=z_2(x)$.
Finally, $z$ is the unique map with these properties.  Indeed, the calculations of the previous paragraph show that to have $qz=z_1$, the first coordinate of $z(x)$ must be $z_1(x)$, and to have $\beta z=z_2$, the second coordinate of $z(x)$ must be $\pi(z_2(x))$.
