Understanding the definition of product of sets Suppose we are given a family of sets $\{ X_{\alpha} \}_{\alpha \in A } $, my book the cartesian product of them as:
$$ \prod_{\alpha \in A} X_{\alpha} = \bigg\{ f: A \to \bigcup_{\alpha \in A} X_{\alpha} : f(\alpha) \in X_{\alpha}, \alpha \in A \bigg\} $$
This definition is sort of hard to digest, so I was trying to think of it when $A = \{1,2 \} $, and expect this to coincide with the definition 
$$ X_1 \times X_2 = \{ (x,y) : x \in X_1,  y \in X_2 \} $$
but as $A = \{1,2\}$ in the  definition above, we obtain 
$$ \prod_{i \in \{1,2\}} X_i = \{ f: \{1,2 \} \to X_1 \cup X_2 : f(1) \in X_1, f(2) \in X_2 \}$$
which differs from the usual definition of Cartesian product of two sets. Are they different definitions?
 A: The definition is hard to digest because it is omitting an essential quantifier (and instead abusing colons and commas to express distinctions that they can't possibly carry to a reader who doesn't already know what is meant by the definition). It should be
$$\prod_{\alpha \in A} X_{\alpha} = \bigg\{ f: A \to \bigcup_{\alpha \in A} X_{\alpha} \mathrel{\Bigg|} \forall \alpha\in A\,\bigl[f(\alpha) \in X_{\alpha}\bigr] \bigg\}$$
A: There is a bijection $\varphi: \prod_{i \in \{1, 2\}}X_i \to X_1 \times X_2$, given by $\varphi(f) = (f(1), f(2))$.
A: Let $X_\alpha$ be sets, indiced by a set $A$. 
The product set $\prod_{\alpha\in A} X_\alpha$ is defined to contain all the 'sequences' $(\dots,\, x_\alpha,\, \dots)_{\alpha\in A}$ with $x_\alpha\in X_\alpha$.
Now, what exactly do we mean by these 'sequences'? 
Well, these can be caught as functions defined on $A$ that assign the 'coordinate' $x_\alpha$ to any $\alpha\in A$.
In this view, it is clear that the original definition $X_1\times X_2$ is essentially the same as $\prod_{\alpha\in\{1,2\}}X_\alpha$, however, literally they are different sets.
(And one more side note: the definition of $A\times B$ is necessary to define functions, so there is no way to start right away with the more general definition of products of sets.)
