# Does this category explain continuity?

I started study mathematics 1970 in the University of Stockholm and there where no courses in category theory at that time. The students were supposed to do self studies in category theory (and set theory), so I learned it from my own point of view: universal definitions and functors between mathematical structures on sets. When reading homological algebra and homology theory, categories of chain complexes and exact sequences extended my point of view a bit. However, I have always thought of constructs as subcategories of Set. In spite of being aware of the lack of consistency in the definitions of them as sets! A concrete classical structure is a set with a structure and from a category theoretical point of view, I recently realized, the objects in the category Grp isn't sets but rather pairs $(G,\cdot)$. While the morphisms might be considered as functions between the first component in the pairs. This is a little unsatisfactory for me since my interest of the category theory somewhat originated from the sets and the structure preserving functions.

There is a possibility, not to represent a group with a pair $(G,\cdot)$, but with the composition $G\times G\to G$. Then a morphism is defined by the commutative diagram (which reveal the form of the structure preserving functions for groups): $\require{AMScd}$ \begin{CD} G\times G@>f\times f>>G^\prime\times G^\prime\\ @V\mu VV @VV\mu^\prime V\\ G@>>f>G^\prime \end{CD} This is more natural in category theory and also make Grp to a subcategory of Set, since the morphism can be considered as a function $\mu\to\mu^\prime$, where $\mu,\mu^\prime$ are considered as relations. I wonder if there are "structured sets" that can't be naturally represented by one or more relations? Obviously, topological spaces are represented by relations $\text{cl}\subseteq \mathcal P(X)\times\mathcal P(X)$, where $\text{cl}$ is the Kuratowski closure operator and $\mathcal P$ is the contravariant power set functor. Now the corresponding idea for morphisms is the commutative diagram: $\require{AMScd}$ \begin{CD} \mathcal P(X)@<\mathcal P(f)<<\mathcal P(X^\prime)\\ @V\text{cl} VV @VV\text{cl}^\prime V\\ \mathcal P(X)@<<\mathcal P(f)<\mathcal P(X^\prime) \end{CD} and $\mathcal P(f)(S')=S\iff S=f^{-1}(S')$, why $\;\text{cl}\cdot\mathcal P(f)=\mathcal P(f)\cdot\text{cl}'$ (commutativity) if and only if

$$\text{cl}(f^{-1}(S'))=f^{-1}(\text{cl}'(S'))$$

and my question is if this is equivalent for $f$ being continuous?

No this is not equivalent to continuity. For a simple counterexample, let $X=\{0,1\}$ with the discrete topology, $X'=\{0,1\}$ with the indiscrete topology, and let $f$ be the identity map $X\to X'$. Then $f$ is continuous, but $\text{cl}(f^{-1}(\{1\}))=\{1\}$ and $f^{-1}(\text{cl}'(\{1\}))=\{0,1\}$.
Rather, continuity is equivalent to just the containment $\text{cl}(f^{-1}(S'))\subseteq f^{-1}(\text{cl}'(S'))$ holding for all $S'\subseteq X'$. Indeed, suppose this containment holds. Then for any closed $C\subseteq X'$, $\text{cl}(f^{-1}(C))\subseteq f^{-1}(\text{cl}'(C))=f^{-1}(C)$, which implies $f^{-1}(C)=\text{cl}(f^{-1}(C))$ is closed in $X$. Thus inverse images of closed sets are closed, and $f$ is continuous.
Conversely, suppose $f$ is continuous and $S'\subseteq X'$. Since $f$ is continuous, $f^{-1}(\text{cl}'(S'))$ is a closed set, and it clearly contains $f^{-1}(S')$. Since $\text{cl}(f^{-1}(S'))$ is the smallest closed set containig $f^{-1}(S')$, $\text{cl}(f^{-1}(S'))\subseteq f^{-1}(\text{cl}'(S'))$.
No. Let$X$ be any space, and let $f:X\to[0,1]$ be the constant function $f(x)\equiv 0$. Let $S=(0,1]$. Then $f$ is continuous, but
$$f^{-1}[\operatorname{cl}S]=X\ne\varnothing=\operatorname{cl}f^{-1}[S]\;.$$