TITLE: Seeking a new, more natural definition of the cartesian product of sets
QUESTION [5 upvotes]: In "standard" set theory usually we have the definition $(a,b) := \{ \{ a \}
, \{a,b\}\}$, see for example wikipedia for other similar ones. Then if we set for two sets $A,B$
$$
 A\times B := \{ (a,b) : a \in A, b \in B \}
$$
we have $A \times (B \times C) \ne (A \times B) \times C$, just that they are in bijective correspondence (hence isomorphic as sets). If we further define
$$
 A^0 := \{\emptyset\}, \quad A^1 := A
$$
and $A^{n+1} := A^n \times A$. Again, with this definition we have $A^0 \times B \ne B$, just isomorphism). But for isomorphism any singleton set would work, so for example we could equally well define $A^0 := \{ A \}$, or $A^0 := \{ 1 \}$. So what makes the emptyset special here?
One definition that seems to work better might be the definition as functions as seen on wikipedia:infinite products. But for finite index sets $I$ the above one is usually presented. But still with the second definition, what is
$$
 \prod_{i \in I} X_i \times \prod_{j\in J} X_j?
$$
Guess it should be
$$
 \prod_{i \in I} X_i \times \prod_{j\in J} X_j
  = \{ f : \{1,2\} \to \prod_{i\in I} X_i \cup \prod_{j \in J} X_j \mid
      f(1) \in \prod_{i \in I} X_i, f(2) \in \prod_{j \in J} X_j \}
$$
But with this definition again we have $(A\times B) \times C \ne A \times (B \times C)$, as in $(A \times B) \times C$ we have functions $f : \{1,2\} \to (A\times B) \cup C$ and in $A \times (B \times C)$ functions $f : \{1,2\} \to A \cup (B \times C)$. But at least the definition $A^0 = \{ f : \emptyset \to \emptyset \} = \{\emptyset\}$ is natural.

So I do not like all the above constructions. Is there a construction of the cartesian product which gives
i) associativity,
ii) $A^0 \times A^n = A^n$
iii) and a natural choice for $A^0$?

The only one that comes to my mind might be to define equality just up to isomorphism (i.e. define the cartesian product modulo the notion of bijectivity), so then in essence we just compute with representations all the time (which by the way would raise many question about well-definiteness in most mathematics books where this is taken for granted, for example in multivariable calculus where $\mathbb R^n$ is interpreted as $n$-tuples and all the above is assumed without questioning it; which by the way is one of my motiviations to seek an alternative construction). But is there any more direct construction which does not suffer from the above drawbacks?
EDIT: Changed $(a,b) := \{a,\{a,b\}\}$ to $(a,b) := \{\{a,\}, \{a,b\}\}$; the former might be problematic due to the comments by Brian M. Scott.
EDIT 2: changes "$A^{n+1} := A^n \times A$ (still this is problematic as we do not have associativity).", see the comments.

REPLY [3 votes]: The other, "direct" construction is to define $A^n$ to be the set of all functions from $n = \{0,\ldots, n-1\}$ to $A$. This is not an inductive construction; $A^5$ is not defined from $A$ and $A^4$; $A^5$ is defined only from $5$ and $A$. 
Of course, the formal definition of "function" may already require a notion of "ordered pair", and the set of "ordered pairs" in that formal sense will usually not be the same as the set of functions from $2$ to $A$.  The formal definition of an "ordered pair" is likely to be something like the definition in the question above. 
But, if we like, we can use a definition of ordered pairs only for the purposes of defining functions, and use the definition $A^n$ from above to define "Cartesian products" only in terms of functions. 
In this direct construction, if $I$ and $J$ are disjoint, then
$$
\left (\prod_{i \in I} A_i \right ) \times \left (\prod_{j \in J} A_j \right )$$
would be defined as 
$$
\prod_{k \in I \cup J} A_k,
$$
that is, the set of functions $f$ with domain $I \cup J$ and so that $f(k) \in A_k$ for $k \in I \cup J$. If $I$ and $J$ are not disjoint, we need to make them disjoint first. 
In the "direct" construction $A^0$ is again $\emptyset$, and $A^0 \times A^n$ is equal to $A^n$, because it is
$$
\prod_{i \in \emptyset} A \times \prod_{i \in n} A = \prod_{i \in \emptyset \cup n} A = \prod_{i \in n} A.
$$