# Ordered N-Tuples as Cartesian Products of Indexed Families

In Introduction to Topology, Mendelson defines the Cartesian Product of an Indexed Family as follows:

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$$.

Ordered triples, ordered quadruples, etc., may be defined as families whose index sets are unordered triples, quadruples, etc.

However, it is not immediately apparent to me why this is true. It makes sense if we understand the prior assertions in Halmos that $$\prod_{i \in I} X_i = X_i$$ and that $$\prod_{i \in I} X_i = X_a \times X_b$$ when $$I = \{a, b\}$$, but these already pose difficulty for me.

Let $$I = \{0, 1\}$$, let $$X_0 = \{A, B\}$$, and let $$X_1 = \{C, D\}$$. Then by Mendelson's (and Halmos's) definitions, it would seem to me that . . .

$$\prod_{i \in I} X_ i = \{\{(0, A), (1, C)\}, \{(0, A), (1, D)\}, \{(0, B), (1, C)\}, \{(0, B), (1, D)\}\}$$

This would appear to me to be the set of all functions matching the definition given, but it is not equal to $$X_0 \times X_1$$. Moreover, extending this to a case where the index set $$I$$ is a triple, we would not end up with ordered triples, but with each subset of the product containing three ordered pairs.

When Halmos posits the equalities he does, the idea seems easy to grasp, but the peculiar wording of Mendelson's definition suggests something different to me.

Halmos writes

If $$I$$ is a pair $$\{ a, b \}$$ [in the sense of Halmos p.9], with $$a \ne b$$, then it is customary to identify $$\prod_{i \in I} X_i$$ with the Cartesian product $$X_a \times X_b$$ as defined earlier.

This shows that the he does not claim they are literally the same. In fact, $$A \times B$$ consists of all ordered pairs $$(a,b)$$ with first coordinate $$a$$ and second coordinate $$b$$ as defined on p.23. However, you should not believe that Halmos' definition $$(a,b) = \{ \{a\}, \{a,b\}\} \subset \mathscr{P}(A \cup B)$$ has an inner necessity. The only purpose of this definition is to achieve that $$(a, b) = (c,d)$$ iff $$a= c$$ and $$b=d$$. There are many other ways to do this, for example $$(a,b) = \{ \{b\}, \{a,b\}\}$$. The order in the ordered pair $$(a,b)$$ comes simply from the fact that $$a$$ is written in the first position and $$b$$ in the second position.

Now if $$I = \{a,b\}$$, then $$\prod_{i\in \{a,b\}}X_i$$ is certainly not exactly the same as $$X_a \times X_b$$. But you can define $$(x_a,x_b) = f_{(x_a,x_b)}$$, where $$f_{(x_a,x_b)}$$ is the function such that $$a \mapsto x_a$$ and $$b \mapsto x_b$$: This yields a nice ordered pair satisfying $$(x_a,x_b) = (x'_a,x'_b)$$ iff $$x_a = x'_a$$ and $$x_b = x'_b$$.

Whatever you define as an ordered pair, be aware that there is an arbitrariness in declaring $$a$$ as the first and $$b$$ as the second coordinate: You have to make a choice.

Working with functions makes this choice obsolete, but you do not loose any essential ingredient. In fact, each function $$f \in \prod_{i \in I} X_i$$ can be understood a "tupel" $$(x_i)_{i \in I}$$ with $$x_i \in X_i$$ ($$x_i = f(i)$$) and we have $$(x_i)_{i \in I} = (x'_i)_{i \in I}$$ iff $$x_i = x'_i$$ for all $$i \in I$$. The element $$x_i$$ may be denoted as the coordinate $$i$$ of the tupel $$(x_i)_{i \in I}$$. The only thing that is lost is that you do no longer have a specific order of the coordinates (first coordinate, second coordinate, ...). But what is the benefit of such an order? I do not see any. In case $$I = \{a, b\}$$, instead of speaking about coordinates number one or two you can speak about coordinates $$a$$ and $$b$$.

In some cases you have a natural choice which may camouflage this point, for example if $$I = \{1,2\}$$.

Does Halmos really say $$\prod_{i\in I}X_i$$ equals $$X_a\times X_b$$ where $$I=\{a,b\}$$? As in your counterexample, that's not true. But if you forget about what the elements of each set "are" and instead look at what information they convey, they convey essentially the same information and hence are the "same".

An element of $$\prod_{i\in I}X_i$$ is a (choice) function $$f:I\to\bigcup_{i\in I}X_i$$ s.t. $$f(i)\in X_i$$ for all $$i\in I$$. It picks out a single object from each $$X_i$$. And when $$I$$ is finite, say an $$n$$-element set, this is essentially the same information given by a $$n$$-tuple of $$\prod_{i\in I}X_i$$ (coincidentally also the notation for $$X_1\times X_2\dotsb X_n$$).

We identify $$X_a \times X_b$$ with $$\prod_{i \in I} X_i$$ with $$I=\{a,b\}$$ purely as sets they're not the same: tuples of pairs $$(x,y)$$ with $$x \in X_a, y \in X_b$$ are not the same as the set of functions $$f:\{a,b\} \to X_a \cup X_b$$ with $$f(a) \in X_a, f(b) \in X_b$$. They convey the same information, and everywhere you use one set, you can use the other, for practical purposes. It's just that you have an "ordered object" of a first thing from $$X_a$$ and a second thing from $$X_b$$. This can be expressed as a pair directly (and this is often done), and then you can define relations, functions, etc. etc. This works fine for two sets $$X_a$$ and $$X_b$$. But what about a product of three sets? There is no standard $$3$$-tuple "set" (recall that a pair $$(x,y)$$ is only a short hand for $$\{x,\{x,y\}\}$$, a la Kuratowski, but what we need is the notion that $$(x,y)=(x',y')$$ iff $$x=x'$$ and $$y=y'$$ for a pair to work. Like I said $$3$$-tuples don't have an easy Kuratowski-style definition that obeys the same equality property (that I know of) so $$X_1 \times X_2 \times X_3$$ is then arbitarily defined as either $$(X_1 \times X_2) \times X_3$$ or $$X_1 \times (X_2 \times X_3)$$, so pairs of sets, one of which consists of pairs again, and this works, sort of, but gets ugly for 4 or 5 etc. sets. Hence the "re-think": once we have functions and finite ordinals we can define a finite product as a set of fucntions on ordinals and as functions are determined uniquely by the images of the points, we get the same equality semantics: $$f,g: \{0,1\} \to A \cup B$$ are equal iff $$f(0)=g(0)$$ and $$f(1)=g(1)$$, so if we then demand that $$f(0)$$ always be in $$A$$ and $$f(1) \in B$$ we get a set (of functions) that has elements that behave just the same as ordered pairs $$(a,b)\in A \times B$$.

That is what Halmos means by "may be defined by"; i.e. you get the same kind of objects. There is also some discussion of this on the Wikipedia page for pairs, if you're interested.