Recently I have been wrestling with the reasoning behind why clopen sets do not lead to contradictions when we define continuity in terms of open/closed sets, the topology of metric spaces, and other concepts, and I would appreciate some clarification as to what the reasoning is in the situations I have described below.
Definition 1: A function $f:M\to N$ (for $M,N$ metric spaces) is continuous if the preimage of each closed set in $N$ is closed in $M$.
For the following theorem we let $\mathcal{T}$ be the collection of all open sets of $M$.
Theorem: The topology $\mathcal{T}$ of a metric space $M$ has 3 properties: as a system it is closed under union, finite intersection, and it contains $M$ and $\emptyset$. That is
Every union of open sets is an open set
The intersection of finitely many open sets is an open set
$\emptyset$ and $M$ are open sets
For definition 1 we consider the constant function $f:\mathbb{R} \to \{c\}$ for some constant $c\in \mathbb{R}$. This obviously satisfies the $\epsilon{-}\delta$ condition and is continuous. But $\mathbb{R}$ is a clopen set, and we have that the preimage of $\{c\}$ is both open and closed, and the image is closed, so why do we ignore the fact that the preimage is also technically open when considering continuity for this function?
Similarly if $M$ in the context of part (3) of the theorem is both open and closed, why do we only consider the fact that it is open when determining whether it belongs to $\mathcal{T}$? I understand that being open is the only criteria for belonging to $\mathcal{T}$, but if being clopen doesn't exclude a set from being in the topology, why do we only specify that the sets are open when determining a criteria for belonging?