Do the connected sets determine the topology in the case of manifolds? Let $f:M\to S$ be a bijection between two spaces, at least one of which (without loss of generality, $M$) is known to be a manifold. Suppose $f$ preserves and reflects connected sets, meaning $X\subseteq M$ is connected iff $f(X)$ is connected. Must $f$ be a homeomorphism?
It seems to me that the answer is yes, but I'm having trouble formalizing the argument. I think if we prove this for $M=\Bbb R^n$ then we can conclude it for all $n$-manifolds. I believe I have a proof for $n=1$, but I'm having trouble with $n=2$.
 A: Here is a counterexample for any $M$ of positive dimension.  Fix a point $x\in M$ and a sequence of distinct points $(x_n)$ that converges to $x$.  Let $T=\{x_n:n\in\mathbb{N}\}$ and $S$ be $M$ with its topology enlarged to make $T$ closed.  Explicitly, a subset $U$ of $S$ is open iff is of the form $V\cup (W\setminus T)$ where $V$ and $W$ are open in $M$.  I claim that $M$ and $S$ have the same connected sets.  Since the topology of $S$ is finer, any $S$-connected set is trivially $M$-connected.
Conversely, suppose $A\subseteq S$ is $S$-disconnected but $M$-connnected.  If $x\not\in A$ then this is trivial since the topologies are the same, so we may assume $x\in A$.  Let $B\subseteq A$ be a nontrivial $S$-clopen subset, which we may assume contains $x$ (otherwise, take its complement).  So $B$ contains $A\cap (U\setminus T)$ for some $M$-open neighborhood $U$ of $x$.  If $x_n\in A\cap U$, then since $A$ is $M$-connected, $x_n$ is not isolated in $A$, so $A\cap (U\setminus T)$ contains points that are arbitrarily close to $x_n$.  So since $B$ is $S$-closed, $x_n$ must be in $B$, so $B$ actually contains all of $A\cap U$.  That is, $B$ actually contains an $M$-open neighborhood of $x$ in $A$, and so $B$ is $M$-open in $A$.  Since $x\in B$, $B$ is also $M$-closed in $A$, so $B$ is $M$-clopen in $A$, contradictig the assumption that $A$ was $M$-connected.
(More generally, this construction works if $M$ is any topological space with a subset $T$ that has exactly one accumulation point $x$.)
