Cartesian product using family of sets I have been reading both "Naive set theory - Halmos" and "Joy of sets - Delvin". I couldn't really get what the family of sets mean. $I$ set that they frequently use is I guess a subset of $N$. Other than that I don't seem to understand anything at all.
The cartesian product defined as
$$\prod X_i = \{f | (f: I \rightarrow \bigcup X_i) \wedge (\forall i \in I)(f(i) \in x_i)\}$$
I totally don't get what's happening here. $$\{1,2\} \times \{2,3\} = \{(1,2),(1,3),(2,2),(2,3)\}$$ Can somebody please enlighten me what's that definition is with that example?
EDIT: Is he trying to define all the functions where $$\{\{1 \rightarrow 1,2 \rightarrow 2\},\{1 \rightarrow 1, 2 \rightarrow 3\},\{1 \rightarrow 2,2 \rightarrow 2\} \{1 \rightarrow 2, 2 \rightarrow 3\}\}$$
Where $I = \{1,2\}$
 A: If there are e.g. $2$ sets $X,Y$ then the Cartesian product $X\times Y$
can be looked at as a set of ordered pairs: $\left\{ \left\langle x,y\right\rangle \mid x\in X\wedge y\in Y\right\} $.
But what if you want a notion of Cartesian product concerning a whole
bunch of sets? Let's say we have the sets $X_{i}$ where $i$ ranges
over indexset $I$. Then functions take the place of the ordered pairs.
Elements of $\prod_{i\in I}X_{i}$ are functions $f$ having $I$
as domain and with $f\left(i\right)\in X_{i}$ for each $i\in I$.
We want to give these functions a common codomain. Note that for every
$i\in I$ the set $X_{i}$ must be a subset of the codomain of these
functions leading to the set $\bigcup_{i\in I}X_{i}$ as codomain.
This together gives the definition that you mention in your question.
In the example that you mention: $\left\{ 1,2\right\} \times\left\{ 2,3\right\} =\left\{ \left\langle 1,2\right\rangle ,\left\langle 1,3\right\rangle ,\left\langle 2,2\right\rangle ,\left\langle 2,3\right\rangle \right\} $
we need an indexset $I$ that has exactly $2$ elements and we can
do it with $I=\left\{ 1,2\right\} $ as you propose. 
Then e.g. element
$\left\langle 1,3\right\rangle $ corresponds with function $f:\left\{ 1,2\right\} \rightarrow\left\{ 1,2,3\right\} $
that is prescribed by $1\mapsto1$ and $2\mapsto3$.
