Infinite Cartesian Product: Understanding I'm having a bit of trouble understanding the definition of the infinite cartesian product, particularly with the intuition behind it.
According to my textbook, Enderton's Elements of Set Theory, the infinite cartesian product takes the cartesian product of each set $X_i$ for $i \in I$. This idea makes sense to me, but the definition of $$\prod_{i \in I} X_i = \left\{\left. f: I \to \bigcup_{i \in I} X_i\ \right|\ (\forall i)(f(i) \in X_i)\right\}$$ does not. 
For example, if I make a function $X = \{(1,\{2\}), (2,\{3\}), (3, \{4\})\}$ where $X_1 = \{2\}$, $X_2  = \{3\}$, and $X_3  = \{4\}$ if I take the cartesian product of them, don't I get $(2,3,4)$? How is this a function and how does it relate to the definition? 
I am very aware that my misunderstanding most likely comes from an inadequate knowledge of cartesian products, and that my example may be incorrect. If so, please let me know what misconceptions I may have so that I can grow and learn!
 A: If $X_1=\{2\}$, $X_2=\{3\}$, and $X_3=\{4\}$, then by this definition $X_1\times X_2\times X_3$ is the set of functions $f$ from the index set $\{1,2,3\}$ to $X_1\cup X_2\cup X_3=\{2,3,4\}$ such that $f(1)\in X_1$, $f(2)\in X_2$, and $f(3)\in X_3$. As it happens, there is only one such function:
$$f=\{\langle 1,2\rangle,\langle 2,3\rangle,\langle 3,4\rangle\}\;,$$
so that $f(1)=2$, $f(2)=3$, and $f(3)=4$, and $X_1\times X_2\times X_3=\{f\}$.
We don’t usually use this definition for Cartesian products of finitely many sets; by the more familiar definition we would have
$$X_1\times X_2\times X_3=\{\langle 2,3,4\rangle\}\;,$$
a set with one member, the ordered triple $\langle 2,3,4\rangle$. But the difference is mostly cosmetic. The ordered triple with which you’re familiar is simply a way of specifying to which factor set each component belongs: if $\langle x_1,x_2,x_3\rangle\in X_1\times X_2\times X_3$, we know that $x_1\in X_1$, $x_2\in X_2$, and $x_3\in X_3$. The functions in Enderton’s definition1 do the same thing: they associate an element of each factor set with an identifier of that set, namely, its index, so that even if all of the factor are the same set, we can tell which ‘component’ comes from which factor. You might notice that when we write an ordered triple as $\langle x_1,x_2,x_3\rangle$, we’re really doing the same thing, albeit in slightly different format, as writing it $\langle x(1),x(2),x(3)\rangle$, as if were an ordered list of the outputs of some function $f$ on the index set $\{1,2,3\}$.
In fact, there are actually several ways to define ordered triples, and one of them is precisely Enderton’s definition of elements of a Cartesian product: by that definition the ordered triple $\langle 2,3,4\rangle$ is the function $f$ above. If one is using that definition of ordered triple, there is literally no difference between the Cartesian products with finitely many factors that you’ve seen before and these with infinitely many factors.
You’ve also probably seen some infinite Cartesian products in another setting: the product $\Bbb R^{\Bbb N}$, i.e., $\prod_{n\in\Bbb N}X_n$, where each $X_n=\Bbb R$, is just the set of infinite sequences of real numbers: each $x\in\Bbb R^{\Bbb N}$ is a sequence $\langle x_n:n\in\Bbb N\rangle=\langle x_0,x_1,\ldots\rangle$ of real numbers, which formally is simply a function
$$x:\Bbb N\to\Bbb R:n\mapsto x_n\;.$$
We could just as well write the terms of the sequence $x(n)$, emphasizing the functional nature of the sequence as an element of a Cartesian product, instead of as $x_n$. Either way, the $n$ identifies the factor $X_n$ of the product, the factor from which the term $x_n$ or $x(n)$ comes.
1 It’s not really Enderton’s definition: it’s standard.
A: Ok, let's look at your example. If $X_1 = \{2\}$, $X_2 = \{3\}$, and $X_3 = \{4\}$, then $\bigcup_{i=1}^3 X_i = \{2,3,4\}$. Thus, $\prod_{i=1}^3 X_i$ is (by definition)
$$\{f : \{1,2,3\} \to \{2,3,4\} \mid \forall i \in \{1,2,3\} (f(i) \in X_i)\}.$$
Importantly, the set $X = \{(1,\{2\}), (2, \{3\}), (3,\{4\})\}$ that you wrote down is not an example of an element of this cartesian product! You should review the definition of function: every element of a function is an ordered pair, where the first thing in the ordered pair is an element of the domain of the function, and the second thing in the ordered pair is an element of the codomain of the function. The issue here is that the $(1,\{2\})$ (for example) is not such a pair: the first thing in this ordered pair ($1$) is indeed an element of the indexing set $\{1,2,3\}$, but the second thing in this ordered pair ($\{2\}$) is not an element of the codomain $\bigcup_{i=1}^3 X_i = \{2,3,4\}$ (it is a subset of $\{2,3,4\}$, but of course that's not the same thing!)
The cartesian product of these three sets would be written (in shorthand) as $\{(2,3,4)\}$ (not just the element $(2,3,4)$!), but of course the technical definition you gave says that the cartesian product actually is a set of functions. The actual set of functions $\prod_{i=1}^3 X_i$ will still have exactly one element, though, and $(2,3,4)$ is just shorthand for this unique element (which is a function).
Can you try to write out more precisely what this function is, as a set of ordered pairs?
