Homeomorphisms and disjoint unions

Let $X$ and $Y$ be compact subsets of $\mathbb{R}^n$. Assume that $X \sqcup X \cong Y \sqcup Y$ (here $X \sqcup X$ is the disjoint union of two copies of $X$, considered as a topological space, and similarly for $Y \sqcup Y$). Then I'm pretty sure that we must have $X \cong Y$. This clearly holds if $X$ and $Y$ are connected, but I can't seem to prove it in general. Can anyone help me?

• I don't see a proof. I do see a counterexample which involves four copies of [0,1) , but that is not compact. Gerhard "Ask Me About System Design" Paseman, 2013.06.08 Jun 8, 2013 at 17:18
• Scratch that. My counterexample is not, and I am unsure that it could be massaged into one. Gerhard "Back To Your Regular Programming" Paseman, 2013.06.08 Jun 8, 2013 at 18:31
• If only you hadn't required the spaces to live in $\mathbb R^n$, I could simply cite my answer to an earlier question: mathoverflow.net/questions/26414 . But with the restriction to subsets of $\mathbb R^n$, all I can say is "interesting question". Jun 8, 2013 at 19:49
• @Andreas Blass : Yes, I was aware that there were counterexamples if you allowed sufficiently weird spaces (the sorts of spaces that show up in my nightmares; I try not to think about them).
– Sam
Jun 9, 2013 at 1:25
• Since one of the spaces that Andy Putman referred to has a lot of legs and shows up in nightmares I think it is safe to call this space a monster! Jun 13, 2013 at 11:43

These counterexamples are compact subsets of $\mathbb{R}^4$.
• The authors also mention that one can modify their construction to obtain an example in $\mathbb R^2$. Jun 13, 2013 at 7:40