1 Introduction

In his 1952 paper “Homology Groups of Relations” [7], Dowker associated a simplicial complex, the Dowker complex \(D(R)\), to every relation, that is, to every subset \(R\) of the product \(X \times Y\) of some sets \(X\) and \(Y\).

In this paper, we define the rectangle complex \(E(R)\) of a relation R to be the simplicial complex with vertex set \(R\) whose simplices are all subsets of non-empty rectangles in \(R\), where by a rectangle we mean a subset of \(R\) of the form \(U \times V\) for \(U \subseteq X\) and \(V \subseteq Y\). The projection \(X \times Y \rightarrow X\) restricts to a map \(\pi _R :R \rightarrow X\), and this map induces a map \(\pi _R :E(R) \rightarrow D(R)\) of simplicial complexes. Our Theorem 4.3 states that \(\pi _R :E(R) \rightarrow D(R)\) is a homotopy equivalence. This result is an easy consequence of Quillen’s Theorem A [11, Prop. 1.6] and the Borsuk Nerve Theorem [5, Cor. 9.3].

Dowker’s Theorem [3, Thm. 10.9] states that the Dowker complex of the relation \(R\) is homotopy equivalent to the Dowker complex of the transpose relation \(R^T \subseteq Y \times X\) consisting of pairs \((y,x)\) with \((x,y) \in R\). A functorial version of Dowker’s Theorem is a direct consequence of Theorem 4.3. To our best knowledge, this is a new proof of Dowker’s Theorem. Dowker originally showed that D(R) and \(D(R^T)\) have isomorphic homology groups [7, Thm. 1], which was strengthened by Björner [3, Thm. 10.9].

On a historical note, the work of Dowker was picked up by Atkin in the 60s in the field of social science under the name Q-theory [1]. Since the 80s, relations are studied in the field of formal concept analysis (FCA). A relation \(R\) (called the formal context) is studied through its maximal rectangles (called the formal concepts). The formal concepts form a lattice (called the concept lattice) which is studied in great detail (see, e.g., Ganter and Obiedkov [9] for an introduction to FCA). Several papers relate the work of Dowker to FCA. For example, Freund et al. [8] use the concept lattice to find a strong deformation retract of the Dowker complex, and Ayzenberg [2] shows that the classifying space of the concept lattice (removing its initial and terminal point) is homotopy equivalent to the Dowker complex. Ayzenberg also gives an elegant proof of the Nerve Theorem. With the rise of topological data analysis (TDA) in the 2000s, Dowker’s work has received increased attention, since the Dowker complex generalizes the nerve of a cover, and the Čech and Rips complexes are instances of nerves of covers. This has been elaborated on by Blaser and Brun [4], and Virk [13]. Chowdhury and Mémoli [6, Thm. 3] stated a functorial version of Dowker’s Theorem that applies in the study of filtered simplicial complexes, and the functorial Dowker theorem has since been generalized by Virk [13].

In Sect. 2, we formally define relations and their Dowker complex. In Sect. 3, we introduce the rectangle complex. In Sect. 4, we present a homotopy equivalence from the rectangle complex of a relation to its Dowker complex. In Sect. 5, we prove a strong version of Dowker’s Theorem. Finally, in Sect. 6, we give concluding remarks.

2 Relations and the Dowker Complexes

In this section, we give the prerequisite definitions of relations and simplicial complexes. We also define the Dowker complex, which is a way of constructing simplicial complexes from relations.

Definition 2.1

A relation is a triple of sets (RXY) where \(R\subseteq X\times Y\).

Definition 2.2

