left and right euclidean;
The apartness relations that we discuss here are sometimes called point–point apartness, to distinguish this from the related concepts of set–set or point–set apartness relations; see proximity space and apartness space (respectively) for these.
A set equipped with an apartness relation is a groupoid (with as the set of objects) enriched over the cartesian monoidal category , that is the opposite of the poset of truth values, made into a monoidal category using disjunction. By the law of excluded middle (which says that is self-dual under negation), this is equivalent to equipping with an equivalence relation (which makes a groupoid enriched over the cartesian category itself). But in constructive mathematics (or interpreted internally), it is a richer concept with a topological flavour.
Of course, nobody but a category-theorist would use the above as a definition of an apartness relation. Normally, one defines an apartness relation on as a binary relation satisfying these three properties:
The negation of an apartness relation is an equivalence relation. (On the other hand, the statement that every equivalence relation is the negation of some apartness relation is equivalent to excluded middle, and the statement that the negation of an equivalence relation is always an apartness relation is equivalent to the nonconstructive de Morgan law.) An apartness relation is tight (see connected relation) if this equivalence relation is equality; any apartness relation defines a tight apartness relation on the quotient set. A tight apartness relation, also called an inequality, is often written instead of , but keep in mind that is not the negation of ; rather, is the negation of . (So inequality, when it exists, is more basic than equality.)
If and are both sets equipped with apartness relations, then a function is strongly extensional if whenever ; that is, reflects apartness. The strongly extensional functions are precisely the enriched functors between -enriched groupoids, so they are the correct morphisms. (Note that there is no nontrivial notion of enriched natural isomorphism, at least not when the apartness in is tight.)
By an inequality space, I mean a set equipped with a tight apartness relation. By a map, I mean a strongly extensional function between inequality spaces.
The category of inequality spaces has all (small) limits, created by the forgetful functor to Set. (For example, iff or .) Similarly, it has all finite coproducts, and it has quotients of equivalence relations. In fact, this category is a complete pretopos. It is not, however, a Grothendieck topos (or even a topos at all), because it doesn't have all infinite coproducts. (To be precise, the statement that it has all small coproducts, or even that it has a subobject classifier, seems to be equivalent to excluded middle.)
We can say, however, that it has coproducts indexed by inequality spaces, although to make this precise is a triviality. More interestingly, it has products indexed by inequality spaces; that is, it is (even locally) a cartesian closed category. In particular, given inequality spaces and , the set of maps from to becomes an inequality space under the rule that iff for some .
If you generalise from inequality spaces to allow non-tight apartness relations, then you get (at first) a different category. However, now you also have -morphisms which serve to identify unequal but equivalent (that is, not apart) elements of a space, so the resulting bicategory is equivalent to the category of inequality spaces.
Let be a set equipped with an apartness relation . Using , many topological notions may be defined on . (Often one assumes that the apartness is tight; this corresponds to the separation axiom in topology.)
If is a subset of and is an element, then is a -neighbourhood (or -neighborhood) of if, given any , or ; note that by irreflexivity. The neighbourhoods of form a filter: a superset of a neighbourhood is a neighbourhood, and the intersection of or (hence of any finite number) of neighbourhoods is a neighbourhood.
A subset is -open if it's a neighbourhood of all of its members. The open subsets form a topology (in the sense of Bourbaki): any union of open subsets is open, and the intersection of or (hence of any finite number) of open subsets is open.
The -complement of is the subset ; this is open by comparison. More generally, the -complement of any subset is the set , defined as:
This is not in general open, but you would use it where you would classically use the set-theoretic complement. However, if is open to begin with, then equals the set-theoretic complement.
If , then and . Thus, if is tight, then satisfies the separation axiom. Symmetry is important here; if we removed symmetry from the axioms of apartness (obtaining a quasi-apartness?) but retained tightness, then we would still get a topology, but it would not be . This is a version of the fact that failure of is given by a partial order (or a preorder if might also fail).
The antigraph of a function is
Recall that in ordinary topology, a function between Hausdorff spaces is continuous iff its graph is closed. Similarly, a function is strongly extensional iff its antigraph is open. (Then the graph of is the complement of the antigraph.)
One important topological concept that doesn't appear classically is locatedness; in an inequality space, a subset is located if, given any point and any neighbourhood of , either is inhabited (that is, it has a point) or some neighbourhood of (not necessarily ) is contained in . Note that every point is located. (For an example of a set that need not be located, consider , where is an arbitrary truth value. In an inhabited space, this set is located iff is true or false.)
Recall that, as Bill Lawvere taught us, a metric space is a groupoid (or -category) enriched over the category of nonnegative real numbers, ordered in reverse, and made monoidal under addition. (Actually, you get a metric only if you impose a tightness condition, although again you can recover this up to equivalence from the -morphisms. Furthermore, Lawvere advocated using instead of , and also dropping the symmetry requirement to get enriched categories instead of groupoids. Thus, he dealt with extended quasipseudometric spaces. These details are not really important here.)
There is a monoidal functor from to that maps a nonnegative real number to the truth value of the statement that . Accordingly, any (symmetric) metric space becomes an inequality space, and any function satisfying ) is strongly extensional.
The topological properties of metric spaces fit well with those of inequality spaces if you always work in this direction. For example, a set which is -open will also be -open, but not necessarily the other way around. Similarly, a (merely) continuous function between metric spaces is (still) strongly extensional.
In analysis, many spaces are given as gauge spaces, that is by families of pseudometrics; these also become inequality spaces by declaring that iff for some pseudometric in the family. (This will actually be a tight apartness iff the family of pseudometrics is separating.)
Classically, any uniform space may be given by a family of pseudometrics, but this doesn't hold constructively. In particular, a topological group may not be an inequality group (as in the next section). However, we can generalize a bit beyond gauge spaces: any uniformly regular uniform space becomes an inequality space by declaring that iff there is an entourage with . (If the uniform space is not uniformly regular, the result is merely an inequality relation, not an apartness.)
The constructive theory of proximity spaces is based on a generalisation of apartness relations (which here go between points) to an apartness relation between sets. These are called apartness spaces; just as apartness relations (between points) are classically equivalent to equivalence relations, so apartness spaces are classically equivalent to proximity spaces, with two sets being proximate if and only if they are not apart.
Of course, any apartness space has an apartness relation between points: and are apart iff and are apart.
Let be a set, regarded as a discrete locale, whose frame of opens is , the power set of . That is, the opens in the locale are precisely the subsets of the set . Since discrete locales are locally compact (every set is the union of its K-finite subsets), the locale product agrees with the spatial product, so that is also discrete and every subset of is open. Thus, the opens in the locale are precisely the subsets of . In particular, an equivalence relation on the set can be identified with an open equivalence relation (in Loc) on the discrete locale .
Thus, the following theorem gives a different precise sense in which apartness relations are dual to equivalence relations.
An apartness relation on a set is the same as a (strongly) closed equivalence relation on the discrete locale . Moreover, the apartness topology defined above is, as a locale, the quotient of this equivalence relation.
By definition, a (strongly) closed sublocale of a locale is one of the form , for some open . Thus, when is a discrete locale, a closed sublocale of is of the form for some subset of . This subset is the extension of the apartness relation, i.e. .
For the first claim, therefore, it remains to show that the three axioms of an equivalence relation for correspond to the apartness axioms for . Note that pullback along locale maps respects closed complements, i.e. . Thus, the pullback of along the twist map is the closed sublocale corresponding to the twist of , i.e. the set . Since is a contravariant order-isomorphism between the posets of open and closed sublocales, symmetry for is equivalent to symmetry for . Similarly, pulling back to along one of the three canonical projections gives the closed sublocale dual to the corresponding pullback of itself, and transforms unions to intersections; thus transitivity for is equivalent to comparison for . Finally, the pullback of along the diagonal is the closed sublocale dual to the similar pullback of , so to say that the former is all of is equivalent to saying that the latter is ; thus reflexivity for is equivalent to irreflexivity for .
Now, the quotient in of such an an equivalence relation in particular comes equipped with a surjective locale map from . Thus, it is a spatial locale and can be regarded as a topology on the set . Moreover, quotients in are constructed as equalizers in , so we have to compute the equalizer of the two maps , where is the frame of opens of regarded as a locale in its own right. Equivalently, this means the equalizer of the two maps , where is the nucleus corresponding to .
Now by definition, . Thus, the elements of this equalizer — which is to say, the opens in the locale quotient — are subsets of such that . Reexpressed in terms of , that means that for any we have . But since is symmetric, this is equivalent to the unidirectional implication , and since always implies itself, this is equivalent to , which is precisely the condition defining the open sets in the apartness topology above.
Recall that the negation of an apartness relation on is an equivalence relation on the set . This is the spatial part of the above closed localic equivalence relation, which in general (constructively) need not be itself spatial. The apartness relation is tight just when this spatial part is the diagonal. (By contrast, to say that the closed localic equivalence relation is itself the diagonal is to say that the discrete locale is Hausdorff, which is only true if has decidable equality.)
Another characterization of the -open sets is that is -open if , where is regarded as a subset of . Rephrased in terms of complementary closed sublocales, this says that is “closed under the equivalence relation” dual to . Thus, the closed sublocales of with its -topology (i.e. the formal complements of -open sets) correspond precisely to the closed sublocales of (the formal complements of arbitrary subsets of ) that respect this equivalence relation.
As a partial converse to the above theorem, if is a localically strongly Hausdorff topological space, meaning that its diagonal is a strongly closed sublocale, then the pullback of this diagonal to the discrete locale on the set of points of is a closed localic equivalence relation, hence an apartness, whose -topology refines the given topology. See this theorem. If we are given an apartness relation , it is unclear whether the -topology is localically strongly Hausdorff; but if it is, then the apartness relation resulting from this topology is stronger than the given .
The various subsets that appear in algebra (such as subgroups, ideals, and cosets) become less fundamental than certain subsets that are, classically, simply their complements. For example, a left ideal in a ring is a subset such that , whenever , and whenever . But a left antiideal in an inequality ring is an -open subset such that is false, or whenever , and whenever . (The -openness requirement is automatic if is strengthened to for all , using that the ring operations are strongly extensional.) Note that the complement of an antiideal is an ideal, but not every ideal can be constructively shown to be the complement of an antiideal; so antiideals are more fundamental than ideals, in an inequality ring.
Prime ideals are even more interesting. A two-sided antiideal (so also satisfying that whenever ) is antiprime (or simply prime if no confusion is expected) if and whenever . Now the complement of an antiprime antiideal may not be a prime ideal (as normally defined). But in fact, it is antiprime antiideals that are more important in constructive algebra. In particular, an integral domain in constructive algebra is an inequality ring in which the antiideal of nonzero elements is antiprime.
The localic perspective on apartness relations extends naturally to anti-algebra: an antiideal is the same as a closed ideal in a discrete localic ring that respects the closed equivalence relation corresponding to . Equivalently, this is a closed ideal of the -topology regarded as a (non-discrete) localic ring. The spatial part of this closed localic ideal is then the ordinary ideal complementary to the antiideal, and so on. Moreover, since unions of closed sublocales correspond to intersections of their open complements, an antiideal is antiprime exactly when its corresponding closed localic ideal is “prime” in an appropriate internal sense in Loc, namely that , where is the multiplication. The fact that the complement of an antiprime antiideal need not be prime in the usual sense corresponds to the fact that taking the spatial part of sublocales doesn’t commute with unions.
The notion of apartness as fundamental in metric spaces may be found in Errett Bishop’s Foundations of Constructive Analysis (1967) (or the 1985 edition with Douglas Bridges, Constructive Analysis). But as I recall, this doesn't introduce the concept in general; that came in Anne Troelstra's and Dirk van Dalen's Constructivism in Mathematics (1988). For apartness in algebra, see A Course in Constructive Algebra (also 1988), by Ray Mines, Fred Richman, and Wim Ruitenburg. A great reference for point-set topology in constructive mathematics is the Ph.D. thesis of Frank Waaldijk, Modern Intuitionist Topology (1996). Please note that I (Toby Bartels) have not read the algebra book.