1 Introduction

Tropashko [18] has recently observed that the natural join and the inner union, two fundamental operations of the relational algebra initiated by Codd [2]—the algebra by which we construct queries—can be considered as the meet and join operations in a class of lattices, known by now as the class of relational lattices. Elements of the relational lattice \(\mathsf {R}(D,A)\) are the relations whose variables are listed by a subset of a total set A of attributes, and whose tuples’ entries are taken from a set D. Roughly speaking, we can consider a relation as a table of a database, its variables as the columns’ names, its tuples being the rows.

Let us illustrate these operations with examples. The natural join takes two tables and constructs a new one whose columns are indexed by the union of the headers, and whose rows are the glueings of the rows along identical values in common columns. As we emphasize in this paper the lattice theoretic aspects of the natural join operation, we shall depart from the standard practice of denoting it by the symbol \(\bowtie \) and use instead the meet symbol \(\wedge \).

figure a

The inner union restricts two tables to the common columns and lists all the possible rows. The following example suggests how to construct, using this operation, a table of users given two (or more) tables of people having different roles.

figure b

Considering the lattice signature as a subsignature of the relational algebra, Litak, Mikulás and Hidders [12] proposed to study the equational theory of the relational lattices. The capability to recognize when two queries are equivalent—that is, a solution to the word problem of such a theory—is of course an important step towards query optimization.

Spight and Tropashko [17] exhibited equational principles in a signature strictly larger than the one of lattice theory. A main contribution of Litak et al. [12]—a work to which we are indebted in many respects—was to show that the quasiequational theory of relational lattices with the header constant is undecidable. The authors also proposed a base of equations for the theory in the signature extended with the header constant, and exhibited two non-trivial pure lattice equations holding on relational lattices. It was argued there that the lattice \(\mathsf {R}(D,A)\) arises via a closure operator on the powerset \(P(A \sqcup {D}^{A})\) and, at the same time, as the Grothendieck construction for the functor \(P({D}^{(-)})\), from \(P(A)^{op}\) to \(\mathsf {SL}_{\vee }\) (the category of complete lattices and join-preserving mappings), sending \(X \subseteq A\) to \({D}^{X}\) and then \({D}^{X}\) covariantly to \(P({D}^{X})\).

The focus of this paper is on the pure lattice signature. We tackle the study of the equational theory of relational lattices in a coalgebraic fashion, that is, by using the duality theory developed in [16] for finite lattices and here partially extended to infinite lattices. Let us recall some key ideas from the theory, which in turn relies on Nation’s representation Theorem [14, Sect. 2]. For a complete lattice L, a join-cover of \(x \in L\) is a subset \(Y \subseteq L\) such that \(x \le \bigvee Y\). A lattice is pluperfect if it is a complete spatial lattice and every join-cover of a completely join-irreducible element refines to a minimal one—see Sect. 2 for a complete definition. Every finite lattice is pluperfect; moreover, relational lattices are pluperfect, even when they are infinite. This property, i.e. pluperfect ness, allows to define the dual structure of a lattice L, named the OD-graph in [14]. This is the triple \(\langle \mathcal {J}(L),\le ,\lhd _{\mathtt {m}}\rangle \) with \(\mathcal {J}(L)\) the set of completely join-irreducible elements, \(\le \) the restriction of the order to \(\mathcal {J}(L)\), and the relation \(j \lhd _{\mathtt {m}}C\) holds when \(j \in \mathcal {J}(L)\), \(C \subseteq \mathcal {J}(L)\), and C is a minimal join-cover of j. The original lattice L can be recovered up to isomorphism from its OD-graph as the lattice of closed downsets of \(\mathcal {J}(L)\)—where a downset \(X \subseteq \mathcal {J}(L)\) is closed if \(j \lhd _{\mathtt {m}}C \subseteq X\) implies \(j \in X\).

We characterize the OD-graph of the lattice \(\mathsf {R}(D,A)\) as follows. Firstly recall from [12] that we can identify completely join-irreducible elements of \(\mathsf {R}(D,A)\) with elements of the disjoint sum \(A \sqcup {D}^{A}\). The order on completely join-irreducible elements is trivial, i.e. it is the equality. All the elements of A are join-prime, whence the only minimal join-cover of some \(a \in A\) is the singleton \(\{ a \}\). The minimal join-cover s of elements in \({D}^{A}\) are described via an ultrametric distance valued in the join-semilattice P(A); this is, morally, the Hamming distance, \(\delta (f,g) = \{ x \in A \mid f(x) \ne g(x) \}\). Whenever \(f,g \in {D}^{A}\) we have \(f \lhd _{\mathtt {m}}\delta (f,g) \cup \{ g \}\) and these are all the minimal join-cover s of f.

As in correspondence theory for modal logic, the combinatorial structure of the dual spaces is an important source for discovering axioms/equations that uniformly hold in a class of models. For relational lattices, most of these combinatorial properties stem from the structure of the ultrametric space \(({D}^{A}, \delta )\). When we firstly attempted to show that equations (RL1) and (RL2) from [12] hold in relational lattices using duality, we realized that the properties necessary to enforce these equations were the following:

  1. P1.

    Every non-trivial minimal join-cover contains at most one join-irreducible element which is not join-prime.

Moreover, the generalized ultrametric space \(({D}^{A},\delta )\) is

  1. P2.

    symmetric, i.e. \(\delta (f,g) = \delta (g,f)\), for each \(f,g \in {D}^{A}\),

  2. P3.

    pairwise complete: if \(\delta (f,g) \subseteq X \cup Y\), then \(\delta (f,h) \subseteq X\) and \(\delta (h,g) \subseteq Y\) for some \(h \in {D}^{A}\).

Various notions of completeness for generalized ultrametric spaces are discussed in [1]. At first we called pairwise complete ness the Beck-Chevalley-Malcev property of \(({D}^{A},\delta )\). Indeed, it is equivalent to saying that the functor \(P({D}^{(-)}): P(A)^{op}\!\xrightarrow {\quad }\mathsf {SL}_{\vee }\) mentioned above sends a pullback square (i.e., a square of inclusions with objects \(X \cap Y,X,Y,Z\)) to a square satisfying the Beck-Chevalley condition. As the property implies that a collection of congruences of join-semilattice s commute, it is also a sort of Malcev condition.

We show with Theorem 4 that property P1 of an OD-graph is definable by an equation that we name (Unjp). We investigate the deductive strength of this equation and show in particular that (RL2) is derivable from (Unjp), but not the converse.

In presence of P1, symmetry and pairwise complete ness can also be understood as properties of an OD-graph. Symmetry is the following property: if \(k_{0} \lhd _{\mathtt {m}}C \cup \{ k_{1} \}\) with \(k_{1}\) not join-prime, then \(k_{1} \lhd _{\mathtt {m}}C \cup \{ k_{0} \}\). Pairwise completeness can be read as follows: if \(k_{0} \lhd _{\mathtt {m}}C_{0} \cup C_{1} \cup \{ k_{2} \}\) with \(k_{2}\) not join-prime and \(C_{0},C_{1},\{ k_{2} \}\) pairwise disjoint, then \(k_{0} \lhd _{\mathtt {m}}C_{0} \cup \{ k_{1} \}\) and \(k_{1} \lhd _{\mathtt {m}}C_{1} \cup \{ k_{2} \}\) for some completely join-irreducible element \(k_{1}\).

We exhibit in Sect. 6 three equations valid on relational lattices and characterize, via a set of properties of their OD-graphs, the pluperfect lattices satisfying (Unjp) and these equations. We propose these four equations as an axiomatization of the theory of relational lattices that we call [[AxRel]]. The main result of this paper, Theorem 7, sounds as follows. If we restrict to finite lattices that are atomistic—that is, lattices in which any element is the join of the atoms below it, so the order on join-irreducible elements in the dual space is trivial—then a lattice satisfies [[AxRel]] if and only if its OD-graph is symmetric and pairwise complete, in the sense just explained.

We can build lattices similar to the relational lattices from P(A)-valued ultrametric spaces. It is tempting to look for further equations so to represent the OD-graph of finite atomistic lattices satisfying these equations as P(A)-valued ultrametric space. Unfortunately this is not possible, since a key property of the OD-graph of lattices of ultrametric spaces—the ones ensuring that the distance function is well defined—is not definable by lattice equations. Yet Theorem 7 also exhibits a deep connection between the OD-graph of finite atomistic lattices satisfying [[AxRel]] and the frames of the commutator logic \([\mathrm {S5} ]^{A}\), see [10]. Considering the complexity of the theory of combination of modal logics, Theorem 7 can be used to foresee and shape future researches. For example, we shall discuss in Sect. 7 how to derive undecidability results from the correspondent ones in multidimensional modal logic. In particular, a refinement of the main result of Litak et al. [12, Corollary 4.8] can be derived.

