Cartesian products of families in Halmos' book. I'm studying some set theory from Halmos' book. He introduces the generalization of cartesian products by means of families. However, I can't understand what is going on. I get the first introduction "The notation..." to "... one-to-one correspondence". What I'm having trouble is with 

If $\{X_i\}$ is a family of sets $(i\in I)$, the Cartesian product of the family is, by definition, the set of all families $\{x_i\}$ with $x_i\in X_i$ for each $i$ in $I$.

Could you explain to me the motivation of this definition? I know families  are itself functions $f:I\to X$ such that to each $i$ there corresponds a subset of $X$, $x_i$. Instead of this we write them succintly as $\{x_i\}_{i\in I}$ to put emphasis on the range (indexed sets) of the function and the domain (indexing set) in question.
For example, in my case, the family is $f:I\to X$ with $f(i)=A_i$ with ${\rm dom} f=\{0,1,2,3\}$ and ${\rm ran} f =\left\{ {{A_0},{A_1},{A_2},{A_3}} \right\}$.
I'm thinking that we can talk about the cartesian product of sets as a set of tuples. However, I can't understand the definition for families of sets.
I leave the page in question:
$\hspace{1 cm} $
 A: Your intuition is exactly right. If $I$ is a set and you have a collection of sets $X_i$ for each $i \in I$, then the cartesian product is like a tuple. For example, in the case where you have two sets, $X_0$ and $X_1$, your index set is the finite ordinal $2 = \{0,1\}$. $X_0 \times X_1 = \{(a,b) : a \in X_0 \text{ and } b \in X_1\}$. Another way of thinking about this is $X_0 \times X_1$ is the collection of all functions from $2 = \{0,1\} \rightarrow X_0 \cup X_1$ such that $f(0) \in X_0$ and $f(1) \in X_1$. Instead of tuple, the cartesian product here is a correspondence $f$ between the index set $2 = \{0,1\}$ and an element such that $f(i) \in X_i$ for $i \in \{0,1\}$. 
Now to generalize, you want the cartesian product to be the set of correspondence between the index set $I$ and elements in $\bigcup_{i \in I} X_i$ such that $f(i) \in X_i$. So formally, the cartesian product $\prod_{i \in I} X_i = \{f : I \rightarrow \bigcup_{i \in I} X_i : f(i) \in X_i\}$. As you can see, this is a generalization of the tuple concept. 
A: I think this will help other readers that have this same question (Mendelson, Introduction to Topology):

Let $X_1,X_2,\dots,X_n$ be sets. We have defined a point $$x=(x_1,\dots,x_n)\in \prod_{i=1}^n X_i$$
as an ordered sequence such that $x_i\in X_i$. Given such a point, by setting $x(i)=x_i$ we obtain a function $x$ which associates to each integer $i$,$1\leq i \leq n$, the element $x(i)\in X_i$. Conversely, given a function $x$ which associates to each integer $i$,$1\leq i \leq n$, an element $x(i)\in X_i$ we obtain the point
$$(x(1),\dots,x(n))\in \prod_{i=1}^n X_i$$
It is easily seen that this correspondence between points of $\displaystyle\prod_{i=1}^n X_i$ and functions of the above type is one-one and onto, so that a point of $\displaystyle\prod_{i=1}^n X_i$ may also be defined as a function $x$ which associates to each integer $i$,$1\leq i \leq n$, a point  $x(i)\in X_i$. The advantage of this second approach is that it allows us to define the product of an arbitrary family of sets.
DEFINITION  Let $\{X_\alpha\}_{\alpha \in I}$ be an indexed family of sets. The product  of the sets $\{X_\alpha\}_{\alpha \in I}$, 
  written  $\prod_{x\in I}X_\alpha$ consists of all functions $x$ with domain the indexing set $I$ having the property that for each $\alpha \in I$, $x(\alpha)\in X_\alpha$. 
Given a point $x\in \prod_{x\in I}X_\alpha$, one may refer to $x(\alpha)$ as the $\alpha$-th coordinate of $x$. However, unless the indexing set has been ordered in some fashion (as is the case with finite products in our earlier discussion), there is no first coordinate, second coordinate, and so on.

A: To understand the motivation of this definition it may be helpful to be reminded that one is asked to define a Cartesian product of a indexed family of set without any introduction to natural number. In other words, we are not defining an $n$-ary Cartesian product of $n$ sets, where $n$ is a natural number, but a family of sets indexed by a general indexing set. The Cartesian product so defined is not a set of ordered $n$-tuples but just ordered tuples. If we were to define the $n$-ary Cartesian product we have been able to directly generalize from binary Cartesian product in the intuitive way, without all the .
To begin with, an ordered pair $\left(a,b\right)$ is in fact a set $\left\{\left\{a\right\},\left\{a,b\right\}\right\}$, so that by the axioms we have we are just able to raise two objects $\left\{a,b\right\}$ and indicate which of them is "the first one" $\left\{a\right\}$, constituting the intended concept of an ordered pair. Based on this, the Cartesian product between two sets $A$ and $B$ is all ordered pairs of this kind so that $a\in A$ and $b\in B$.
However, to let the Cartesian products of a family of set become a set of tuples, one meets difficulties in how to generalize from what has provided in the last paragraph without the concept of natural numbers. For the case of a family indexed by a general indexing set, we had better change the strategy. For example, why not define anew what is the Cartesian product of a given family of set, and let it reduced to the thing described in the last paragraph when the indexing set contains only two elements (besides the empty set), or, if even this is difficult, a thing that is at least one-one corresponding to the thing described in the last paragraph?
The task now starts with designing the one-one correspondence to the original definition of Cartesian product between two sets that is also convenient to generalize to the cases of more than two sets. What Halmos designed, and became dogmatic, is just the mapping described in his text. Halmos did not prove why this mapping is one-one (bijective). The proof of injective is simple and direct, but the proof of surjective needs in fact the axiom of choice (as I understood it), which Halmos did not remind the reader. Axiom of choice was introduced in a later chapter, and stated in a form that, relies on the definition of Cartesian product of a family of set. In fact, this axiom can well be equivalently stated without the concept of Cartesian product of a family of set. So still that bijection is provable.
Now we have two definitions of two slightly different things, the definition of $n$-ary Cartesian product and the definition of Cartesian product of a family of a set. The latter does not reduce directly to the former when the indexing set is some finite set, but to another thing that is one-one corresponding to the former.
