# prove that $A\cup B$ is connected

i have two disjoint connected sets $A,B$ such that $\overline{A}\cap B\neq \emptyset$, how to prove that $A\cup B$ is connected? "Using the continuous function)

let $f: A\cup B\to \{0,1\}$ a continuous map, and we have to prove that it is a constant map.

let $a,b\in A\cup B$ if $a,b\in A$ then $f(a)=f(b)=cst$ because A is connected, and the same thing when $a,b\in B$

now if $a\in A$ and $b\in B$ how to prove that $f(a)=f(b)$?

how to use in this case the fact that $\overline{A}\cap B\neq \emptyset$ ?

Let $p\in \overline A\cap B$. By continuity of $f$, the set $f^{-1}(f(p))$ is an open neighbourhood of $c$, hence intersects $A$. Hence there are some points in $q\in A$ with $f(q)=f(p)$. As $f|_A$ is constant, $f(x)=f(p)$ for all $x\in A$. As $f|_B$ is constant, $f(x)=f(q)$ for all $x\in B$. As $f(p)=f(q)$, we conclude that $f$ is constant.

• a neighbourhood of p ? h – Poline Sandra Sep 11 '18 at 20:10
• can you tel me what is c? – Poline Sandra Sep 11 '18 at 20:17
• where we use the intersection $f^{-1}(f(p))\cap A\neq\emptyset$ please answer me – Poline Sandra Sep 12 '18 at 17:52

Note that by connectedness of $A$ and $B$, and by the fact that restrictions are continuous, the restrictions $f_A$ and $f_B$ are both constant. If $f_A = f_B$, we are done.

Otherwise, without loss of generality suppose that $f_A \equiv 1$ and $f_B \equiv 0$. This is absurd, because taking $x \in \bar{A} \cap B$ guarantees a net in $A$, $(x_\alpha)_{\alpha}$ so that $x_\alpha \to x$, which by continuity would imply

$$1 = \lim_\alpha f_A(x_\alpha) = \lim_\alpha f(x_\alpha) = f(x) = 0$$

since $x \in B$ and $x_\alpha \in A$ for any $\alpha$.

First note that if $f: A \cup B \to \{0,1\}$ is continuous so is $f|A$, and as $A$ is connected $f|A$ has constant value $i_A \in \{0,1\}$ so that $f(x) = i_A$ for all $x \in A$.

Similarly $\exists i_B \in \{0,1\}$ such that for all $x \in B$: $f(x) = i_B$, or $f[B] = \{i_B\}$.

Let $p \in \overline{B} \cap A$. Then by continuity of $f$: $f(p) \in f[\overline{B}] \subseteq \overline{f[B]} = \overline{\{i_B\}} = \{i_B\}$ as $\{0,1\}$ is discrete. So $f(p) = i_B$ but $p \in A$ gives $f(p) =i_A$ so that $i_A = i_B$ and thus $f$ is constant on $A \cup B$, and $A \cup B$ is connected.