First I’ll give you the answer: a function is continuous if and only if . To be a little more clear, let’s write for . Then . That is, a continuous function preserves the limits — and more generally the accumulation points — of all nets. Now this looks a lot more like algebra than that messy business of pulling back open sets!
We can even get a little finer and say that a function is continuous at a point if every net in that converges to gets sent to a net in converging to . Then we say that a function is continuous if it is continuous at all points of . This should remind us of how we defined continuity at a point by using neighborhood systems, and so we’ll show the equivalence of that definition of continuity and our new one.
So, let and have the neighborhood systems and , respectively. We’ll assume that for every neighborhood there is a neighborhood with . Now if we take a net converging to , we must show that is eventually in for all . But for each such neighborhood of we have a neighborhood , and we know that is eventually in . Then must be eventually in , and so converges to .
On the other hand, let’s suppose that there is some neighborhood of so that no neighborhood of completely fit into . We’ll construct a net converging to , but whose image doesn’t converge to . For our directed set we take the neighborhood filter itself, ordered by inclusion. That is, if . Then since there must be some point with . We pick any such point as the value of our net at . Clearly the net is eventually in every neighborhood of , and so the net converges to . But just as clearly, since is not eventually in , the image net can’t converge to .
So nets give us a very “algebraic” picture of topological spaces. A topological space is a set equipped with a (partially-defined) rule that sends every convergent net to its limit point in , and continuous maps are those which preserve this rule. Still, there’s something different here. Since taking the limit only works on some nets, this “preservation” is to be read in a more logical sense: if the net converges then the image net converges, and we know the answer. However, the image net could easily converge without the original net converging, and then we have no idea what its limit is. This is in contradistinction to the case for algebraic structures, where the algebraic operations are always defined and the connection between source and target structures feels a lot tighter.
There’s also a tantalizing connection to category theory, in that our directed sets are categories of a sort. Clearly I’d like to think of a net as some sort of functor, and the limit of a net as being the limit of this functor. But I don’t really see what the target category should be. I could take objects to be points of , but then what are the morphisms? And if the objects aren’t points of , what are they? How does this process of taking a limit correspond to the categorical one?