I have this theorem.
let $A$ and $B$ two closed sets of a topological space $E$, such that $A\cap B$ and $A\cup B$ are connected, then $A$ and $B$ are connected.
I want to prove it directly without contradiction.
To prove that $A$ is connected I let $f:A\to (\{0,1\},P(\{0,1\})) $ continuous and I must prove that $f$ is constant.
As $A\cap B$ is connected we deduce that $f: A\cap B\subset A\to \{0,1\}$ is constant
But I don't know how to continue? how to use that $A$ is closed?
Thank you.
Let $f:A\to \{0,1\}$ be a continuous function. Note that $f$ restricted to $A\cap B$ is a constant, say $0$. Define $$g:A\cup B\to \{0,1\},\,g(x)=\begin{cases}f(x),&x\in A\\0,&x\in B\end{cases}.$$ Note that $g$ is continuous and hence a constant function. Can you complete now?