Regarding the products of functions in axiomatic set theory, two textbooks which I am reading (Halmos; Hrbacek/Jech) have said the following:
"There is a natural one-to-one correspondence between [the Cartesian product] and a certain set of families. Consider, indeed, any particular unordered pair $\{a,b\}$, with $ a\neq b$, and consider the set $Z$ of all families $z$, indexed by $\{a,b\}$ such that $z_a \in X$ and $z_b \in Y$. If the function $f$ from $Z$ to $X \times Y$ is defined by $f(z) = (z_a, z_b)$, then $f$ is the promised one-to-one correspondence. The difference between $Z$ and $X \times Y$ if merely a matter of notation."
Hrbacek/Jech said as much, but reversed the bijection: they considered
"...a canonical one-to-one correspondence between ordered pairs and 2-tuples that preserves first and second coordinates. Define $\delta((a_0, a_1)) = \{(0, a_0), (1, a_1)\}$; then $\delta$ is a one-to-one mapping on $A_0 \times A_1$ onto $\prod_{0\leq i<2} A_i$ and $x$ is a first (second, respectively) coordinate of $(a_0, a_1)$ iff $x$ is a first (second, respectively) coordinate of $\{(0, a_0),(1,a_1)\}$."
(I had to change their notation a bit: the function maps to 2-term sequences, with each term a "coordinate.")
This is my question: in Halmos' case, how did we order the coordinates? I can see how we could remove the second coordinates from each ordered pair in the family systematically (put $\beta = \{ \bigcup_{x \in \{z_i\}} ( \bigcup_{x \in (i,z_i)} (i,z_i) - \bigcap_{x \in (i,z_i)} (i,z_i)): (i,z_i) \in f \}$), but I do not see how to reorder them into a new pair which recovers the order of the Cartesian product, since the index set was unordered. I like the H/J version, but want to see it made invertible.