I work in a statistics-grounded scientific field, where sequences of data are processed to obtain a single result. Often, we have sequences of sequences, and often we need to perform operations on combinations of sequence elements—the equivalent of folds, zips, maps, etc. I am aware of category-theory descriptions of these types of operations, but I am wondering about an alternative approach that might be more approachable for my colleagues.
Given a sequence $(a_i)_{i\in I}$ where $a_i \in A$ (equivalently an indexed family?), I believe there is an isomorphism between it and a set $\mathcal{A}$ such that $$(a_i)_{i \in I} \simeq \mathcal{A} = \bigcup_{i \in I} \{(a_i,i)\} = \bigcup_{i \in I} \{a_i\} \times \{i\} \tag{1} \ .$$
where the $\{a_i\}$ and $\{i\}$ are singleton sets. This definition looks a lot like that of a disjoint union, preserving duplicate values of the $a_i$. Suppose, though, that I have another sequence $(b_j)_{j \in J}$ where $b_j \in B$ and I'd like to look at the combinations of $a_i$ and $b_j$, namely:
$$\left((a_i, b_j)\right)_{(i,j) \,\in\, I \times J} \simeq \bigcup_{(i,j) \,\in\, I\times J} \left\{\left[(a_i, b_j),(i,j)\right] \right\} = \bigcup_{(i,j) \,\in\, I\times J} \left(\{a_i\} \times \{b_j\}\right) \times \left(\{i\} \times \{j\}\right) \ . \tag{2}$$
My hope was that I could arrive at equation (2), though, the other way:
\begin{eqnarray} \mathcal{A} \times \mathcal{B} &=& \left[\bigcup_{i \in I} \{a_i\} \times \{i\}\right] \times \left[\bigcup_{j \in J} \{b_j\} \times \{j\}\right] \\ & = & \bigcup_{i \in I\\ j \in J} \left(\{a_i\} \times \{i\}\right) \times \left(\{b_j\} \times \{j\}\right) \tag{3} \end{eqnarray}
But equations 2 and 3 differ in the order of the sets in the Cartesian products.
The question: does that fact that equations (2) and (3) differ mean that equation (1) is just an invalid assumption--i.e. that I cannot represent a sequence as a set? Or should I claim equations (2) and (3) are "close enough" and equal up to an isomorphism? Or something altogether?