Theorem: Let $(X,\tau)$ be a topological space. If there is no nonempty closed subsets $F$ and $G$ in $X$ such that $F\cap G=\emptyset$ and $X=F\cup G,$ then $X$ is connected.
Let's suppose X is no connected and let's see that there exist nonempty closed subsets $F$ and $G$ in $X$ such that $F\cap G=\emptyset$ and $X=F\cup G$.
As X is no connected, there exists open sets $U,V\in\tau$ such that $U\cap V=\emptyset$ , $X=U\cup V$ and both are nonempty sets...(1)
Notice that $U^c=V,V^c=U.$
Therefore $U$ and $V$ are closed. And by (1) the proof is done.
I did this proof and I don't know if it's correct. Could you check it and tell me please?