Take a set, S, and its powerset P(S). From the powerset of S, select a group of sets to be the “open” sets of a topology on S. These open sets can be any subsets of S, provided that S itself and the empty set are open, and that for any pair of open sets, their intersection is also an open set, and so is their union. We say that the open sets are closed under union and (finite) intersection.
Ordering the open sets by inclusion, we can see that they have a maximal element, S, and a minimal element, {}: every open set is included in S, and {} is included in every open set. We can also define the greatest lower bound of a pair of open sets, p and q, as the intersection of p and q (the “largest” open set that is included in both p and q), and their least upper bound (the “smallest” open set that includes both p and q) as their union. (These definitions also hold for finite sets of open sets).
We define the negation of an open set p as the least upper bound of all the open sets whose greatest lower bound with p is the empty set (the minimal element in our order). This is the union of all of the open sets whose intersection with p is empty.
Suppose that we start with the set S = {1, 2, 3}, and the open sets:
{}, {1}, {2}, {1, 2}, {2, 3}, {1, 2, 3}
In this topology, the negation of {2} is {1}, but the negation of {1} is {2, 3}. We can see that negation in a topology is not guaranteed to follow a classical logic, where not-not-p = p. We can distinguish “classical” from “non-classical” topologies based on whether the rule not-not-p = p holds or not. In the discrete topology where the open sets on S are just all the sets in P(S), the negation of any open set p is just the complement of p in S, so not-not-p is always equal to p. It’s interesting to consider which open sets we can remove from the discrete topology while preserving this property - as just shown, for example, removing {3} and {1, 3} from the discrete topology on {1, 2, 3} results in a “non-classical” topology.