The paper is structured as follows. We introduce in Sect. 2 the notation as well as the least lattice theoretic tools that shall allow the reader to go through the paper. In Sect. 3 we describe the relational lattices, present some known results in the literature, and give a personal twist to these results. In particular, we shall introduce semidirect products of lattices, ultrametric spaces as a tool for studying relational lattices, emphasize the role of the Beck-Chevalley property in the theory. In Sect. 4 we characterize the OD-graphs of relational lattices. In Sect. 5 we present our results on the equation (Unjp). In Sect. 6, we describe our results relating equations valid on relational lattices to symmetry and pairwise complete ness. In the last Section we discuss the results presented as well as ongoing researches, by the author and by other researchers, trace a road-map for future work.

2 Some Elementary Lattice Theory

A lattice is a poset L such that every finite non-empty subset \(X \subseteq L\) admits a smallest upper bound \(\bigvee X\) and a greatest lower bound \(\bigwedge X\). We assume a minimal knowledge of lattice theory—otherwise, we invite the reader to consult a standard monograph on the subject, such as [3] or [5]. The technical tools that we use may be found in the monograph [4], that we also invite to explore. A lattice can also be understood as a structure \(\mathfrak {A}\) for the functional signature \((\vee ,\wedge )\), such that the interpretations of these two binary function symbols both give \(\mathfrak {A}\) the structure of an idempotent commutative semigroup, the two semigroup structures being tied up by the absorption laws \(x \wedge (y \vee x) = x\) and \(x \vee (y \wedge x) = x\). Once a lattice is presented as such structure, the order is recovered by stating that \(x \le y\) holds if and only if \(x \wedge y= x\).

A lattice L is complete if any subset \(X \subseteq L\) admits a smallest upper bound \(\bigvee X\). It can be shown that this condition implies that any subset \(X \subseteq L\) admits a greatest lower bound \(\bigwedge X\). A complete lattice is bounded, since \(\bot := \bigvee \emptyset \) and \(\top := \bigwedge \emptyset \) are respectively the least and greatest elements of the lattice.

A closure operator on a complete lattice L is an order-preserving function \(j: L \xrightarrow {\quad }L\) such that \(x \le j(x)\) and \(j^{2}(x) = j(x)\), for each \(x \in L\). We shall use \(\mathtt {Clop}(L)\) to denote the poset of closure operators on L, under the pointwise ordering. It can be shown that \(\mathtt {Clop}(L)\) is itself a complete lattice. If \(j \in \mathtt {Clop}(L)\), then the set L / j of fixed points of j is itself a complete lattice, with \(\bigwedge _{L/j} X = \bigwedge _{L} X\) and \(\bigvee _{L/j} X = j(\bigvee _{L} X)\). For the correspondence between closure operators and congruences in the category of complete join-semilattices, see [9].

Let L be a complete lattice. An element \(j \in L\) is said to be completely join-irreducible if \(j = \bigvee X\) implies \(j \in X\), for each \(X \subseteq L\); the set of completely join-irreducible element of L is denoted here \(\mathcal {J}(L)\). A complete lattice is spatial if every element is the join of the completely join-irreducible elements below it. An element \(j \in \mathcal {J}(L)\) is said to be join-prime if \(j \le \bigvee X\) implies \(j \le x\) for some \(x \in X\), for each finite subset X of L. We say that \(j \in \mathcal {J}(L)\) is non-join-prime if it is not join-prime. An atom of a lattice L is an element of L such that \(\bot \) is the only element strictly below it. A spatial lattice is atomistic if every element of \(\mathcal {J}(L)\) is an atom.

For \(j \in \mathcal {J}(L)\), a join-cover of j is a subset \(X \subseteq L\) such that \(j \le \bigvee X\). For \(X, Y \subseteq L\), we say that X refines Y, and write \(X \ll Y\), if for all \(x \in X\) there exists \(y \in Y\) such that \(x \le y\). A join-cover X of j is said to be minimal if \(j \le \bigvee Y\) and \(Y \ll X\) implies \(X \subseteq Y\); we write \(j \lhd _{\mathtt {m}}X\) if X is a minimal join-cover of j. In a spatial lattice, if \(j \lhd _{\mathtt {m}}X\), then \(X \subseteq \mathcal {J}(L)\). If \(j \lhd _{\mathtt {m}}X\), then we say that X is a non-trivial minimal join-cover of j if \(X\ne \{ j \}\). It is common to use the word perfect for a lattice which is both spatial and dually spatial. We need here something different:

Definition 1

A complete lattice is pluperfect if it is spatial and for each \(j \in \mathcal {J}(L)\) and \(X \subseteq L\), if \(j \le \bigvee X\), then \(Y \ll X\) for some Y such that \(j \lhd _{\mathtt {m}}Y\). The OD-graph of a pluperfect lattice L is the structure \(\langle \mathcal {J}(L),\le ,\lhd _{\mathtt {m}}\rangle \).

That is, in a pluperfect lattice every cover refines to a minimal one. Notice that every finite lattice is pluperfect. If L is a pluperfect lattice, then we say that \(X \subseteq \mathcal {J}(L)\) is closed if it is a downset and \(j \lhd _{\mathtt {m}}C \subseteq X\) implies \(j \in X\). As from standard theory, the mapping \(X \mapsto \bigcap \{ \,Y \subseteq \mathcal {J}(L) \mid X \subseteq Y, Y~\text {is closed} \}\) defines a closure operator whose fixed points are exactly the closed subsets of \(\mathcal {J}(L)\). The interest of considering pluperfect lattices stems from the following representation Theorem.

Theorem 1

(Nation [14]). Let L be a pluperfect lattice and let \(\mathsf {L}(\mathcal {J}(L),\le ,\lhd _{\mathtt {m}})\) be the lattice of closed subsets of \(\mathcal {J}(L)\). The mapping \(l \mapsto \{ j \in \mathcal {J}(L) \mid j \le l \}\) is a lattice isomorphism from L to \(\mathsf {L}(\mathcal {J}(L),\le ,\lhd _{\mathtt {m}})\).

It was shown in [16] how to extend this representation theorem to a duality between the category of finite lattices and the category of OD-graphs. The following Lemma shall be repeatedly used in the proofs of our statements.

Lemma 1

Let L be a pluperfect lattice, let \(j \lhd _{\mathtt {m}}C\) and \(k \in C\). If \(j \le \bigvee D\) with \(D \ll \{ \bigvee (C \setminus \{ k \}), k \}\), then \(k \in D\). In particular, if \(k' < k\), then \(\{ \bigvee C \setminus \{ k \},k' \}\) is not a cover of j.

3 The Relational Lattices \(\mathsf {R}(D,A)\)

In this Section we define relational lattices, recall some known facts, and develop then some tools to be used later, semidirect products of lattices, generalized ultrametric spaces, a precise connection to the theory of combination of modal logics (as well as multidimensional modal logic and relational algebras).

Let A be a collection of attributes (or column names) and let D be a set of cell values. A relation (or, more informally, a table) on A and D is a pair (XT) where \(X \subseteq A\) and \(T \subseteq {D}^{X}\); X is the header of the table while T is the collection of rows. Elements of the relational lattice \(\mathsf {R}(D,A)\) are relations on A and D.

Before we define the natural join, the inner union operations, and the order on \(\mathsf {R}(D,A)\), let us recall a few key operations. If \(X \subseteq Y \subseteq A\) and \(f \in {D}^{Y}\), then we shall use for the restriction of f to X; if \(T \subseteq {D}^{Y}\), then shall denote projection to X, that is, the direct image of T along restriction, ; if \(T \subseteq {D}^{X}\), then \(i_{Y}(T)\) shall denote cylindrification to Y, that is, the inverse image of restriction, . Recall that \(i_{Y}\) is right adjoint to . With this in mind, the natural join and the inner union of tables are respectively described by the following formulas:

figure c

The order is then given by

figure d

It was observed in [12] that \(\mathsf {R}(D,A)\) arises—as a category with at most one arrow between two objects—via the Grothendieck construction for the functor sending \(X \subseteq A\) contravariantly to \({D}^{X}\) and then \({D}^{X}\) covariantly to \(P({D}^{X})\). Let us record the following important property:

Lemma 2

The image of a pullback square by the functor \(P({D}^{(-)}) : P(A)^{op} \xrightarrow {\quad }\mathsf {SL}_{\vee }\) satisfies the Beck-Chevalley property.

figure e

The above statement means that if we apply the functor to inclusions of the form \(X_{1} \cap X_{2} \subseteq X_{i} \subseteq X_{3}\), \(i = 1,2\), then the two possible diagonals in the diagram on the right, , are equal. The Beck-Chevalley property is a consequence of the glueing property of functions: if \(f \in {D}^{X_{2}}, g \in {D}^{X_{1}}\) and , then there exists \(h \in {D}^{X_{3}}\) such that and .

