Subspace of Product Space is Homeomorphic to Factor Space/Proof 2/Surjection

Theorem
Let $\family {X_i}_{i \mathop \in I}$ be a family of sets where $I$ is an arbitrary index set.

Let $\ds X = \prod_{i \mathop \in I} X_i$ be the Cartesian product of $\family {X_i}_{i \mathop \in I}$.

Let $z \in X$.

Let $i \in I$.

Let $Y_i = \set {x \in X: \forall j \in I \setminus \set i: x_j = z_j}$.

Let $p_i = \pr_i {\restriction_{Y_i} }$, where $\pr_i$ is the projection from $X$ to $X_i$.

Then:
 * $p_i$ is a surjection.

Proof
Note that by definitions of a restriction and a projection then:
 * $\forall y \in Y_i: \map {p_i} y = y_i$

Let $x \in X_i$.

Let $y \in Y_i$ be defined by:
 * $\forall j \in I: y_j = \begin{cases}

z_j & j \ne i \\ x & j = i \end{cases}$

Then:
 * $\map {p_i} y = y_i = x$

It follows that $p_i$ is an surjection by definition.