# Associativity with infinite nesting

I was trying to understand the Eilenberg-Mazur swindle (which I learned about here) especially as it could be used to show that if $A, B$ are compact (topological) $n$-manifolds whose connect sum is $S^n$ (i,e. $A \# B= S^n$) then $A=B=S^n$.

The trick seems to make use of the fact that:

(1) The infinite connect sum (when properly defined) of spheres is a non-compact manifold with one end (indeed is euclidean space).

(2) The infinite connect sum is associative in that any placement of parentheses that are not infinitely nested does not change the infinite connect sum.

I was confused for a bit because if one allows for infinitely nested parentheses one seems to be able to get a non-compact manifold with an arbitrary number of ends. The idea here is that with infinitely nested parentheses one could add spheres "on alternating sides" and so produce a cylinder i.e. a manifold with two ends.

On the other hand, if one is looking at absolutely convergent sums of real numbers then it would appear that one can allow infinite nesting of parentheses without issue. Though I'm not clear on what happens for conditionally convergent sums.

My question is whether my intuition about what can go wrong with infinite nesting justified? (I am coming at it from a very geometric point of view which may be a problem). What is the right framework to think about when one is asking whether infinite nesting is possible or note? I could imagine there is some sort of abstract algebra/category theoretic context in which such things are studied.

I apologize if this is sort a trivial question but I haven't thought much about algebra in a long time. (P.S I didn't know how to categorize this question so made a rough stab at it).

First, it's important that the infinite connect sum $A\# B\#A\#\cdots$ is not the limit of the finite connect sums $A,A\#B, A\#B\# A,\dots$; in fact, I'm sure the binary connect sum is as wrong a notation for the infinite connect sum as $+$ is the wrong notation for $\sum$. Similarly, a conditionally-convergent infinite sum of numbers is the limit of a particular sequence: the initial finite sums; whereas an absolutely convergent sum of real numbers $x_i$ is a (sum of) limit(s) for much bigger diagrams: $$\sum x_i = \sup_{W\ \mbox{finite}} \sum_{i\in W} x_i + \inf_{V\ \mbox{finite}} \sum_{j\in V} x_j$$

Looking for a better description of our infinite connect sum, let's first note that $A\# B$ means a particular colimit $$\begin{array}{c} {} & & S^n & & \\\\ &\swarrow & & \searrow & \\\\ Q & & & & R \\\\ & \searrow & & \swarrow & \\\\ & & Q\sqcup_{S^n} R & & \end{array}$$ Note that $A$ and $B$ are also colimits, $A= Q \sqcup_{S^n} D$ and $B=D\sqcup_{S^n} R$. In fact, it's best to keep things open at both ends: for $X$ and two maps $S^n\rightrightarrows X$, let $Q = D\sqcup_{S^n}X$ and similarly define $R$ in terms of $Y$ and two maps.

Instead of the infiite connect sum, we have an infinite diagram $$\begin{array}{c} {} & & S^n & & & & S^n & & \\\\ &\swarrow & & \searrow & &\swarrow & & \searrow & & \swarrow \cdots \\\\ X & & & & Y & & & & X \\\\ \end{array}$$ and its colimit.

The two-ended construction you describe is (if I understand you correctly) a colimit for a different diagram. The fact that you'll get the homeomorphic spaces in the colimit spot for these two diagrams is a nontrivial fact, and is where you need to use the hypothesis $X\sqcup_{S^n} Y \simeq I\times S^n$.

In summary, to test your intuition, pay attention to what limit (or limits) you're considering, and then see if additional hypotheses let you decide on or against equivalence.