Artificial intelligent assistant

Union and intersection of deformation retracts Let $X$ be a topological space and $A,B,\tilde{A}, \tilde{B}\subset X$. Is it true in general that if $A$ is a deformation retract of $\tilde{A}$ and $B$ is a deformation retract of $\tilde{B}$, then $A\cup B$ is a def retract of $\tilde{A}\cup \tilde{B}$ and $A\cap B$ is a def retract of $\tilde{A}\cap\tilde{B}$? If this is not true in general, are there further conditions under which the statement is true?

No. Consider $\tilde A = S^1 \backslash \\{1\\}, \tilde B = S^1 \backslash -\\{ 1\\}$. Take $A = \\{-1\\}, B = \\{1\\}$. A circle does not deform retract onto the union of two points. I don't know about such conditions, as you can see you can easily "break" any nice space into smaller contractible spaces.

Edit : here is a counterexample for the second statement. You can take $\tilde A = A = \mathbb R^2 \backslash \\{(\frac{1}{2},0)\\}$, the deformation retract being identity. Now, take $\tilde B = D^2$ and $B$ is the closed disk with center the origin and radius $\frac{1}{2}$. $\tilde A \cap \tilde B = D^2 \backslash \\{\frac{1}{2}\\}$ so it's not contractible but $A \cap B$ is a closed disk minus a point on its boundary which is contractible. So $\tilde A \cap \tilde B$ does not deform retract on $A \cap B$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7c4f83218f10f5a36c53f6917e741428