Associativity of Cartesian Product I have a basic doubt about the associativity of the cartesian product. Well, first wikipedia says that the cartesian product isn't associative, and there's a good argument for it: if $x\in E$, $y\in F$ and $z \in G$ the identity $((x,y), z)=(x,(y,z))$ would imply that $(x,y) =x$ and $(y,z) = z$ so that $((x,y),z)=(x,y,z)$ would mean nothing.
That's fine, I like this argument. However, in his book Calculus on Manifolds, Spivak says that the cartesian product is associative. He says: if $A \subset \mathbb{R}^m$, $B\subset \mathbb{R}^n$ and $C \subset \mathbb{R}^p$ then $(A\times B)\times C = A \times (B \times C)$, and both of these are denoted simply by $A \times B \times C$.
Well, this confuses me because Spivak is always very rigorous, so that he wouldn't state something that's not true in such way. Is Spivak or Wikipedia right ? Or Spivak's statement only works for subsets of euclidean spaces ?
Thanks in advance and sorry if this question is too basic.
 A: At the most formal set-theoretic level they are not truly the same.
For example, $(\{1\}\times\{2\})\times\{3\}$ is the set whose only element is $\langle\langle 1,2\rangle,3\rangle$, and $\{1\}\times(\{2\}\times\{3\})$ is the set whose only element is $\langle 1,\langle 2,3\rangle\rangle$. And those two only elements are not the same.
On the other hand, it can be extremely convenient to view both of $\langle\langle 1,2\rangle,3\rangle$ and $\langle 1,\langle 2,3\rangle\rangle$ as alternative representation of the same "ideal thing" which is an ordered sequence of three numbers, written $\langle 1,2,3\rangle$.
As long as everything we deal with is either numbers or ordered sequences of numbers it is possible to define $A\times B$ such that if either of $A$ and $B$ is a set of numbers (rather than sequences) then we first replace it with the corresponding set of one-element sequences, and then $A\times B$ means the set of all concatenations of a sequences from $A$ in front of a sequence from $B$. With that interpretation we do indeed get identity between $(A\times B)\times C$ and $A\times (B\times C)$.
However, Cartesian products are useful for many other things than numbers, and it is fairly tricky and tedious to formalize exactly how the sequence-concatenating Cartesian product works in full generality such that all of the cases we'd want to use the concept in is covered. For example, what if one of the set has members that are things that we already represent as pairs of something, but we want to ignore that implementation detail while working with them at a higher abstraction level? This might well be the case even for numbers -- one popular implementation of the real numbers as Dedekind cuts represent each real number as a pair of two sets of rationals. We certainly don't want those pairs to collapse a member of $\mathbb R\times \mathbb R$ into an ordered sequence of four subsets of $\mathbb Q$!
The nitty-gritty of getting such details to work completely formally is not generally worth the trouble. Here's a case where it really is so much easier simply to "know what one is doing" than to get formulas following mindless rules to know it, that noone (even Spivak) bothers to be 100% formal.
Instead of formulating airtight formal rules about Cartesian products, one then imagines one of two things:

*

*That the Cartesian products are always sequence-concatenating products, and that an invisible "make a set of things into a set of lengh-1 sequences of things" operator is implied in formulas where it is necessary for the math to make sense (but not in any other places).


*That $(A\times B)\times C$ and $A\times(B\times C)$ are not exactly identical, but are related by an invisible bijection that is implied in formulas whereever it is necessary for the math to make sense. (This is somewhat more general than the previous solution because the implicit-bijection idea can be used to dispose of a lot of other boring problems similar to this one, whereas the sequence-concatenation idea is specific to Cartesian products).
It is tacitly expected of students that they'll eventually learn enough to know how one could in principle make the invisible fix-it-up operators visible everywhere, though actually doing so brings no real reward and so is rarely done.
We are, after all, mathematicians. Knowing that a solution exists is enough for us.

The mathematician sees the tweezers and the bag of carrots, exclaims "Aha! A solution exists!" and goes back to bed.

