TITLE: What distinguishes topological spaces from graphs?
QUESTION [9 upvotes]: Topology would not "work" if one reverted the "direction" in the definition of continuous maps $f$:
$$\text{open}(x) \rightarrow \text{open}(f(x))$$
It has to be
$$\text{open}(f(x)) \rightarrow \text{open}(x)$$
For graphs – among others – things look different. You can equally define graph homomorphisms as mappings $f$ satisfying
$$\text{R}(x,y) \rightarrow \text{R}(f(x),f(y))$$
or satisfying
$$\neg\text{R}(x,y) \rightarrow \neg\text{R}(f(x),f(y))$$
which is equivalent with
$$\text{R}(f(x),f(y)) \rightarrow \text{R}(x,y) $$

What is the lesson to be learned from this observation? What distinguishes topological spaces from graphs (with their respective "natural" morphisms)?

Is there another – maybe more categorical – formulation of this observation?

REPLY [3 votes]: Let's first have a look at graphs with edge-preserving maps and graphs with edge-reflecting maps. Given some graph $R$, we have the dual graph $\neg R$ which has edges exactly where $R$ has no edges. Then $f : R \to Q$ is edge-preserving iff $f : \neg R \to \neg Q$ is edge-reflecting. So, while we do have two different categories here, they are equivalent. Edge-preserving maps are exactly as interesting as edge-reflecting maps (for arbitrary graphs).
There is no corresponding self-dual in topology. If we exchange the open sets with the non-opens, we don't get a new topology. So continuous maps and open maps may differ. The reason why the continuous maps are the interesting ones is the existence of Sierpinski space $\mathbb{S} := (\{\bot,\top\}, \{\emptyset, \{\top\}, \{\bot,\top\})$. A subset of a topological space is open iff its characteristic function into $\mathbb{S}$ is continuous. The open functions don't have a similar way to recover the open sets. In fact, you can do topology by starting with the continuous functions and $\mathbb{S}$, and then deriving the rest (called synthetic topology).