Let $(X,\tau)$ be a topological space. We assign to $(X,\tau)$ an equivalence relation $\simeq\_{(X,\tau)}$ in the following way:



> 
> 
> > 
> > $x\simeq\_{(X,\tau)} y$ if and only if there is a homeomorphism $\varphi:X\to X$ such that $\varphi(x) = y$.
> > 
> > 
> > 
> 
> 
> 


(Reflexivity, symmetry, and transitivity of this relation are easy to see.)


Given a non-empty set $X$ and an equivalence relation $\simeq$, is there a topology $\tau$ on $X$ such that $\simeq$ equals $\simeq\_{(X,\tau)}$?



Equivalence relation defined by the existence of a homeomorphism
I think the following works in quite a lot of situations:


* The equivalence relation $\cong$ induces a partition $\mathcal{P}$.
* Under AC we can well-order $\mathcal{P}$, and for every $P \in \mathcal{P}$, define $U\_{P} = \bigcup\_{Q < P} Q$.
* The $U\_{P}$ form a topology $\tau$, and for all $x,y \in P$, we have $x \cong\_{\tau} y$.


NB: It is clear that if $\mathcal{P}$ is countable, then this answers your question. (And we don't need AC.)


**Edit:** I changed the definition of $U\_{P}$ to $\bigcup\_{Q < P} Q$, as per Joseph van Name's comment below.




---


Problem: 
For the trivial equivalence relation $\cong$ on $\mathbb{R}$, this gives the long-line topology $\tau$, and $x \cong\_{\tau} y$, for all $x,y \in \mathbb{R}$.


**Edit:** The problem above is not a problem, because a well-ordering on $\mathbb{R}$ does not induce the long-line topology. See Eric Wofsey's comment below.