We can recast the previous category-theoretic observations in an algebraic framework. An action of a complete lattice L over a complete lattice M is a monotonic mapping \(\langle \quad \rangle : L \xrightarrow {\quad }\mathtt {Clop}(M)\), thus sending \(X \in L\) to a closure operator \(\langle X \rangle \) on M. Given such an action, if we define \(j(X,T) := (X,\langle X \rangle T)\), then j(XT) is a closure operator on the product \(L \times M\). In particular, the set of j-fixed points, \(L \ltimes _{j}M := \{ (X,T) \in L \times M \mid \langle X \rangle T = T \}\), is itself a complete lattice, where the meet coincides with the one from \(L \times M\), while the join is given by the formula \((X_{1},T_{1}) \vee _{L \ltimes _{j}M} (X_{2},T_{2}) := (X_{1} \vee X_{2},\langle X_{1} \vee X_{2} \rangle (T_{1} \vee T_{2}))\). We call \(L \ltimes _{j}M\) the semidirect product of L and M via j. The naming is chosen here after the semidirect product of groups, which is a similar instance of the Grothendieck construction. Given such an action, the correspondence \(X \mapsto M/\langle X \rangle \) gives rise to a covariant functor from L to the category \(\mathsf {SL}_{\vee }\), so that it makes sense to ask when the Beck-Chevalley property holds, as in Lemma 2. This happens—and then we say that an action \(\langle \quad \rangle \) satisfies the Beck-Chevalley property—exactly when

$$\begin{aligned} \langle X_{1} \vee X_{2} \rangle T&= \langle X_{1} \rangle \langle X_{2} \rangle T\,,&\text {for each } X_{1},X_{2} \in L \text { and } T \in M. \end{aligned}$$
(1)

Notice that the identity \(\langle X_{1} \rangle \langle X_{2} \rangle T = \langle X_{2} \rangle \langle X_{1} \rangle T\) is a consequence of (1). As these closure operators correspond to congruences of complete join-semilattice s, we also think of the Beck-Chevalley property as a form of Malcev property, stating that a collection of congruences (thought as binary relations) pairwise commute (w.r.t composition of relations).

Relational lattices from ultrametric spaces. Let us come back to the lattice \(\mathsf {R}(D,A)\). Define on the set \({D}^{A}\) the following P(A)-valued ultrametric distance:

$$\begin{aligned} \delta (f,g)&:= \{ x \in A \mid f(x) \ne g(x) \}\,. \end{aligned}$$

Thus \(\delta (f,f) \subseteq \emptyset \) and \(\delta (f,g) \subseteq \delta (f,h) \cup \delta (h,g)\) for any \(f,g,h \in {D}^{A}\), making \(({D}^{A},\delta )\) into a generalized metric space in the sense of [11].Footnote 1 With respect to the latter work—where axioms for the distance are those of a category enriched over \((P(A)^{op},\emptyset ,\cup )\)—for \(f, g \in {D}^{A}\) we also have that \(\delta (f,g) = \emptyset \) implies \(f = g\) and symmetry, \(\delta (f,g) = \delta (g,f)\). We can define then an action of P(A) on \(P({D}^{A})\):

$$\begin{aligned} \langle X \rangle T&= \{ f \in {D}^{A} \mid \exists g \in T \text { s.t. }\delta (f,g) \subseteq X \}\,. \end{aligned}$$
(2)

We can now restate (and refine) Lemma 2.1 from [12]—which constructs the lattice \(\mathsf {R}(D,A)\) via a closure operator on \(P(A + {D}^{A}\))—as follows:

Theorem 2

The correspondence sending (XT) to \((A \setminus X,i_{A}(T))\) is an isomorphism bewteen the relational lattice \(\mathsf {R}(D,A)\) and \(P(A) \ltimes _{j}P({D}^{A})\).

The action defined in (2) satisfies the identity (1). As a matter of fact, (1) is equivalent to pairwise completeness of \(({D}^{A},\delta )\) as an ultrametric space, see [1], namely the following property:

$$\begin{aligned}&{ \textit{if} \ \delta (f,g) \subseteq X_{1} \cup X_{2},} \nonumber \\&\qquad \, {then \ there \ exists \ h \ such \ that \ \delta (f,h) \subseteq X_{1} \ and \ \delta (h,g) \ \subseteq \ X_{2}}\,. \end{aligned}$$
(3)

It is easily verified that (3) is yet another spelling of the glueing property of functions.

Observe that, given any generalized ultrametric space \((F,\delta )\) whose distance takes values in P(A), Eq. (2)—with \({D}^{A}\) replaced by F—defines an action of P(A) on P(F). The lattice \(P(A) \ltimes _{j}P(F)\) shall have similar properties to those of the lattices \(\mathsf {R}(D,A)\) and will be useful when studying the variety generated by the relational lattices. As an example, we construct typed relational lattices, i.e. lattices of relations where each column has a fixed type. To this goal, fix a surjective mapping \(\pi : D \xrightarrow {\quad }A\). For each \(a \in A\), we think of the set \(D_{a} = \pi ^{-1}(a)\) as the type of the attribute a. Let \(S(\pi )\) be the set of sections of \(\pi \), that is, \(s \in S(\pi )\) if and only if \(s(a) \in D_{a}\), for each \(a \in A\). Notice that \((S(\pi ),\delta )\) is a pairwise complete sub-metric space of \(({D}^{A},\delta )\). The lattice \(\mathsf {R}(\pi ) := P(A) \ltimes _{j}P(S(\pi ))\) is the typed relational lattice. It can be shown that relational lattices and typed relational lattices generate the same variety.

Relational lattices from multidimensional modal logics. In order to illustrate and stress the value of identity (1), i.e. of the Beck-Chevalley-Malcev property, we derive next a useful formula for computing the join of two tables under the \(P(A) \ltimes _{j}P({D}^{A})\) representation.

figure f

Theorem 2 suggests that a possible way to study the equational theory of the lattices \(\mathsf {R}(D,A)\) is to interpret the lattice operations in a two sorted modal logic, where the modal operators are indexed by the first sort and act on the second. It is easily recongnized that each modal operator satisfies the \(\mathrm {S5}\) axioms, while Eq. (1) implies that, when A is finite, each modal operator \(\langle X \rangle \) is determined by the modal operators of the form \(\langle a \rangle \) with a an atom below X. That is, the kind of modal logic we need to interpret the lattice theory is the commutator logic \([\mathrm {S5} ]^{n} = [\underbrace{\mathrm {S5},\ldots ,\mathrm {S5}}_{\text {n-times}}]\), with \(n = \mathrm{card}\,A\), see [10, Definition 18].

4 Minimal Join-Covers in \(\mathsf {R}(D,A)\)

The lattices \(\mathsf {R}(D,A)\) are pluperfect, even when A or D is an infinite set. The completely join-irreducible elements were characterized in [12] together with the meet-irreducible elements and the canonical context (see [3, Chapter 3] for the definition of canonical context). If we stick to the representation given in Theorem 2, the completely join-irreducible elements are of the form \(\widehat{a} = (\{ a \},\emptyset )\) and \(\widehat{f} = (\emptyset ,\{ f \})\). We can think of \(\widehat{a}\) as an empty named column, while \(\widehat{f}\) is an everywhere defined row. They are all atoms, so that, in particular, we shall not be concerned with the restriction of the order to \(\mathcal {J}(\mathsf {R}(D,A))\) (since this order coincides with the equality). In order to characterize the OD-graph of the lattice \(\mathsf {R}(D,A)\), we only need to characterize the minimal join-cover s. Taking into account that if an element \(j \in \mathcal {J}(L)\) is join-prime, then it has just one minimal join-cover, the singleton \(\{ j \}\), the following Theorem achieves this goal.

Theorem 3

The lattices \(\mathsf {R}(D,A)\) are atomistic pluperfect lattices. As a matter of fact, every element \(\widehat{a}\), \(a \in A\), is join-prime; for \(f \in {D}^{A}\), the minimal join-cover s of \(\widehat{f}\) are of the form

$$\begin{aligned} \widehat{f}&\le \textstyle { \bigvee _{a \in \delta (f,g)} \widehat{a}} \vee \widehat{g}\,, \qquad { \ for \ } g \in {D}^{A}. \end{aligned}$$

The proof of this statement is almost straightforward, given the characterization of \(\mathsf {R}(D,A)\) as the semidirect product \(P(A) \ltimes _{j}P({D}^{A})\) and the definition of the closure operators given with Eq. (2). For this reason, we skip it.

In particular, every minimal join-cover contains at most one non-join-prime element. In view of Theorem 1, we obtain a more precise description of the closure operator described in [12, Lemma 2.1] that gives rise to relational lattices.

Corollary 1

The relational lattice \(\mathsf {R}(D,A)\) is isomorphic to the lattice of closed subsets of \(A \sqcup {D}^{A}\), where a subset X is closed if \(\delta (f,g) \cup \{ g \} \subseteq X\) implies \(f \in X\).