A morphism of relations \(f:(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\) is a pair of functions \(f=(f_1:X_0\rightarrow X_1,f_2:Y_0\rightarrow Y_1)\), such that \((x,y)\in R_0\) implies \((f_1(x),f_2(y))\in R_1\).

If we take pair-wise composition of morphisms, we inherit associativity and identities from the category of sets; in particular, we have \(\text {Id}_{(R,X,Y)}=(\text {Id}_X,\text {Id}_Y)\). We write \(\texttt {Rel}\) for this category of relations.Footnote 1

Definition 2.3

A simplicial complex is a pair (KV) consisting of a vertex set V together with a set K of finite subsets of V closed under inclusions, i.e., if \(\sigma \) is in K and \(\tau \subseteq \sigma \), then \(\tau \) is also in K.

An element \(\sigma \in K\) is called a simplex. A simplicial map F from (KV) to \((K',V')\) is a function on vertex sets \(F:V\rightarrow V'\), such that \(\sigma \in K\) implies \(F(\sigma ):=\{F(s)\,|\,s\in \sigma \}\in K'\). Composition of simplicial maps is given as the composition of functions. We denote the category of simplicial complexes by \(\texttt {Cpx}\). Each simplicial complex (KV) has an associated topological space |K| called its geometric realization [12, 3.1.14].

Definition 2.4

[7, p. 85] The Dowker complex of a relation (RXY) is the simplicial complex (D(R), X), where

$$\begin{aligned} D(R)=\{\sigma \subseteq X\,|\,\exists y\in Y \text { with } \sigma \times \{y\}\subseteq R\}. \end{aligned}$$

We say that the simplex \(\sigma \in D(R)\) is witnessed by \(y\in Y\) if \(\sigma \times \{y\}\subseteq R\). Note that \(D:\texttt {Rel}\rightarrow \texttt {Cpx}\) is a functor, taking a morphism \(f=(f_1,f_2):(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\) of relations to the simplicial map \(D(f):D(R_0)\rightarrow D(R_1)\) induced by the function \(f_1:X\rightarrow X'\) of vertex sets.

Dowker’s Theorem compares the Dowker complex of a relation (RXY) to the Dowker complex of the transpose relation \((R^T,Y,X)\) defined as follows:

Definition 2.5

Given a relation (RXY), the transpose relation \((R^T,Y,X)\) is the relation where \((y,x)\in R^T\) if and only if \((x,y)\in R\).

3 The Rectangle Complex

In this section, we introduce basic building blocks of relations, and use them to construct a simplicial complex. We start with some general notions.

Definition 3.1

A rectangle of a relation \((R,X,Y)\) is a finite subset of \(R\) of the form \(U \times V\) with \(U\subseteq X\) and \(V\subseteq Y\).

A rectangle \(U\times V\) in R is a formal concept if it is inclusion-maximal, namely if \(U\times V\subsetneq U'\times V'\), then \(U'\times V'\not \subseteq R\). Formal concepts are the main objects of interest in the field of formal concept analysis (see [9] for an introduction). An algorithm for computing formal concepts has been found by Norris [10] among others. For a relation \((R,X,Y)\), the first-coordinate projection is the function \(\pi _R: R\rightarrow X\), where \(\pi _R(x,y)=x\). Similarly, the second-coordinate projection \({\widehat{\pi }}_R: R\rightarrow X\) sends (xy) to y.

Definition 3.2

(The rectangle complex) Let \((R,X,Y)\) be a relation with coordinate projections \(\pi _R :R \rightarrow X\) and \({{\widehat{\pi }}}_R :R \rightarrow Y\). The rectangle complex of \((R,X,Y)\) is the simplicial complex \((E(R),R)\) with vertex set \(R\) and simplices given by the subsets of R contained in a rectangle of R. That is

$$\begin{aligned} E(R) = \{\tau \subseteq X\times Y\,|\, \pi _R(\tau ) \times {{\widehat{\pi }}}_R(\tau ) \subseteq R\}. \end{aligned}$$

Note that \(E:\texttt {Rel}\rightarrow \texttt {Cpx}\) is a functor taking a morphism \(f=(f_1,f_2):(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\) of relations to the simplicial map \(E(f):E(R_0)\rightarrow E(R_1)\) with \(f|_{R_0}:R_0\rightarrow R_1\) as vertex map.

For a relation \((R,X,Y)\), the first-coordinate projection \(\pi _R: R\rightarrow X\) defines a simplicial map

$$\begin{aligned} \pi _R: E(R)\rightarrow D(R). \end{aligned}$$
(1)

To see that this is indeed simplicial, we note for \(\tau \in E(R)\) the simplex \(\pi _R(\tau )\) is witnessed by every element \(y\in {\widehat{\pi }}_R(\tau )\), and is thus a simplex in the Dowker complex. For every morphism of relation \(f=(f_1,f_2):(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\), the diagram

figure a

commutes. In particular, the collection of all \(\pi _R\) defines a natural transformation \(\pi :E\rightarrow D\). In the next section, we continue to show that \(\pi _R\) is a homotopy equivalence for all relations R.

Figure 1 shows the two Dowker complexes \(D(R)\) and \(D(R^T)\) and the rectangle complex E(R) of the relation \((R,X,Y)\) with \(X = \{a,b,c,d\}\), \(Y = \{1,2,3,4\}\) and \(R = \{(a,2),(a,4),(b,1),(b,2), (c,1), (c,4), (d,1), (d,3)\}\).

Fig. 1
figure 1

The relation R is given by the circled points in \(X\times Y\), where \(X=\{a,b,c,d\}\) and \(Y=\{1,2,3,4\}\). Here, (i) is the Dowker complex D(R), (ii) is the Dowker complex \(D(R^T)\), and (iii) is the rectangle complex E(R) whose vertex set is R (we write 1d for (1, d), etc.). Note how the hole \(\{1c,4c,4a,2a,2b,1b\}\) maps onto the hole \(\{c,a,b\}\) by \(\pi _R\) and onto the hole \(\{1,4,2\}\) by \({\widehat{\pi }}_R\), hinting that the maps \(\pi _R\) and \({\widehat{\pi }}_R\) are homotopy equivalences

4 The Rectangle Complex and the Dowker Complex are Homotopy Equivalent

If K is a simplicial complex, then \(K_\subseteq \) is a partially ordered set, and its order complex is the barycentric subdivision of K. It is well known that the barycentric subdivision of K is homeomorphic to K itself [12, 3.3.9].

For an order-preserving map \(f:P_\le \rightarrow Q_\le \), we define its fiber at \(q\in Q_\le \) to be the partially ordered subset

$$\begin{aligned} f/q = \{p\in P_\le \,|\, f(p)\le q\}. \end{aligned}$$

There is a famous result from Quillen [11, Prop. 1.6], saying that if the fiber f/q is contractibleFootnote 2 for every point \(q\in Q_\le \), then f gives a homotopy equivalence of order complexes. We state the special case for simplicial complexes:

Theorem 4.1

([3, Thm. 10.5], [11, Prop. 1.6]) Let \(F:(K,V)\rightarrow (K',V')\) be a simplicial map. If the fiber \(F/\sigma =\{\tau \in K\,|\, F(\tau )\subseteq \sigma \}\) is contractible for every \(\sigma \in K'\), then F induces a homotopy equivalence \(|F|:|K|\rightarrow |K'|\).

The nerve of a covering \({\mathcal {U}}\) is the simplicial complex with vertex set \({\mathcal {U}}\) and simplices given by subsets of \({\mathcal {U}}\) with non-empty intersection.

Theorem 4.2

(Borsuk Nerve Theorem [5, Cor. 9.3]) Let \({\mathcal {U}}\) be a cover of a simplicial complex \(K\) by simplicial subcomplexes. If every finite intersection of elements in \({\mathcal {U}}\) is contractible, then the geometric realization of the nerve of \({\mathcal {U}}\) is homotopy equivalent to the geometric realization of \(K\)

Let us remark that the Borsuk Nerve Theorem 4.2 is a consequence Theorem 4.1 as shown by Björner in the proof of [3, Thm. 10.6]. We use these results to show that the map in (1) is a homotopy equivalence.

Theorem 4.3

Let \(R\subseteq X\times Y\) be a relation. The simplicial map \(\pi _R:E(R)\rightarrow D(R)\) where \(\pi _R(x,y)=x\) induces a homotopy equivalence \(|\pi _R|:|E(R)|\rightarrow |D(R)|\).

Proof

If \(\sigma \) is a simplex in D(R), then the inverse image \(\pi ^{-1}_R(\sigma )\) consists of all subsets of rectangles of R of the form \(\sigma \times B\). Note that if we have two subsets \(B,B'\subseteq Y\), then \(\sigma \times (B\cup B')\subseteq R\) if and only if both \(\sigma \times B\subseteq R\) and \(\sigma \times B'\subseteq R\). Therefore, the inverse image \(\pi ^{-1}_R(\sigma )\) is the set of all subsets of the set \(\sigma \times Y(\sigma )\), where \(Y(\sigma ) = (\bigcup _{\sigma \times B\subseteq R} B)\). In particular, \(\pi ^{-1}_R(\sigma )\) is a simplex.

The fiber \(\pi _R/\sigma \) is the union of the inverse images \(\pi _R^{-1}(\tau )\) for \(\tau \) a subset of \(\sigma \). We consider the cover \({\mathcal {U}}\) of the fiber \(\pi _R/\sigma \) given by the simplices \(\pi _R^{-1}(\tau )\) for \(\tau \subseteq \sigma \). Since an intersection of simplices is either a simplex or empty, the Nerve Theorem 4.2 implies that the geometric realization of the fiber \(\pi _R/\sigma \) is homotopy equivalent to the nerve of \({\mathcal {U}}\). However, as we explain below, the vertex \(\pi ^{-1}_R(\sigma )\) is a cone point of the nerve of \({\mathcal {U}}\), and thus, the nerve is contractible. To see that the vertex \(\pi ^{-1}_R(\sigma )\) is a cone point of the nerve of \({\mathcal {U}}\), let \(\gamma \) be a simplex in the nerve of \({\mathcal {U}}\). Then, \(\gamma \) is a collection of sets of the form \(\tau \times Y(\tau )\) whose intersection is non-empty. Observe that \(\tau \subseteq \tau '\) implies \(Y(\tau ) \supseteq Y(\tau ')\). If \((x,y)\) is a point contained in every element \(\tau \times Y(\tau )\) of \(\gamma \), and if \(y' \in Y(\sigma )\), then the point \((x,y')\) is a point in \(\pi ^{-1}_R(\sigma )\) contained in every element of \(\gamma \). This means that \(\gamma \cup \{\pi ^{-1}_R(\sigma )\}\) is a simplex in the nerve of \({\mathcal {U}}\), and thus, the vertex \(\pi ^{-1}_R(\sigma )\) is a cone point of this cover. The result now follows from Theorem 4.1. \(\square \)

5 Dowker’s Theorem

In this section, we use Theorem 4.3 to prove a strong version of Dowker’s Theorem.

Recall that \(R^T = \{(y,x) \, \vert \, (x,y) \in R\}\), so \(U\times V\subseteq R\) if and only if \(V\times U\subseteq R^T\). Thus, the transpose map \(\text {S}:X\times Y\rightarrow Y\times X\) defined by \(\text {S}(x,y)=(y,x)\) gives an isomorphism on simplicial complexes \(\text {S}_R:E(R)\rightarrow E(R^T)\) when restricted to R. In particular, \(|\text {S}_R|\) is a homeomorphism and the second-coordinate projection \({\widehat{\pi }}_R=\pi _{R^T}\circ S_R:E(R)\rightarrow D(R^T)\) is a homotopy equivalence. We arrive at the following result:

Theorem 5.1

For any relation \((R,X,Y)\), the maps \(|\pi _R|\) and \(|{\widehat{\pi }}_R|\) are homotopy equivalences. For any morphism of relations \(f=(f_1,f_2):(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\), the diagram

figure b

commutes. \(\square \)

Continuing, if we let \(\phi _R:|D(R)|\rightarrow |E(R)|\) be a chosen homotopy inverse of \(|\pi _R|\). The composition

$$\begin{aligned} |D(R)|\xrightarrow [\simeq ]{\phi _R}|E(R)|\xrightarrow [\cong ]{|\text {S}_R|}|E(R^T)|\xrightarrow [\simeq ]{|\pi _{R^T}|}|D(R^T)|, \end{aligned}$$
(3)

which we denote by \(\Psi _R\), is also a homotopy equivalence. In particular, the Dowker complexes |D(R)| and \(|D(R^T)|\) are homotopy equivalent.

Taking the geometric realization of diagram (2) and replacing \(|\pi _{R_i}|\) for \(i=0,1\) by its homotopy inverse \(\phi _{R_i}\), we lose strict commutativity, but the diagram still commutes up to homotopy.

Theorem 5.2

([13, Thm. 5.2], general case of [6, Thm. 3]) For any relation \((R,X,Y)\), the map \(\Psi _R\) is a homotopy equivalence. For any morphism of relations \(f=(f_1,f_2):(R_0,X_0,Y_0)\rightarrow (R_1,X_1,Y_1)\), the diagram

figure c

commutes up to homotopy. \(\square \)

This result is often called the functorial Dowker theorem, a term was coined in [6, Thm. 3], where the case when \(f_1\) and \(f_2\) are inclusions is considered. In Theorem 5.2, we arrive at the more general case stated in [13, Thm. 5.2] in terms of covers and nerves.

6 Conclusion

We have introduced the rectangle complex of a relation and used it to give a short proof of Dowker’s theorem. An advantage of this proof is that all constructions are functorial, so we get the general functorial Dowker theorem (Theorem 5.2) without extra work. We obtain strict commutativity on the level of simplicial complexes as stated in Theorem 5.1. The notion of (maximal) rectangles of a relation has already had great success in formal concept analysis, and we demonstrate that it is also of interest in topology.