I've heard the result before that the theory of topologies cannot be expressed as a first-order theory, but I can come up with a simple multisorted theory that seems to capture the open set axiomatization of a topology.
I'm familiar with the statement that the theory of topologies isn't first order mostly as a quick way to demonstrate that first-order logic doesn't capture every theory we might be interested in (similar to referencing torsion groups).
I'm curious whether this attempt at a first-order theory for a single topology succeeds or fails, and what extra subtlety there is in the statement "topologies are not a first-order theory".
This axiomatization uses variations of the axioms and axiom schemas in the simple theory of types and the set theory NFU.
Multiple sorts can be paraphrased away into predicates giving us a single-sorted theory at the cost of some verbosity.
First, we have three sorts. $X$ is the sort of the underlying topological space, $S$ for "set" is the sort corresponding to $2^X$ informally and $F$ for "family" is the sort corresponding to $2^{2^X}$ informally.
I will now attempt to construct a theory of topology. The sorts are as above and there are three predicate symbols. $\in$ is a predicate symbol corresponding to the elementhood relation. $O$ is a unary predicate on $S$ that identifies open sets and $O^F$ is a unary predicte on $F$ that identifies families of open sets.
First, we have two axiom schemas of comprehension.
Comprehension from $X$ to $S$.
$$ \exists s : S \mathop. \forall x : X \mathop. x \in s \leftrightarrow \varphi(x) $$
Comprehension from $S$ to $F$.
$$ \exists f : F \mathop. \forall s : S \mathop. s \in f \leftrightarrow \varphi(x) $$
And we have two axioms of extensionality, one for each level.
$$ \forall a : S \mathop. \forall b : S \mathop. (\forall x : X \mathop. x \in a \leftrightarrow x \in b) \to a = b $$
$$ \forall a : F \mathop. \forall b : F \mathop. (\forall s : F \mathop. s \in a \leftrightarrow s \in b) \to a = b $$
For the remaining cases I'll omit sort annotations for the sake of brevity. These axioms should be understood to apply at both the $S$ and $F$ levels.
Definition of the complement
$$ \forall x \mathop. \forall a \mathop. a \in x^c \leftrightarrow a \not\in x $$
Definition of binary intersection
$$ \forall a \mathop. \forall b \mathop. \forall x \mathop. (x \in a \cap b) \leftrightarrow (x \in a \land x \in b) $$
Definition of binary union
$$ \forall a \mathop. \forall b \mathop. \forall x \mathop. (x \in a \cup b) \leftrightarrow (x \in a \lor x \in b) $$
The definition of arbitrary union applies only to $F$.
$$ \forall f \in F \mathop. \forall x \in X \mathop. (x \in \cup f) \leftrightarrow (\exists b : S \mathop. x \in b \land b \in f) $$
$O^F$ is defined as follows. A family of open sets is a family of sets where every set is open.
$$ \forall f : F \mathop. O^F(f) \leftrightarrow (\forall s : S \mathop. s \in f \to O(s)) $$
And, finally the axioms of topology.
The empty set is open. $\varnothing$ is a constant in sort $S$.
$$ O(\varnothing) $$
The whole space is open. $X$ is a constant in sort $S$.
$$ O(X) $$
Open sets are closed under binary intersection.
$$ \forall a : S \mathop. \forall b : S\mathop. O(a) \land O(b) \to O(a \cap b) $$
Open sets are closed under arbitrary union.
$$ \forall f : F \mathop. O^F(f) \to O(\cup f) $$
This completes the multisorted axiomatization of topological space.