0
$\begingroup$

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?

$\endgroup$
2
  • 1
    $\begingroup$ It's more intuitive to think of sequences as functions on the natural numbers, i.e. $a_n=f(n) $. $\endgroup$ Commented Sep 17, 2024 at 15:11
  • $\begingroup$ Yes, @John Douma, I'm toying with moving in that direction. $\endgroup$ Commented Sep 17, 2024 at 15:48

1 Answer 1

1
$\begingroup$

Strictly speaking, it is incorrect to identify $((a_i, b_j))_{(i, j)∈I×J}$ with $\mathcal{A} × \mathcal{B}$ because the first is an indexed family on $I × J$ while the second is the set of pairs of an element from an indexed family on $I$ and an element from an indexed family of $J$. So the problem in your reasoning is not in (1) but at "through the other way" when you assume what you're looking for can also be written $\mathcal{A} × \mathcal{B}$. However there is of course an obvious bijection between the two.

NB: $\bigcup_{i∈I} \{a_i\}×\{i\}$ is a bit of a weird notation for $\{(a_i, i), i ∈ I\}$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.