# Extending a homotopy equivalence

I have a basic question regarding homotopy equivalence. Let $X$, $Y$, and $Z$ be three subsets of $\mathbb{R}^2$ such that $(X\cap Z)\subset (Y\cap Z)$ are homotopy equivalent, and $X\setminus Z = Y\setminus Z$. Can we say that $X$ and $Y$ are homotopy equivalent?

EDIT: There is a counter-example below with Z open. Do you think the statement would hold if Z (and maybe also X and Y) are assumed to be closed?

For example, let $Z\subset\mathbb R^2$ is unit open disc, $X\setminus Z = Y\setminus Z$ equal the boundary circle $S^1$, $Y\cap Z$ is all the disc interior without one point $(\frac13;0)$, and $X\cap Z$ is punctured disc with center $(\frac13;0)$ and radius $\frac23$. Note that both $X\cap Z$ and $Y\cap Z$ are homotopy equivalent (there exists deformation retraction), so all is correct.
Now, $X$ is equivalent to $S^1$, and $Y$ is equivalent to bouquet $S^1\vee S^1$.
• If I'm not mistaken, $X\cap \bar Z$ has two holes, while $Y\cap \bar Z$ has only one (I'm not sure that the hole in $(1/3,0)$ is useful in this example). Unless you mean that the boundary of the disc has to be removed from X and Y as well. Commented Jul 27, 2015 at 19:00
• The working example is following: you may take $Z=\{(x,y)\in\mathbb R^2:y\ge0\}$, $X$ is unit circle without (open or close, if you want) arc $[\frac13\pi;\frac23\pi]$, and $Y$ is all the circle with one separate point $(0,2)$. $X\cap Z$ and $Y\cap Z$ are homotopy equivalent to two points. Commented Jul 27, 2015 at 19:15