In order to ease the reading, we shall use in the rest of this paper the same notation for a completely join-irreducible element of \(\mathsf {R}(D,A)\) and an element of \(A \sqcup {D}^{A}\). This is consistent with the above Corollary, as under the isomorphism we have \(\widehat{a} = \{ a \}\) and \(\widehat{f} = \{ f \}\). Thus \(a\) shall stand for \(\widehat{a}\), and \(f\) for \(\widehat{f}\).

In a spatial lattice L (thus in a relational lattice), an inequation \(s \le t\) holds if and only if \(j \le s\) implies \(j \le t\), for each \(j \in \mathcal {J}(L)\)—thus we shall often consider inequations of the form \(j \le s\) with \(j \in \mathcal {J}(L)\). When \(L = \mathsf {R}(D,A)\), the characterization of minimal join-cover leads to the following principle that we shall repeatedly use:

$$\begin{aligned} f&\le x_{1} \vee \ldots \vee x_{n} \text { iff }\delta (f,g) \cup \{ g \} \ll \{ x_{1},\ldots ,x_{n} \},\text { for some } g \in {D}^{A}. \end{aligned}$$
(4)

5 Uniqueness of non-join-prime Elements

For an inclusion we mean a pair (st) of terms (in the signature of lattice theory) such that the equation \(t \vee s = s\) (i.e. the inequality \(t \le s\)) is derivable from the usual axioms of lattices. Thus, the equality \(s = t\) reduces to the inequality \(s \le t\). We write \(s \le t\) for a lattice inclusion and say it holds in a lattice if the identity \(s = t\) holds in that lattice. Next, let us set

$$\begin{aligned} \mathtt {d}_{\ell }({\varvec{u}}) := u_{0} \wedge (u_{1} \vee u_{2})\,, \quad \mathtt {d}_{\rho }({\varvec{u}}) := (u_{0} \wedge u_{1}) \vee (u_{0} \wedge u_{2})\,, \end{aligned}$$

so \(\mathtt {d}_{\ell }({\varvec{u}}) \le \mathtt {d}_{\rho }({\varvec{u}})\) is (an inclusion equivalent to) the usual distributive law. Consider the following inclusion:

figure g

Theorem 4

The inclusion (Unjp) holds on relational lattices. As a matter of fact, (Unjp) holds in a pluperfect lattice if and only if every minimal join-cover contains at most one non-join-prime element.

Proof

Let us prove the first statement. To this goal, it will be enough to argue that any join-irreducible element below the left-hand side of the inclusion is below its right-hand side. Let k be such a join-irreducible element. It is not difficult to see that if k is join-prime, then k is also below the right-hand side of the inclusion. Suppose then that k is non-join-prime, whence \(k = f\) for some \(f \in {D}^{A}\). From \(f \le \mathtt {d}_{\ell }({\varvec{y}}) \vee \mathtt {d}_{\ell }({\varvec{z}}) \vee w\) and (4), it follows that there exists \(g \in {D}^{A}\) such that \(\delta (f,g) \cup \{ g \}\ll \{ \mathtt {d}_{\ell }({\varvec{y}}),\mathtt {d}_{\ell }({\varvec{z}}),w \}\). In particular, \(\{ g \}\ll \{ \mathtt {d}_{\ell }({\varvec{y}}),w \}\) or \(\{ g \}\ll \{ \mathtt {d}_{\ell }({\varvec{z}}),w \}\). We firstly suppose that the last case holds. If \(a \in \delta (f,g)\) and \(a \le \mathtt {d}_{\ell }({\varvec{y}})= y_{0} \wedge (y_{1} \vee y_{2})\), then \(a \le (y_{0} \wedge y_{1}) \vee (y_{0}\wedge y_{2}) = \mathtt {d}_{\rho }({\varvec{y}})\), since \(a\) is join-prime. It follows that \(\delta (f,g) \cup \{ g \}\ll \{ \mathtt {d}_{\rho }({\varvec{y}}),\mathtt {d}_{\ell }({\varvec{z}}),w \}\), whence \(f \le x \wedge (\mathtt {d}_{\ell }({\varvec{y}}) \vee \mathtt {d}_{\ell }({\varvec{z}}) \vee w)\). If \(\{ g \} \ll \{ \mathtt {d}_{\ell }({\varvec{y}}),w \}\), then we conclude similarly that \(f \le x \wedge (\mathtt {d}_{\ell }({\varvec{y}}) \vee \mathtt {d}_{\rho }({\varvec{z}}) \vee w)\). Whence k is below the right-hand side of this inclusion, and the inclusion holds since k was arbitrary.

We leave the reader to generalize the argument above so to prove that if a pluperfect lattice is such that every minimal join-cover has at most one non-join-prime element, then (Unjp) holds. For the converse we argue as follows.

Let L be a pluperfect lattice, let \(k_{x} \in \mathcal {J}(L)\), \(C_{x} \subseteq \mathcal {J}(L)\) with \(k_{x} \lhd _{\mathtt {m}}C_{x} \), and suppose that \(k_{y},k_{z} \in C_{x}\) are distinct and non-join-prime. For \(u \in \{ y,z \}\), since \(k_{u}\) is non-join-prime, there is a non-trivial minimal join-cover \(k_{u} \lhd _{\mathtt {m}}C_{u}\); as every non-trivial minimal join-cover has at least two elements, let \(C_{u,1},C_{u,2}\) be a partition of \(C_{u}\) such that \(C_{u,i}\ne \emptyset \) for each \(i = 1,2\).

We construct a valuation which fails (Unjp). Let \(x := k_{x}\), \(y_{0} := k_{y}\), \(z_{0} := k_{z}\), \(w := \bigvee (C_{x} \setminus \{ k_{y},k_{z} \})\) and, for \(u \in \{ y,z \}\) and \(i =1,2\), let \(u_{i} := \bigvee C_{u,i}\). The left-hand side of the (Unjp) evaluates to \(k_{x}\). Assume, by the way of contradiction, that (Unjp) holds, so \(k_{x}\) is below the right-hand side of the inclusion. Since the only minimal join-cover D of \(k_{x}\) such that \(D \ll \{ k_{x} \}\) is \(\{ k_{x} \}\), either \(k_{x} \le \mathtt {d}_{\rho }({\varvec{y}}) \vee \mathtt {d}_{\ell }({\varvec{z}}) \vee w\) or \(k_{x} \le \mathtt {d}_{\ell }({\varvec{y}}) \vee \mathtt {d}_{\rho }({\varvec{z}}) \vee w\); let us assume that the first case holds. We have then \(k_{x} \le \mathtt {d}_{\rho }({\varvec{y}}) \vee k_{z} \vee \bigvee (C_{x} \setminus \{ k_{y},k_{z} \}) = \mathtt {d}_{\rho }({\varvec{y}}) \vee \bigvee (C_{x} \setminus \{ k_{y} \})\). Considering that \(\mathtt {d}_{\rho }({\varvec{y}}) \le k_{y}\), Lemma 1 implies that \(k_{y} = \mathtt {d}_{\rho }({\varvec{y}}) = (y_{0} \wedge y_{1}) \vee (y_{0} \wedge y_{2})\). Since \(k_{y}\) is join-irreducible \(k_{y} = y_{0} \wedge y_{i}\) for some \(i \in \{ 1,2 \}\). Yet this is not possible, as such relation implies that \(C_{y,i}\) is a join-cover of \(k_{y}\); considering that \(C_{y,i}\) is a proper subset of the minimal join-cover \(C_{y}\), this contradicts the minimality of \(C_{y}\). If \(k_{x} \le \mathtt {d}_{\ell }({\varvec{y}}) \vee \mathtt {d}_{\rho }({\varvec{z}}) \vee w\), then we get to a similar contradiction. Whence, \(k_{x}\) is not below the right-hand side of (Unjp), which therefore fails.    \(\square \)

It is worth noticing that the statement “every minimal join-cover contains exactly one non-join-prime element” is not definable by equations: for \(A = D = \{ 0,1 \}\), there is a sublattice of \(\mathsf {R}(D,A)\) which fails this property.

While Theorem 4 gives a semantic characterization of (Unjp), we might also wish to measure its power at the syntactic level. Theorem 5 and Corollary 2 illustrate the deductive strength of (Unjp), by pinpointing an infinite set of its consequences.

Theorem 5

If \(s_{\ell } = s_{\rho }\) and \(t_{\ell } = t_{\rho }\) are equations valid on distributive lattices, then the equation

$$\begin{aligned}&{(x \wedge (s_{\ell } \vee t_{\ell } \vee w)) \vee (x \wedge (s_{\rho } \vee t_{\rho } \vee w)) } \\&\qquad \qquad \qquad \qquad \qquad \,\, = (x \wedge (s_{\rho } \vee t_{\ell } \vee w)) \vee (x \wedge (s_{\ell } \vee t_{\rho } \vee w)) \end{aligned}$$

is derivable from (Unjp) and general lattice axioms.

Proof

