TITLE: Why use open sets in definitions?
QUESTION [7 upvotes]: I've been wondering why do we use mostly open sets in mathematics to define numerous things. For example continuity is defined using (open) neighbourhoods, differentiability and Taylor's theorem is defined using open sets for the point $x$, mean value theorem etc.
What is the intuition behind using open sets instead of closed or even compact sets? What problems do we ran into if using closed sets instead of open sets?

REPLY [2 votes]: What problems do we ran into if using closed sets instead of open sets?
Problems: None.
It is just convenient und leads to less cumbersome notation if we use open sets in our definitions and theorems.
Say that the following property of a function $f$ is useful: $f:X\rightarrow Y$ is locally constant iff for every $x \in X$ there is an open set $U \subseteq X$ such that $x\in U$ and $f|U$ is constant.
Very intuitive, visual. It is only a matter of taste that we don't use:
$f:X\rightarrow Y$ is locally constant iff for every $x \in X$ there is a closed set $C \subseteq X$ such that $x\notin C$ and $f|_{X\setminus C}$ is constant.