Proof verificication and question of rigour: $A$, $B$, connected implies union is connected Don't mark this as duplicate. The other question does not help me figure out how rigorous MY proof is.
Problem:
Let $A$ and $B$ be connected subsets of a metric space and let $A\cap\overline{B}\neq\emptyset$. Prove that $A\cup B$ is connected.
Answer:
$A\cup B$ is connected if any continuous function $f:A\cup B\rightarrow{0,1}$ is constant. But $A$ and $B$ are connected so $f|_A$ and $f|_B$ are constant.
Now the part I'm not sure off:
$\forall b \in \overline B$ let there be a sequence $(x_n)\to b_0$ where $x_1 = b$ and $b_0 \in B$. Then because $f$ is continuous we conclude that $f|_\overline{B} = f|_{B}$.  
How can I make the above more convincing?
Then let $z \in A\cap\overline{B}\neq\emptyset$ and we see that $f|_A(z) = f|_B(z)$ so $f|_{A\cup B}$ is constant.
 A: You’re looking in the right general direction, but you’ve pretty much got the argument organized back to front. Starting with a continuous function $f:A\cup B\to\{0,1\}$ is fine; you know that $f$ is constant on $A$ and on $B$, and you want to show that it must be constant on $A\cup B$. In other words, you know that there are $a,b\in\{0,1\}$ such that $f(x)=a$ for each $x\in A$, and $f(x)=b$ for each $x\in B$, and you want to show that $a=b$.
It’s at this point that you want to use the fact that $A\cap\operatorname{cl}B\ne\varnothing$ to pick a point $z\in A\cap\operatorname{cl}B$. On the one hand you have $f(z)=a$, because $z\in A$. If you could show that $f(z)=b$ as well, you’d be done: that would show that $a=b$ and hence that $f$ is constant. And since $f$ was an arbitrary continuous function from $A\cup B$ to $\{0,1\}$, that would show that $A\cup B$ was connected. So how can we show that $f(z)=b$?
Now you can use the fact that there must be a sequence $\langle x_n:n\in\Bbb N\rangle$ in $B$ that converges to $z$ and conclude that since $f$ is continuous, $\langle f(x_n):n\in\Bbb N\rangle$ converges to $f(z)$. And $f(x_n)=b$ for each $n\in\Bbb N$, so $f(z)=b$, and we’re done.
An aside: This argument uses the hypothesis that the space is metric: in non-metric spaces there might not be a sequence in $B$ converging to $z$. However, the result is true even if the space is not metric: in any space the closure of a connected set is connected, so $\operatorname{cl}B$ is connected, and therefore $f\upharpoonright\operatorname{cl}B$ must be constant.
A: The function $f$ is not defined over $\overline{B}$, but it is over $A\cap\overline{B}$. However, your argument can be easily fixed.
Take $x\in A\cap\overline{B}$, which exists by assumption. Since you're in a metric space, there is a sequence $(x_n)$ in $B$ converging to $x$.
If $a$ is the common value of $f$ on $A$ and $b$ is the common value of $f$ on $B$, you have
$$
a=f(x)=\lim_{n\to\infty}f(x_n)=b
$$

You can avoid sequences, though.
Let $a$ be the common value of $f$ on $A$ and $b$ the common value of $f$ on $B$. Since $f$ is continuous, $f^{-1}(\{b\})$ is closed in $A\cup B$, and, in particular, $f^{-1}(\{b\})$ contains $A\cap\overline{B}$ (prove it). Thus, if $x\in A\cap\overline{B}$, you have $a=f(x)=b$.