For a lattice term s, let \(\mathtt {dnf}(s)\) be its disjunctive normal form. Recall that we can obtain \(\mathtt {dnf}(s)\) from s by means of a sequence \(s = s_{0},\ldots ,s_{n} = \mathtt {dnf}(s)\) where, for each \(i = 0,\ldots , n-1\), \(s_{i +1}\) is obtained from \(s_{i}\) by one application of the distributive law at the toplevel of the term, and by general lattice axioms. Thus, for two lattice terms \(s^{1},s^{2}\), let \(s^{1}_{i}\), \(i = 0,\ldots ,n\), and \(s^{2}_{j}\), \(j = 0,\ldots ,m\) be the sequences leading to the respective normal forms.

For \(i =0,\ldots ,n\) and \(j = 0,\ldots ,m\), let now \(t_{i,j} = x \wedge (s^{1}_{i} \vee s^{2}_{j} \vee w)\). Using (Unjp) and general lattice axioms, we can compute as follows:

$$\begin{aligned} t_{0,0} = t_{1,0} \vee t_{0,1}&= t_{2,0} \vee t_{1,1} \vee t_{0,2} = \ldots \\&= \bigvee _{j=0,\ldots , m} t_{n,j} \vee \bigvee _{i=0,\ldots ,n} t_{i,m} \overset{?}{=} t_{n,0} \vee t_{0,m}\,, \end{aligned}$$

