I did not try to prove this, but my intuition says the following (let me know if this is wrong so I can remove it). Let $X$ be the Cantor set and $Y$ be the irrationals. Then $X\times \mathbb{R}$ is an $\mathbb{R}$-fold product of $\mathbb{R}$'s since $X$ is totally disconnected. For the same reason $Y\times \mathbb{R}$ is the same space. However, $X$ and $Y$ are distinct since one is compact and the other is not.
– Nicolas BourbakiJan 27 '23 at 11:37
No, $\mathrm{Cantor} \times \mathbb{R}$ and $(\mathbb{R}\setminus\mathbb{Q})\times \mathbb{R}$ are not homeomorphic. For instance, $[0,1]\times\mathbb{R}$ is a continuous image of the first, but not of the second (I think).
– Dan RustJan 27 '23 at 12:13
4
There are known counterexamples, which, I am fairly certain, have appeared on MSE. When I have time, I can try to find them. One fairly famous example is taking $X$ to be the Whitehead manifold and $Y=\mathbb{R}^3$.
– Jason DeVito - on hiatusJan 27 '23 at 12:34
Cantor set $\times \mathbb R$ is locally compact, $(\mathbb R \setminus \mathbb Q) \times \mathbb R$ is not. Hence they are not homeomorphic.
– UlliJan 27 '23 at 18:07