where only the last equality needs to be justified. Notice that the relation \(s^{k}_{i+1} \le s^{k}_{i}\) holds in every lattice. Whence we have \(s^{k}_{i'}\le s^{k}_{i}\) when \(i < i'\), and both \(t_{n,j} \le t_{n,0}\) and \(t_{i,m} \le t_{i,0}\). It follows that the indexed join at the last line evaluates to \(t_{n,0} \vee t_{0,m}\). We have derived, up to now, the identity

$$\begin{aligned} x \wedge (s^{1} \vee s^{2} \vee w)&= (x \wedge (\mathtt {dnf}(s^{1}) \vee s^{2} \vee w)) \vee (x \wedge (s^{1} \vee \mathtt {dnf}(s^{2}) \vee w)) \end{aligned}$$

for every pair of lattice terms \(s^{1}\) and \(s^{2}\).

Let us call co-clause a conjunction of variables. By using lattice axioms only, we can suppose that, within \(\mathtt {dnf}(t)\), there are no repeated literals in co-clauses and that no co-clause subsumes another. Under this assumption, we have that an identity \(s_{\ell } = s_{\rho }\) holds in all distributive lattices if and only if \(\mathtt {dnf}(s_{\ell })\) is equal to \(\mathtt {dnf}(s_{\rho })\). Whence, to derive the statement of the Theorem, we can compute as follows:

figure h

In [12] two equations were shown to hold on relational lattices. One of them is (RL2) that we describe next. Set

$$\begin{aligned} \mathtt {d}^{o}_{\ell }({\varvec{u}}) := (u_{0} \vee u_{1}) \wedge (u_{0} \vee u_{2})\,, \quad \mathtt {d}^{o}_{\rho }({\varvec{u}}) := u_{0} \vee (u_{1} \wedge u_{2})\,, \end{aligned}$$

the equation is

figure i

Corollary 2

If \(s_{\ell } = s_{\rho }\) and \(t_{\ell } = t_{\rho }\) are equations valid on distributive lattices, then the inequation

$$\begin{aligned} (x \wedge (s_{\ell } \vee t_{\ell } \vee w))&\le (x \wedge (s_{\rho } \vee t_{\ell } \vee w)) \vee (x \wedge (s_{\ell } \vee t_{\rho } \vee w)) \end{aligned}$$
(5)

is derivable from (Unjp). In particular (RL2) is derivable from (Unjp).

The Corollary follows from the Theorem and from the fact that \(x \le x \vee y\). In order to derive (RL2) from (5) (if we do not include the bottom constant \(\bot \) as part of the signature of lattice theory), we instantiate \(s_{\ell } := \mathtt {d}^{o}_{\ell }({\varvec{y}})\), \(s_{\rho } := \mathtt {d}^{o}_{\rho }({\varvec{y}})\), \(t_{\ell } := \mathtt {d}^{o}_{\ell }({\varvec{z}})\), \(t_{\rho } := \mathtt {d}^{o}_{\rho }({\varvec{z}})\), and \(w : = \mathtt {d}^{o}_{\rho }({\varvec{z}})\).

It can be shown that (Unjp) is not derivable from (RL2)—mainly due to the role of the variable w in the (Unjp). The construction of a lattice L satisfying (RL2) but failing (Unjp) proceeds via the construction of its OD-graph \(\langle J(L), \le ,\lhd _{\mathtt {m}}\rangle \). Due to the consistent number of variables in the two equations, an automated tool such as Mace4 [13] could not help finding a countermodel. Similarly, automated tools such as Prover9 and Waldmeister [6, 13] were of no help to show that (RL2) is a consequence of (Unjp).

Natural questions—e.g. decidability—may be raised concerning the equational theory of (Unjp). Since we can give an easy semantic proof that an equation of the form (5) holds on finite lattices (or pluperfect) satisfying (Unjp), a reasonable conjecture is that this theory has some sort of finite model property. Yet, proving this might not be immediate, since the variety of lattices satisfying (Unjp) is not locally finite (i.e., not every finitely generated lattice satisfying (Unjp) is finite). The construction used in [16, Proposition 7.5] may be used to argue that the lattice freely generated in this variety by three generators is infinite.

6 Symmetry and pairwise complete ness

Due to its syntactic shape (Unjp) falls in a class of inclusions described in [16, Section 8] that admit a correspondent property in the OD-graph. Here, the meaning of the word correspondent is analogous to its use in modal logic, where some formulas might be uniformly valid in a frame if and only if the frame satisfies a correspondent first order property. Thus Theorem 4 is not completely unexpected. A more surprising result comes from considering the three equations below, that fall outside the syntactic fragment described in [16]; a strengthening of Lemma 1 (Lemma 4 to follow) allows to characterize the OD-graphs of pluperfect lattices satisfying (Unjp) and these equations, see Theorem 8.

figure j

Let us first illustrate the way in which these equations hold in relational lattices. In particular, the proof shall illustrate the crucial role played by symmetry and pairwise complete ness—i.e., condition (3)—of the ultrametric space \(({D}^{A},\delta )\).

Theorem 6

The inclusions (SymPC), (VarRL1), (RMod) hold in relational lattices.

Proof

(SymPC). Let k be a join-irreducible element below \(x \wedge (y \vee z)\). If k is join-prime, then k is also below \((x \wedge y) \vee (x \wedge z)\), whence it is below the right-hand side of this inclusion. Therefore, let k be non-join-prime, so \(k = f\) for some \(f \in {D}^{A}\); by (4), let \(g \in {D}^{A}\) be such that \(\delta (f,g) \cup \{ g \} \ll \{ y,z \}\). Let us suppose first that \(g \le z\). Since \(\delta (f,g) \ll \{ y ,z \}\), using pairwise complete ness we can find h such that \(\delta (f,h) \ll \{ y \}\) and \(\delta (h,g) \ll \{ z \}\). It follows that \(h \le \bigvee \delta (h,g) \vee g \le z\); moreover, since \(f \le x\), \(\delta (h,f) = \delta (f,h)\), and \(\delta (f,h) \ll \{ y \}\), then \(h \le \delta (h,f) \vee f \le x \vee y\). Consequently, we have \(h \le z \wedge (x \vee y)\) and, considering that \(\delta (f,h) \ll \{ y \}\), we have \(f \le x \wedge (y \vee (z \wedge (x \vee y)))\). If \(g \le y\), then we similarly deduce that \(f \le x \wedge (z \vee (y \wedge (x \vee z)))\). In both cases, \(f\) is below the right-hand side of this inclusion.

(VarRL1). Let k be below the left-hand side of this inclusion. If k is join-prime, then it is below the right-hand side of this inclusion as well. Otherwise \(k = f\) is non-join-prime and \(\delta (f,g) \cup \{ g \} \ll \{ y \wedge z, y \wedge x,z \wedge x \}\) for some \(g \in {D}^{A}\).

Since \(g \le r\) for some \(r \in \{ y \wedge z, y \wedge x,z \wedge x \}\), we consider three cases; by pairwise complete ness we can also assume that \(g\) is the only element of \(\delta (f,g) \cup \{ g \}\) below r—since if \(\delta (f,g') \ll \{ y \wedge z, y \wedge x,z \wedge x \} \setminus \{ r \} \) and \(\delta (g',g) \ll \{ r \}\), then \(g' \le r\). Also, the last two cases, \(g \le y \wedge x\) and \(g \le z \wedge x\), are symmetric in y and z, so that we consider among them the second-to-last only.

Suppose firstly that \(g \le y \wedge z\). Then, from \(\delta (g,f) = \delta (f,g) \ll \{ x\wedge y , x \wedge z \} \ll \{ x \}\) and \(f \le x\), we deduce \(g \le x\); whence \(g \le x \wedge y\) and \(f \le (x \wedge z) \vee (x\wedge y)\).

Suppose next that \(g \le x \wedge y\). By pairwise complete ness, let h be such that \(\delta (f,h) \ll \{ x \wedge z \}\) and \(\delta (h,g) \ll \{ y \wedge z \}\). We deduce then \(h \le y\) from \(\delta (h,g) \ll \{ y \}\) and \(g \le y\), and \(h \le x\), from \(\delta (h,f) = \delta (f,h) \ll \{ x \}\) and \(f \le x\). Thus \(h \le x \wedge y\) and \(f \le (x \wedge z) \vee (x\wedge y)\).

(RMod). Let k be a join-irreducible below the left-hand side of this inclusion. If k is join-prime, then k is below \(x \wedge ( (x \wedge y) \vee \mathtt {d}_{\rho }({\varvec{z}}))\). Otherwise \(k = f\) and, for some \(g \in {D}^{A}\), \(\delta (f,g) \cup \{ g \} \ll \{ x \wedge y,\mathtt {d}_{\ell }({\varvec{z}}) \}\). If \(g \le x \wedge y\), then all the elements that are not below \(x \wedge y\) are below \(\mathtt {d}_{\ell }({\varvec{z}})\) and join-prime, whence they are below \(\mathtt {d}_{\rho }({\varvec{z}})\). It follows that \(f \le x \wedge ( (x \wedge y) \vee \mathtt {d}_{\rho }({\varvec{z}}))\). Otherwise \(g \le \mathtt {d}_{\ell }({\varvec{z}})\) and, by pairwise complete ness, we can also assume that g is the only element below \(\mathtt {d}_{\ell }({\varvec{z}})\), so \(\delta (f,g) \ll \{ x \wedge y \}\). It follows then that \(\delta (g,f) \cup \{ f \} = \delta (f,g) \cup \{ f \} \ll \{ x \}\), \(g \le x\), whence \(g \le x \wedge \mathtt {d}_{\ell }({\varvec{z}})\). Consequently, \(f \le (x \wedge y) \vee (x \wedge \mathtt {d}_{\ell }({\varvec{z}})) \le (x \wedge ((x \wedge y)\vee \mathtt {d}_{\rho }({\varvec{z}}))) \vee (x \wedge \mathtt {d}_{\ell }({\varvec{z}}))\).    \(\square \)

In [12] a second inclusion was shown to hold on relational lattices:

figure k

The same kind of tools used in the proof of Theorem 6 can be used to argue that this inclusion holds on relational lattices. The reader will have noticed the similarity of (VarRL1) with (RL1). As a matter of fact, (VarRL1) was suggested when trying to derive (RL1) from (Unjp) and the other equations as in the following Proposition.

Proposition 1

(RL1) is a consequence of (Unjp), (RMod) and (VarRL1).

Proof

Using (Unjp) and considering that \(y \wedge z \le z \wedge (y \vee x)\), we have:

$$\begin{aligned}&{x \wedge ((y \wedge (z \vee x)) \vee (z \wedge (y \vee x)))} \\&\qquad \qquad = (x \wedge ((y \wedge x) \vee (z \wedge (y \vee x)))) \vee (x \wedge ((y \wedge (z \vee x)) \vee (z \wedge x)))) \,. \end{aligned}$$

Using now (RMod) and considering that \(x \wedge z \le y \vee x\), we compute as follows:

$$\begin{aligned}&{x \wedge ((y \wedge x) \vee (z \wedge (y \vee x)))} \\&\qquad \qquad \qquad = \quad (x \wedge ((y \wedge x) \vee (z \wedge y) \vee (z \wedge x))) \vee (x \wedge z \wedge (y \vee x)) \\&\qquad \qquad \qquad = \quad (x \wedge ((y \wedge x) \vee (z \wedge y) \vee (z \wedge x))) \vee (x \wedge z) \\&\qquad \qquad \qquad = \quad x \wedge ((y \wedge z) \vee (y \wedge x) \vee (z \wedge x))\,. \end{aligned}$$

Considering the symmetric role of y and z, we obtain:

$$\begin{aligned}&x \wedge ((y \wedge (z \vee x)) \vee (z \wedge (y \vee x))) = \quad x \wedge ((y \wedge z) \vee (y \wedge x) \vee (z \wedge x))\\&\qquad \qquad \qquad \qquad \qquad \qquad = \quad (x \wedge y) \vee (x \wedge z)\,, \quad \mathrm{by (VarRL1).} \end{aligned}$$

      \(\square \)

We present now what we consider our strongest result in the study of the equational theory of relational lattices. To this end, let us denote by [[AxRel]] the (set composed of the) four equations (Unjp), (VarRL1), (RMod) and (SymPC). Also, given that we restrict to lattices satisfying (Unjp), and considering the characterization given with Theorem 4, it is convenient to introduce the notation \({k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}\) for the statement \(k_{0},k_{1} \in J(L)\), \(k_{1}\) is non-join-prime, \(k_{1} \not \in C\), and \(k_{0} \lhd _{\mathtt {m}}C \cup \{ k_{1} \}\).

Theorem 7

Let L be a finite atomistic lattice. Then \(L \models [[AxRel]] \) if and only if every nontrivial minimal join-cover contains exactly one non-join-prime element and, moreover, the following properties hold in the OD-graph:

$$\begin{aligned} \bullet \;\;&\text {If } {k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}, \text { then } {k_{1}} \lhd _{\mathtt {m}}^{C} {k_{0}}. \\ \nonumber \bullet \;\;&\text {If } {k_{0}} \lhd _{\mathtt {m}}^{C_{0} \sqcup C_{1}} {k_{2}}, \text { then } {k_{0}} \lhd _{\mathtt {m}}^{C_{0}} {k_{1}} \text { and } {k_{1}} \lhd _{\mathtt {m}}^{C_{1}} {k_{2}}, \text { for some } k_{1} \in \mathcal {J}(L). \end{aligned}$$
(6)

Given Theorem 7, it becomes tempting to look for a representation Theorem. Given a pluperfect atomistic lattice satisfying the above four equations, we would like to define an ultrametric space on the set of non-join-prime elements with distance valued on the powerset of the join-prime ones, and then argue that the lattice constructed via the standard action, defined in (2), is isomorphic to the given lattice. Unfortunately, this idea does not work, since if we try to set \(\delta (k_{0},k_{1}) = C\) whenever \({k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}\), this might be ill defined since the implication “\({k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}\) and \({k_{0}} \lhd _{\mathtt {m}}^{D} {k_{1}}\) implies \(C = D\)” might fail. Moreover, there is no equation nor quasiequation enforcing this, as an immediate consequence of the next Proposition.

Proposition 2

There is an atomistic sublattice of \(\mathsf {R}(\{ 0,1 \},\{ 0,1 \})\) which does not arise from an ultrametric space.

Theorem 7 is a consequence of a more general Theorem, to be stated next, characterizing the OD-graphs of pluperfect lattices in the variety axiomatized by [[AxRel]]. While the conditions stated next may appear quite complex, they are the ones to retain if we aim at studying further the theories of relational lattices by duality—e.g., a sublattice of a relational lattice need not be atomistic.

Theorem 8

A pluperfect lattice belongs to the variety axiomatized by [[AxRel]] if and only if every minimal join-cover contains at most one non-join-prime element and, moreover, the following properties hold in its OD-graph:

figure l

Let us notice that the conditions

figure m

follow from the above properties. On atomistic pluperfect lattices the last condition is equivalent to (6).

Lemma 3

If L is a pluperfect lattice with \(L \models \) (Unjp) and whose OD-graph satisfies ( \(\pi \)-StrongSymPC) and ( \(\pi \)-RMod), then ( \(\pi \)-SymPC) holds as well.

Proof

Let \(k_{1} \lhd _{\mathtt {m}}C_{0} \sqcup C_{1} \sqcup \{ k_{2} \}\) with \(k_{2} \in \mathcal {J}(L)\) and non-join-prime, and use (\(\pi \)-StrongSymPC) to find \(k_{1}\) such that either (i) \(k_{0} \lhd _{\mathtt {m}}\{ k_{1} \} \sqcup C_{1} \sqcup \{ k_{2} \}\) and \(k_{1} \le k_{0} \vee \bigvee C_{1} \vee k_{2}\), or (ii) \(k_{0} \lhd _{\mathtt {m}}C_{0} \sqcup \{ k_{1} \}\) and \(k_{1} \le k_{0} \vee \bigvee C_{0}\). Let us argue, by contradiction, that (i) cannot arise. By (Unjp), \(k_{1}\) is join-prime, whence the relation \(k_{1} \le k_{0} \vee \bigvee C_{1}\) yields \(k_{1} \le k_{0}\). This, however, contradicts (\(\pi \)-RMod).    \(\square \)

We close this section by proving Theorem 8. To this end, we need a generalization of Lemma 1. As the refinement relation is an extension to subsets of the order relation, the relation \(\lhd \!\!\!\lhd _{\mathtt {m}}\), defined next, can be considered as an extension to subsets of the minimal join-cover ing relation.

Definition 2

Let L be a pluperfect lattice and let \(X, Y \subseteq \mathcal {J}(L)\) be antichains. Put \(X \lhd \!\!\!\lhd _{\mathtt {m}}Y\) if \(X \ll \{ \bigvee Y \}\) and \(y \in C_{x_{y}}\) for some \(x_{y} \in X\), for each \(y \in Y\) and whenever \(\{ C_{x} \mid x \in X \}\) is a family of coverings of the form \(x \lhd _{\mathtt {m}}C_{x} \ll Y\).

Lemma 4

Let L be a pluperfect lattice and let \(j \lhd _{\mathtt {m}}C_{0} \sqcup C_{1}\). Suppose that \(\bigvee X \le \bigvee C_{0}\) and \(j \le \bigvee X \vee \bigvee C_{1}\). Then there exists a minimal join-cover of the form \(j \lhd _{\mathtt {m}}D_{0} \sqcup C_{1}\) with \(D_{0} \ll X\) and \(D_{0} \lhd \!\!\!\lhd _{\mathtt {m}}C_{0}\).

While the proof that a pluperfect lattice whose OD-graphs satisfies those properties essentially mimics the proof of Theorem 6, we prove instead the converse direction through a series of Lemmas.

Lemma 5

If (VarRL1) holds on a pluperfect lattice, then its OD-graph satisfies ( \(\pi \)-VarRL1).

Proof

Suppose \(C = \{ k_{1} \} \sqcup \{ k_{2} \} \sqcup D\) with \(k_{0} \lhd _{\mathtt {m}}C\) and \(k_{1},k_{2} \le k_{0}\). Let \(x := k_{0}\), \(y := k_{1} \vee \bigvee D\), \(z := k_{2} \vee \bigvee D\). Then \(k_{1} \le x \wedge y\), \(k_{2} \le x \wedge z\) and \(\bigvee D \le y \wedge z\), whence the left-hand side of (VarRL1) evaluates to \(k_{0}\), which is therefore below the right-hand side of this inclusion. It follows that either \(k_{0} \le y\), or \(k_{0} \le z\), in both cases contradicting the fact that C is a minimal join-cover.    \(\square \)

The inclusion

figure n

is derivable from (Unjp), (SymPC) and (RMod). It can also be shown that (RMod) is a consequence of (Sym).

Lemma 6

If (Sym) holds in a pluperfect lattice, then its OD-graph satisfies (\(\pi \)-Sym).

Proof

Suppose that the inclusion holds and let \({k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}\). Since \(k_{1}\) is non-join-prime, there exists a minimal join-cover \(k_{1} \lhd _{\mathtt {m}}D\) which we can partition into two non empty subsets \(D_{1}\) and \(D_{2}\). Let now \(x := k_{0}\), \(y := \bigvee C\), \(z_{0} := k_{1}\), \(z_{1} = \bigvee D_{1}\), \(z_{2} = \bigvee D_{2}\). Then, the left-hand side of the inclusion evaluates to \(k_{0}\), which therefore is below the right-hand side. Considering that x is \(k_{0}\) and that the unique minimal join-cover of \(k_{0}\) whose elements are all below \(k_{0}\) is \(\{ k_{0} \}\), it follows that either \(k_{0} \le y \vee \mathtt {d}_{\rho }({\varvec{z}})\) or \(k_{0} \le y \vee (\mathtt {d}_{\ell }({\varvec{z}}) \wedge (y \vee x))\).

Argue that \(\mathtt {d}_{\rho }({\varvec{z}}) < \mathtt {d}_{\ell }({\varvec{z}})\), since \(k_{1}\) is join-irreducible, whence by Lemma 1, \(\{ y,\mathtt {d}_{\rho }({\varvec{z}}) \}\) is not a cover of \(k_{0}\), excluding the first case. Therefore \(\{ y,\mathtt {d}_{\ell }({\varvec{z}}) \wedge (y \vee x) \}\) is a cover of \(k_{0}\), whence, by Lemma 1, \(k_{1} = \mathtt {d}_{\ell }({\varvec{z}}) \wedge (y \vee x)\), showing that \(k_{1} \le y \vee x = \bigvee C \vee k_{0}\) and proving the statement.    \(\square \)

Lemma 7

If L is a pluperfect lattice such that \(L \models [[AxRel]] \), then ( \(\pi \)-RMod) holds in its OD-graph.

Proof

Let \({k_{0}} \lhd _{\mathtt {m}}^{C} {k_{1}}\) and put \(C = C_{0} \sqcup C_{1}\) with \(C_{0} \ll \{ k_{0} \}\) and \(c \not \le k_{0}\) for each element \(c \in C_{1}\). As (Sym) whence (\(\pi \)-Sym) hold, we have \(k_{1} \le \bigvee C_{1} \vee \bigvee C_{0} \vee k_{0}\).

We consider next equation (RMod). Put \(x := k_{0}\), \(y := \bigvee C_{0}\), \(z_{0} := \bigvee C_{1} \vee k_{1}\), \(z_{1} := \bigvee C_{1} \vee \bigvee C_{0}\), \(z_{2} := k_{0}\). From \(k_{1} \le \bigvee C_{1} \vee \bigvee C_{0} \vee k_{0}\), we get \(z_{0} \wedge (z_{1} \vee z_{2}) = z_{0}\). Whence, the left-hand side of (RMod) evaluates to \(k_{0}\) so \(k_{0}\) is below the right-hand side of (RMod). Considering that \(\{ k_{0} \}\) is the unique minimal join-cover of \(k_{0}\) whose elements are all below \(k_{0}\), it follows that either \(k_{0} \le z_{0} \wedge (z_{1} \vee z_{2})\) or \(k_{0} \le y \vee (z_{0} \wedge z_{1}) \vee (z_{0} \wedge z_{2}) \).

As \(k_{0} \not \le \bigvee C_{1} \vee k_{1} = z_{0}\), it follows that \(k_{0} \le y \vee (z_{0} \wedge z_{1}) \vee (z_{0} \wedge z_{2}) \). We can use then Lemma 4 to deduce that \(k_{0}\) has a minimal join-cover of the form \(k_{0} \lhd _{\mathtt {m}}C_{0} \sqcup D\), with \(D \ll \{ z_{0} \wedge z_{1},z_{0} \wedge z_{2} \} \ll \{ z_{1},z_{2} \}\). If all the elements of D are below \(z_{1} = \bigvee C_{0} \vee \bigvee C_{1}\), then

$$\begin{aligned} k_{0}&\le \bigvee C_{0} \vee \bigvee D \le \bigvee C_{0} \vee \bigvee C_{1}\,, \end{aligned}$$

contradicting the minimality of \(k_{0} \lhd _{\mathtt {m}}C_{0} \sqcup C_{1} \sqcup \{ k_{1} \}\). Therefore, at least one element of D is below \(z_{2} = k_{0}\). If \(C_{0} \ne \emptyset \), then in the minimal join-cover \(C_{0} \sqcup D\) there are at least two elements that are below \(k_{0}\). This however contradicts (\(\pi \)-VarRL1), whence (VarRL1). We have, therefore, \(C_{0} = \emptyset \).    \(\square \)

Lemma 8

If L is a pluperfect lattice with \(L \models [[AxRel]] \), then ( \(\pi \)-StrongSymPC) holds in is OD-graph.

Proof

By Lemmas 5 and 7, (\(\pi \)-RMod) and (\(\pi \)-VarRL1) hold in the OD-graph.

Let \(x := k_{0}\), \(y := \bigvee C_{0}\), \(z := \bigvee C_{1}\). Then the left-hand side of (SymPC) evaluates to \(k_{0}\) which is therefore below the right-hand side. Thus, by Lemma 4, there is a minimal join-cover of the form \(k_{0} \lhd _{\mathtt {m}}D_{0} \sqcup D_{1}\) with either (i) \(D_{0} \lhd \!\!\!\lhd _{\mathtt {m}}C_{0}\), \(D_{0} \ll \{ y \wedge (x \vee z) \}\), and \(D_{1} = C_{1}\), or (ii) \(D_{0} = C_{0}\), \(D_{1} \lhd \!\!\!\lhd _{\mathtt {m}}C_{1}\), and \(D_{1} \ll \{ z \wedge (x \vee y) \}\).

W.l.o.g. we can suppose that (i) holds. From \(D_{0} \ll \{ y \wedge (x \vee z) \} \ll \{ x \vee z \} = \{ k_{0} \vee \bigvee C_{1} \}\), we can argue as follows. We notice first that if an element of \(D_{0}\) is join-prime, then it is either below \(k_{0}\) or below some \(c \in C_{1}\); since \(D_{0} \sqcup C_{1}\) is an antichain, this element is below \(k_{0}\). Therefore, if all the elements of \(D_{0}\) are join-prime, then, by (\(\pi \)-VarRL1), \(D_{0} = \{ k' \}\). Otherwise, there exists a non-join-prime element \(k'\) in \(D_{0}\) and, by (Unjp), this is the only non-join-prime in \(D_{0}\). Write \(D_{0} = \{ k' \} \sqcup E\), then every element of E is join-prime and, as seen before, we need to have \(E \ll \{ k_{0} \}\). Then (\(\pi \)-RMod) enforces \(E_{0} = \emptyset \) and \(D_{0}= \{ k' \}\). In both cases, the relation \(\{ k' \} = D_{0} \lhd \!\!\!\lhd _{\mathtt {m}}C_{0}\) yields \(k' \lhd _{\mathtt {m}}C_{0}\).    \(\square \)

Finally, in order to understand the structure of finite lattices in the variety of axiomatized by [[AxRel]], let \(\mathcal {J}_\mathtt {p}(L)\) denote the set of join-prime elements of L and consider the following property:

figure o

The next Lemma ensures the existence of a non-join-prime element in a cover in finite atomistic lattices, as stated in Theorem 7.

Lemma 9

If a finite lattice L satisfies [[AxRel]], then ( \(\pi \)-JP) holds in its OD-graph. In particular, if L is atomistic, then \(k_{0} \lhd _{\mathtt {m}}C\) implies that \(k_{1} \in C\) for some non-join-prime \(k_{1}\).

It can be shown that the finiteness assumption in Lemma 9 is necessary.

7 Conclusions and Further Directions

Some undecidable problems. Our main result, Theorem 7, characterizes the OD-graphs of finite atomistic lattices satisfying [[AxRel]] as structures similar to frames for the commutator logic \([\mathrm {S5} ]^{n}\), the multimodal logic with n distinct pairwise commuting \(\mathrm {S5} \) modal operators, see [10]. We exemplify next how to take advantage of such similarity and of the existing theory on combination of modal logics, to deduce undecidability results. As this is not the main goal of the paper, we delay a full exposition of these ideas to an upcoming set of notes.

An \([\mathrm {S5} ]^{n}\) frame is a structure \(\mathfrak {F}= (F,R_{1},\ldots ,R_{n})\) where each \(R_{i}\) is an equivalence relation on F and, moreover, the confluence property holds: if \(i \ne j\), \(xR_{i}y\) and \(xR_{j}z\), then \(y R_{j}w\) and \(zR_{i} w\) for some \(w \in F\). A particular class of \([\mathrm {S5} ]^{n}\) frames are the universal \(\mathrm {S5} ^{n}\)-products, those of the form \(\mathfrak {U}= (F,R_{1},\ldots ,R_{n})\) with \(F = X_{1} \times \ldots \times X_{n}\) and \((x_{1},\ldots ,x_{n})R_{i}(y_{1},\ldots ,y_{n})\) if and only if \(x_{j} = y_{j}\) for each \(j \ne i\).

For a frame \(\mathfrak {F}= (W, R_{1},\ldots ,R_{n})\) and \(X \subseteq \{ 1,\ldots ,n \}\), let us say that \(Y \subseteq W\) is X-closed if \(w_{0} \in Y\), whenever there is a path \(w_{0}R_{i_{0}}w_{1}\ldots w_{k-1}R_{i_{k}} w_{k}\) with \(\{ i_{0},\ldots ,i_{k} \} \subseteq X\) and \(w_{k} \in Y\). Then X-closed subsets are closed under intersections, so subsets of \(\{ 1,\ldots ,n \}\) give rise to closure operators \(\langle X \rangle \) and to an action as defined in Sect. 3. Let \(\mathsf {L}(\mathfrak {F}) = P(\{ 1,\ldots ,n \}) \ltimes _{j}P(W)\) and notice that \(\mathsf {L}(\mathfrak {F})\) is atomistic. A frame \(\mathfrak {F}\) is initial if there is \(f_{0} \in F\) such every other \(f \in F\) is reachable from \(f_{0}\); it is full if, for each \(i = 1,\ldots ,n\), \(R_{i}\) is not included in the identity. If \(\mathfrak {F}\) is initial and full, then \(\mathsf {L}(\mathfrak {F})\) is subdirectly irreducible. A p-morphism is defined as usual in modal logic. The key observation leading to undecidability is the following statement.

Theorem 9

There is a surjective p-morphism from a universal \(\mathrm {S5} ^{n}\)-product frame \(\mathfrak {U}\) to a full initial frame \(\mathfrak {F}\) if and only if \(\mathsf {L}(\mathfrak {F})\) embeds in a relational lattice.

Proof

(Sketch). The construction \(\mathsf {L}\) is extended to a contravariant functor, so if \(\psi : \mathfrak {U}\xrightarrow {\quad }\mathfrak {F}\) is a p-morpshim, then we have an embedding \(\mathsf {L}(\psi )\) of \(L(\mathfrak {F})\) into \(\mathsf {L}(\mathfrak {U})\). We can assume that all the components \(X_{1}, \ldots , X_{n}\) of \(\mathfrak {U}\) are equal, so \(X_{i} = X\) for each \(i = 1,\ldots ,n\); if this is the case, then \(\mathsf {L}(\mathfrak {U})\) is isomorphic to the relational lattice \(\mathsf {R}(\{ 1,\ldots ,n \},X)\).

The converse direction is subtler. Let \(\chi : \mathsf {L}(\mathfrak {F}) \xrightarrow {\quad }\mathsf {R}(A,D)\) be a lattice embedding; since \(\mathsf {L}(\mathfrak {F})\) is subdirectly-irreducible, we can suppose that \(\chi \) preserves bounds; its left adjoint \(\mu : \mathsf {R}(A,D) \xrightarrow {\quad }\mathsf {L}(\mathfrak {F})\) is then surjective. Since both \(\mathsf {L}(\mathfrak {F})\) and \(\mathsf {R}(D,A)\) are generated (under possibly infinite joins) by their atoms, each atom \(x \in \mathsf {L}(\mathfrak {F})\) has a preimage \(y \in \mathsf {R}(D,A)\) which is an atom. Consider now \(S_{0} = \{ f \in {D}^{A}\mid \mu (f) \text { is a non-join-prime atom} \}\) and make it into a \(P(\{ 1,\ldots ,n \})\)-valued ultrametric space by letting \(\delta _{S_{0}}(f,g) = \mu (\delta (f,g)) \subseteq \{ 1,\ldots ,n \}\)—we use here the fact that \(\mu \) sends join-prime elements to join-prime elements. \(S_{0}\) is shown to be a pairwise complete ultrametric space over \(\{ 1,\ldots ,n \}\). We prove that pairwise complete ultrametric spaces over a finite set B are in bijection with universal \(\mathrm {S5} ^{n}\)-product frames, with \(n = \mathrm{card}\,B\). Then the restriction of \(\mu \) to \(S_{0}\) is a surjective p-morphism from \(S_{0}\) to (a frame isomorphic to) \(\mathfrak {F}\).    \(\square \)

In view of the following statement, which relies on [8] and can be inferred from [7]: “for \(n \ge 3\), it is undecidable whether, given a finite full initial frame \(\mathfrak {F}\), there is a surjective p-morphism from a universal \(\mathrm {S5} ^{n}\) -product \(\mathfrak {U}\) to \(\mathfrak {F}\)”, we deduce the following undecidability results, which partially answer Problem 4.10 in [12].

Corollary 3

It is undecidable whether a finite subdirectly irreducible atomistic lattice embeds into a relational lattice. Consequently, the quasiequational theory of relational lattices in the pure lattice signature is also undecidable.

Comparison with Litak et al. [12]. We have presented our first contribution to the study of the equational theory of relational lattices. In [12] two equations in the larger signature with the header constant are presented as a base for the equational theory of relational lattices. As mentioned there, the four equations of [[AxRel]] are derivable from these two equations. Therefore, we can also think of the present work as a contribution towards assessing or disproving completeness of these two axiomatizations. Yet, we wish to mention here and emphasize some of our original motivations. Lattice theoretic equations are quite difficult to grasp, in particular if considered on the purely syntactic side, as done for example in [12]. Duality theory attaches a meaning to equations via the combinatorial properties of the dual spaces. This process is nowadays customary in modal and intuitionistic logic and gives rise to a well defined area of research, correspondence theory. Our aim was to attach meaning to the equations of relational lattices. The answer we provide is, at the present state of research, via the relevant combinatorial properties, symmetry and pairwise complete ness. From this perspective, the results presented in Sect. 6 undoubtedly need further understanding. In particular it is worth trying to modularize them, so as to discover equations exactly corresponding to symmetry or, respectively, to pairwise complete ness; alternatively, argue that these equations do not exist. Finally, the present work opens new directions and challenges for the duality theory developed in [16]—of which, we hope we have illustrated the fruitfulness—including a better understanding of how to generalize it to the infinite case, new mechanisms by which to devise correspondence results, natural conjectures concerning equations having correspondents in finite lattices.