1 Introduction

The graph of an algebra A=(A,O) is the relational structure

$${\mathsf{G}}(\mathbf{A})=\bigl(A,\{R_o \mid o\in O\}\bigr), $$

where each R o is the graph of an operation o. This means that if o is an n-ary operation, then R o is the (n+1)-ary relation consisting of those tuples (a 0,…,a n ) which satisfy o(a 0,…,a n−1)=a n . We will work mostly with groupoids (semigroups in fact) and, without a risk of ambiguity, we will omit the subscript o. For a class 𝒞 of algebras by G(𝒞) we denote the class of all graphs of algebras from 𝒞. In [15, Theorem 1] it is proved that there is no finite basis for the quasi-equational theory (and thus for the universal Horn theory) of G(𝒞) whenever 𝒞 is a class of semigroups possessing a nontrivial member with a neutral element, that is, an element e such that ae=ea=a for all a. (The case when 𝒞 consists of any individual two-element semigroup with a neutral element was proved earlier by Gornostaev in [8], see also [7, Sect. 6.2].) Here we indicate that this shortcoming of relational structures, compared to algebras, carries over to the topological setting. Every finite structure X when equipped with the discrete topology becomes a topological structure . Following Clark, Davey, Jackson and Pitkethly [6], we define the Boolean core ℋ BC of a universal Horn class ℋ as the topological prevariety generated by the finite members of ℋ (treated as topological structures). Notably, ℋ BC consists of all profinite structures built, as inverse limits, from finite members of ℋ [6, Corollary 2.4]. Specifically, ℋ BC is the class of topologically closed substructures of products, with nonempty indexing sets, of finite members of ℋ. So the topology on members of ℋ BC is Boolean, that is, compact, Hausdorff, and totally disconnected. We are interested in when ℋ BC admits a first-order axiomatization (relative to all Boolean topological structures in the language of ℋ). With respect to this problem, our contribution is a proof of the following fact.

Theorem 1.1

Let 𝒞 be a class of semigroups possessing a nontrivial member with a neutral element andbe the universal Horn class generated by G(𝒞). Then its Boolean core BC is not first-order axiomatizable.

Little modifications in the proof of Theorem 1.1 give us the following corollary.

Corollary 1.2

Let 𝒞 be a class of monoids or groups possessing a nontrivial member andbe the universal Horn class generated by G(𝒞). Then its Boolean core BC is not first-order axiomatizable.

First order axiomatizability for topological prevarieties of relational structures was investigated in a series of papers [10, 1618] by Jackson and the second author. Results obtained there, which are recalled below, together with our Theorem 1.1, suggest that first-order logic is not the right tool for describing topological prevarieties of relational structures. Clark and Krauss proposed in [3] a logic in which every topological prevariety may be defined. It is so because this logic is capable of expressing convergence. Still, it seems to be too complex for applications. Thus, the general problem of finding a simpler logic, in which we could axiomatize most topological prevarieties of relational structures, is open.

Before delving into the context of our research, we present an example showing that we cannot drop the assumption of possessing a nontrivial member with a neutral element in Theorem 1.1.

Example 1.3

Let 𝒵 be the class of semigroups satisfying

$$\bigl(\forall u,v,u',v'\bigr)\bigl[u\cdot v\approx u'\cdot v'\bigr] $$

and let 𝒲 be the universal Horn class UHG(𝒵). It is noted in [15, p. 297] that 𝒲 is axiomatized by two sentences

$$\begin{aligned} &\bigl(\forall u, v, w, w'\bigr)\bigl[R(u, v, w) \wedge R\bigl(u, v, w'\bigr)\to w\approx w'\bigr] \quad\text{and} \\ &\bigl(\forall u, v, u', v',w\bigr)\bigl[R(u, v, w) \to R\bigl(u', v', w\bigr)\bigr]. \end{aligned}$$

We will use Separation Principle 3.1 to show that the Boolean core 𝒲 BC consists of all members from 𝒲 equipped with a Boolean topology. So let be a Boolean topological structure, with the non-topological reduct X=(X,R X) satisfying the above sentences. Then R X=∅ or R X=X 2×{p} for some pX. Let 2 be the structure ({0,1},∅). Clearly the topological structure belongs to 𝒲 BC . Since has a Boolean topology, for every pair of distinct elements x,yX there is a continuous mapping (here and are just topological spaces) separating points x,y. When R X=∅, the map h x,y is also a homomorphism from X onto 2. Thus, by the Separation Principle, . Now suppose R X=X 2×{p}. For xy in X let S x,y be the two-element semigroup with the same carrier set as 2 and the multiplication defined by ab=h x,y (p) for a,bS. Then is a continuous homomorphism separating elements x and y. For (x,y,z)∈X 3R X we have zp and we may consider the continuous homomorphism . Then the triple (h z,p (x),h z,p (y),h z,p (z)) does not belong to the relation of G(S z,p ), and again by the Separation Principle we conclude that .

Similarly one may show that the Boolean core of the class of graphs of semigroups satisfying (∀u,v)[uvu] is axiomatizable by a finite number of universal Horn sentences.

2 Related works and two problems

2.1 Semigroups

There is not currently a general classification of first-order axiomatizability for topological prevarieties of semigroups. However, some axiomatizability results have been proven. Probably the first one is Numakura’s theorem [13] that every semigroup with a Boolean topology is an inverse limit of finite semigroups (it follows easily that is in the Boolean core of the class of all semigroups). Thus, in contrast to our result, the Boolean core of the class of all semigroups is equal to the class of all Boolean topological semigroups, and is therefore axiomatizable by the associativity axiom. We consider the situation when the Boolean core ℋ BC of a universal Horn class ℋ is axiomatized by the universal Horn theory of ℋ, as for the class of all semigroups and the class 𝒲 from Example 1.3, as the best possible. Following [4], we call such ℋ standard.

Numakura’s theorem has a far reaching generalization. It follows from the result of Clark, Davey, Freese and Jackson [5, Theorem 8.1, Example 8.3] that the members of ℋ are all profinite whenever ℋ is a variety and has finitely determined syntactic congruences. In particular, it holds when ℋ is a variety of semigroups, monoids, groups, rings or is a variety with definable principal congruences. Now Lemma 2.8 of [6] shows that since ℋ is a variety, the members of ℋ are actually inverse limits of finite members of ℋ, whence ℋ is standard.

Let us recall two more specific results about semigroups. For universal Horn classes UH(S) generated by a finite cyclic semigroup S it is shown in [6, Theorem 9.1] that the following properties are equivalent: UH(S) is standard; the Boolean core of UH(S) is first-order axiomatizable; UH(S) is finitely axiomatizable; S has index at most 2. Combined with our result and [15], this shows that UH(S) may be standard and finitely axiomatizable while UHG(S) is neither standard nor finitely axiomatizable. We would like to recall also Jackson’s result [9, Theorem 7.4] that the universal Horn class generated by a finite completely simple semigroup S is finitely axiomatizable iff there is some finitely generated standard universal Horn class containing S (which need not be the universal Horn class generated by S).

2.2 Relational structures

For some universal Horn classes of relational structures the question of first-order definability of Boolean cores is settled. Based on this, it seems that this property is extremely rare. Let us look more closely at what is known.

A classification for universal Horn classes of reflexive antisymmetric digraphs was obtained by the second author. She proved in [18, Theorem 1.1] that such a class has a first-order definable Boolean core iff it is properly contained in the class 𝒫 of ordered sets, i.e., its all members are antichains, iff it is standard. She also provided a classification, though more technical, for universal Horn classes of bipartite digraphs without cycles. Here again first-order definability of the Boolean core was found to be equivalent to standardness [16, Theorem 1.1].

An interesting general result, connected to constraint satisfaction problems, was obtained by Jackson and the second author. Let X be a finite relational structure in a finite language. The class A(X) consisting of all relational structures, in the language of X, admitting a homomorphism into X, is the antivariety generated by X. Actually, A(X) is also a finitely generated universal Horn class (see [7, Theorem 3.1.11], [10, Lemma 6]). Then the lack of a finite axiomatization for A(X) yields the lack of a first-order axiomatization for A(X) BC [10, Theorem B]. Note that, as explained in the introduction of [15], the finite axiomatizability of A(X) is a rare property. Indeed, it is equivalent to the fact that the finite membership problem for A(X), the so called constraint satisfaction problem with the target X, is in the complexity class non-uniform AC0 [1, Theorem 2]. Note also that the converse of [10, Theorem B] holds provided X is a bipartite digraph, and such an antivariety is finitely axiomatizable iff it is standard iff all edges in X are directed from one part to the second part of this digraph [10, Theorem C].

Unfortunately, we do not have such a general result for simple graphs (treated as symmetric and anti-reflexive digraphs). However, the second author verified that the universal Horn class generated by a clique with at least three elements does not admit a first-order axiomatization for its Boolean core [17, Theorem 4.7]. The same holds for the universal Horn class generated by the three-element path [17, Corollary 3.5]; see below for more about this example.

Actually, quite surprisingly, there is no known example of a non-standard universal Horn class of relational structures with a first-order definable Boolean core.

Problem 2.1

Is there a non-standard universal Horn class of relational structures with a first-order axiomatizable Boolean core?

In [15] it was shown by the first author that if ℋ is as in Theorem 1.1 then ℋ is not finitely axiomatizable. This was done by finding, for each n, a structure X n ∉ℋ such that all n-element substructures of X n are in ℋ. The method used in the present article to demonstrate non-standardness is Theorem 4.2 taken from [6], which requires that there exist structures X n having the property just described and, additionally, that these structures can be assembled into an inverse limit satisfying certain conditions. Thus inverse limits satisfying the conditions of Theorem 4.2 witness both the non-standardness and the non-finite axiomatizability of a universal Horn class.

However, in general it is not true that either finite axiomatizability yields standardness for universal Horn classes or standardness yields finite axiomatizability. Indeed, Stralka’s well-known example (which we discuss further in Sect. 5.3) shows that the class of Priestley spaces (which is the Boolean core 𝒫 BC of the class of ordered sets 𝒫) is not equal to the class of Boolean topological ordered sets [14]. Thus 𝒫 is not standard. Actually, as we already recalled, 𝒫 BC is not even first-order axiomatizable. This fact was first proved by Clark, Davey, Jackson and Pitkethly in [6, Example 6.2]. Another such example is given by the universal Horn class generated by the simple graph which is a three-element path. This class consists of disjoint sums of complete bipartite graphs and isolated vertices. Indeed, from [12, Theorem 3.2] it follows that is finitely axiomatizable, and in [17, Corollary 3.5] it is shown that is not first-order axiomatizable. On the other hand, there are varieties of semigroups which are not finitely axiomatizable [19] and, as already mentioned, all of them are standard. (There are no known such finitely generated universal Horn classes; see [6, Problem 3].)

As we have just noted, standardness does not imply finite axiomatizability. However, the last result we wish to recall states that this implication does hold for universal Horn classes generated by a finite number of finite simple graphs. Such a class is standard iff it is one of ∅, UH(•), , [17, Theorem 2.4], and all of them are finitely axiomatizable [12, Theorem 3.2].

Actually, there is no known example of a universal Horn class of relational structures that is standard but not finitely axiomatizable. Let us formulate this as the second specific problem (in the finitely generated case it is Problem 3 in [6]).

Problem 2.2

Is there a universal Horn class of relational structures which is standard but not finitely axiomatizable?

3 Background

Here we briefly review needed concepts. However the reader should consult a seminal article in the topic [6]. Moreover, in Sects. 4 and 5.1 we heavily use results from [15]. Standard books about universal algebra [2] and quasivarieties [7, 11] may be helpful.

Let us fix an underlying relational language ℒ, i.e., a set of relation symbols with ascribed arities. By a topological (relational) structure we mean a triple

where X=(X,{R XR∈ℒ}) is a relational structure and 𝒯 is a topology on X such that every relation R X is closed in , meaning that R X is a closed subset of (X,𝒯)n, where n is the arity of R. In this article we actually consider only Boolean topologies, i.e., compact, Hausdorff and totally disconnected. Obviously, every finite structure X becomes a Boolean topological structure when equipped with the discrete topology. More notably, this is true for every profinite structure, that is, every structure that is an inverse limit of finite structures, with the relative product topology.

A topological prevariety is a class of Boolean topological structures that is closed taking isomorphic images, closed substructures and direct products with a nonempty indexing set. The smallest topological prevariety containing 𝒦, i.e., generated by 𝒦, consists of structures which are isomorphic to closed substructures of products with nonempty indexing sets of topological structures from 𝒦. A structure X is trivial if |X|=1 and all its relations are full. We have the following useful fact.

Separation Principle 3.1

[3, Corollary 1.3]

Let 𝒦 be a class of Boolean topological structures, and let be a compact topological structure with a nontrivial non-topological reduct. Then belongs to the topological prevariety generated by 𝒦 if and only if for each R, which is a relation symbol in the language of 𝒦 or the equality symbol, and for every tuple \(\bar{x}\in X^{(\mathrm{arity}\ \mathrm{of}\ R)}-R^{\mathbf{X}}\), there are and a continuous homomorphism such that \(h(\bar{x})\notin R^{\mathbf{Y}}\).

A sentence, in ℒ, is universal if it is of the form \((\forall\bar{x}) \varphi(\bar{x})\), where \(\varphi(\bar{x})\) is a formula without occurrences of quantifiers. The universal theory of a class 𝒞 of structures is the set of all universal sentences true in 𝒞. A Horn clause is a formula without occurrences of quantifiers of the form

$$\psi_0\wedge\cdots\wedge\psi_{n-1}\to\psi\quad\text{or} \quad \neg\psi_0\vee\cdots\vee\neg\psi_{n-1}, $$

where all ψ i ,ψ are atomic. An universal Horn sentence is a universal sentence with the quantifier-free part being a conjunction of Horn clauses. A universal Horn class of structures is a class definable by a set of universal Horn sentences or, equivalently, a class closed under taking substructures, ultraproducts and products with nonempty indexing sets [2, Theorem 2.23].

The Boolean core BC of a universal Horn class ℋ is the topological prevariety generated by . Clearly, every member of ℋ BC has a Boolean topology. We are interested in when ℋ BC can be axiomatized in a nice way. More precisely, by an axiomatization of ℋ Bc we mean an axiomatization relative to the class of all Boolean topological structures in the language of ℋ. In this article by nice we mean in (a fragment of) first-order logic. A desirable situation happens when ℋ BC coincides with the class ℋ BT of all Boolean topological structures with non-topological reducts in ℋ. Then ℋ BC is definable by the universal Horn sentences true in ℋ, and we say that ℋ is standard. When ℋ is in a relational language this property is equivalent to the axiomatizability of ℋ BC by any set of universal Horn sentences. Indeed, this follows from the fact that every subset, and in particular every finite subset, of a carrier of a relational structure X is the carrier of a substructure of X, and consequently every universal Horn class is generated by the class of its finite members.

We already mentioned in the introduction that ℋ BC is the class of profinite structures built, as inverse limits, from finite members of ℋ. We use only a special case of the inverse limit construction. Let X n , \(n\in \mathbb{N}\), be a family of finite structures indexed by the natural numbers and accompanied by a family of surjective homomorphisms φ n−1:X n X n−1, n>0. The surjective inverse limit of the system X n , \(n\in \mathbb{N}\), and φ n−1, n>0, is the topological substructure of with the carrier .

4 Lack of standardness

Proposition 4.1

Let 𝒞 be a class of semigroups possessing a nontrivial member with a neutral element. Then the universal Horn class generated by G(𝒞) is non-standard.

Let be a surjective inverse limit of finite structures and ℋ be a universal Horn class in the same language. We say that is pointwise non-separable with respect to ℋ if there is a k-ary relation symbol R (the equality symbol is allowed) in the language of and an k-tuple (x 0,…,x k−1)∈X kR X such that for every \(n\in \mathbb{N}\), for every homomorphism h from X n into a finite member Y of ℋ we have

$$\bigl(h\bigl(x_0(n)\bigr),\ldots,h\bigl(x_{k-1}(n)\bigr) \bigr)\in R^\mathbf{X}. $$

The importance of this notion comes from the fact that if is pointwise non-separable with respect to ℋ, then [6, Lemma 3.3].

In the proof of Proposition 4.1 we will use the following fact.

Theorem 4.2

[6, Second Inverse Limit Technique 3.9]

Assume that the underlying language is relational and finite. Let be a surjective inverse limit of finite structures, and letbe a universal Horn class. Assume that is pointwise non-separable with respect toand that the following condition holds

(S)

Then andis non-standard.

Proof of Proposition 4.1

We construct a surjective inverse limit of finite structures satisfying all conditions from Theorem 4.2 for ℋ.

We build \(\mathbf{X}_{n}=(X,R^{\mathbf{X}_{n}})\) from M =(M,R ) constructed in [15, Sect. 2] for every natural number n. Let

$$X_n=M\cup\{c_\infty\} $$

and

$$R^{\mathbf{X}_n}= R^\Diamond\cup\bigl\{ (c_\infty,x,x)\mid x\in X_n\bigr\} \cup\bigl\{ (x,c_\infty,x)\mid x\in X_n \bigr\} $$

when ◊∈{>,∨}, and

$$R^{\mathbf{X}_n}=R^\Diamond\cup\bigl\{ (c_\infty,x,x)\mid x\in X_n\bigr\} \cup\bigl\{ (x,c_\infty,x)\mid x\in X_n \bigr\} \cup\bigl\{ (x,x,c_\infty)\mid x\in X_n\bigr\} $$

when ◊=2. Here c should be thought of as a neutral element. Clearly M X n . Now let us define the connecting surjective mappings φ n−1:X n X n−1 by

$$\varphi_{n-1}(x)= \begin{cases} x &\text{if } x\in X_{n}-\{c_n,d_n,d'_n\};\\ c_\infty&\text{if } x=c_n;\\ d_{n-1} &\text{if } x=d_n;\\ d'_{n-1} &\text{if } x=d'_n. \end{cases} $$

Note that the carrier set of , abusing the notation, is

$$\begin{aligned} &X=\bigl\{ a_0,a_1,a'_0,a'_1,b,c_0, \ldots,c_n,\ldots,c_\infty,\\ &\hphantom{X=\bigl\{ }d_0, \ldots,d_n,\ldots,d_\infty, d'_0, \ldots,d'_n,\ldots,d'_\infty, e\bigr\} , \end{aligned}$$

where \(a_{0},a_{1},a'_{0},a'_{1},b,e,c_{\infty}\) stand for constant mappings taking the value they indicate,

$$\begin{aligned} c_n(k) =& \begin{cases} c_n & \text{if }k\geqslant n;\\ c_\infty& \text{if }k<n, \end{cases} \qquad d_n(k)= \begin{cases} d_n & \text{if }k\geqslant n;\\ d_k & \text{if }k<n, \end{cases} \qquad d'_n(k)= \begin{cases} d'_n & \text{if }k\geqslant n;\\ d'_k & \text{if }k<n, \end{cases} \\ d_\infty(k) =&d_k,\qquad d'_\infty(k)=d'_k \quad\text{for all }k. \end{aligned}$$

Now we check the satisfaction of all conditions from Theorem 4.2 one by one.

Claim 4.3

Every φ n−1 is a homomorphism, and thus indeed is a surjective inverse limit of finite structures.

Proof

In [15, Lemma 2] it is shown that there is a structure W (which is there the graph of an appropriate semigroup) and a mapping ε n,k :M−{c k }→W n+6 (denoted there ε k ), which is an embedding of the substructure of M with the carrier M−{c k } into W n+6. Let X n,k be the substructure X n with the carrier X n −{c k }. Inspecting the definition of ε n,k given in [15, Table 1], we see that ε n,k may be extended to an embedding of X n,k into W n+6 by assigning a value for c to be the tuple of zeros. Let us denote this extension also by ε n,k . Again by inspecting [15, Table 1], the following diagram commutes

where π n−1 removes from (n+6)-tuples the next-to-last entry. As π n−1 is a homomorphism, \(\varphi_{n-1}|_{ X_{n,k}}\) must also be a homomorphism. Since the arity R is three, this gives us that φ n−1 is a homomorphism from X n onto X n−1 for n⩾4. Actually, this is all we need, as we could equally well start indexing in the inverse limit from 4. Still, the claim is true for all n⩾1, and the curious reader may verify it. □

Claim 4.4

is pointwise non-separable with respect to ℋ.

Proof

It follows from the proof of [15, Claim on p. 301] that if h:X n Y is a homomorphism into the graph of a semigroup, then \(\mathbf{Y}\models R(h(a'_{0}),h(d'_{n}),h(e))\). Thus in particular is pointwise non-separable with respect to ℋ, which is witnessed by the triple \((a'_{0},d'_{\infty},e)\). □

Claim 4.5

The condition (S) holds for .

Proof

Let YX n , |Y|⩽n and Z=Y−{c }. In [15, Claim on p. 302] it is shown that the structure Z, with the carrier set Z, is isomorphic to a substructure U of G(S n+6), where S is a semigroup from 𝒞 with a neutral element. Moreover, the neutral element of S n+6 is not in U. Hence also Y is isomorphic to a substructure of G(S n+6). □

This completes the proof of Proposition 4.1. □

5 Lack of first-order axiomatization

5.1 Non-idempotent case

Proposition 5.1

Let 𝒞 be a class of semigroups possessing a nontrivial non-idempotent member with a neutral element. Letbe the universal Horn class generated by G(𝒞). Then BC is not first-order axiomatizable.

Let λ be a positive integer. A λ-compactification of a set X is an idempotent map γ:XX with |γ(X)|⩽λ. A topology on X induced by a λ-compactification γ:XX consists of all subsets U of X such that the set γ −1(x)−U is finite for every xUγ(X). A topology induced by a λ-compactification is always Boolean.

In the proof of Proposition 5.1 we will use the following fact.

Theorem 5.2

[6, Second Ultraproduct Technique 5.3]

Letbe a non-standard universal Horn class, with a witness , in a finite and relational language. Assume that

  1. (1)

    there is a λ-compactification γ X:XX such that the topology of is induced by γ X,

  2. (2)

    each model (Y,γ Y) of the universal theory of (X,γ X) becomes a Boolean topological structure when equipped with the topology induced by γ Y.

Then BC is not first-order axiomatizable.

Let X be a structure. For a relational symbol R in the language of X and an element xX let \(\operatorname {Nb}_{R}(x)\) be the set of tuples from R X in which x occurs. For a finite number d we say that a structure X is of degree almost d-bounded relative to a map γ:XX provided that for every relation symbol R in the language of X and every element x of Xγ(X) the set \(\operatorname {Nb}_{R}( x)\) has at most d elements.

Lemma 5.3

Let be a topological relational structure with a topology induced by a λ-compactification γ X:XX. Assume that X is of degree almost d-bounded relative to γ X for some finite number d. Then in every model (Y,γ Y) of the universal theory of (X,γ X) the mapping γ Y is a λ-compactification of Y inducing a topology in which all relations of Y are closed.

Proof

Since we may consider each relation separately, we assume that there is just one, say n-ary, relation symbol R in the language of . Let C be a finite subset of X, D be a new unary relation symbol and \(\mathbf{X}_{C}=(X,R^{\mathbf{X}_{C}},D^{\mathbf{X}_{C}})\), where \(R^{\mathbf{X}_{C}}=R^{\mathbf{X}}\), \(D^{\mathbf{X}_{C}}=C\). Since C is finite and the topology of is Hausdorff, X C when equipped with the same topology, becomes a Boolean topological structure .

It is sufficient to prove that there is a finite set CX such that whenever (Y,R Y,D Y,γ Y) models the universal theory of (X C ,γ X), then γ Y induces a Boolean topology in which R Y is closed. For let us assume that (Y,γ Y) models the universal theory of (X,γ X). By [2, Theorem V.2.20], (Y,γ Y) is a substructure of an ultrapower of (X,γ X), and hence it may be expanded to a substructure of an ultrapower of (X C ,γ X).

Since the set (γ X(X))nR X is finite and R X is closed in , for every element xγ X(X) we may define an open neighborhood U x ⊆(γ X)−1(x) of x such that, whenever (x 0,…,x n−1)∈(γ X(X))nR X, we have

$$U_{x_0} \times\cdots\times U_{x_{n-1}} \cap R^\mathbf{X}= \emptyset. $$

Let \(Z=\bigcup_{x\in\gamma^{\mathbf{X}}(X)}U_{x}\) and define C=XZ. Note that the finiteness of all sets (γ X)−1(x)−U x , xγ X(X), yields the finiteness of C. Moreover, thus chosen Z and C guarantee that

$$ \gamma^\mathbf{X}(\bar{x})\in R^\mathbf{X}\quad\text{provided}\quad \bar{x}\in R^\mathbf{X}\cap\bigl(X-D^{\mathbf{X}_C}\bigr)^n. $$
(H)

Now take a model Y=(Y,R Y,D Y,γ Y) of the universal theory of (X C ,γ X). Then:

  1. (i)

    γ Y is a λ-compactification of Y,

  2. (ii)

    Y is almost d-bounded relative to γ Y,

  3. (iii)

    D Y is finite and γ Y(Y)∩D Y=∅,

  4. (iv)

    \(\gamma^{\mathbf{Y}}(\bar{y})\in R^{\mathbf{Y}}\) provided \(\bar{y}\in R^{\mathbf{X}}\cap(Y-D^{\mathbf{Y}})^{n}\).

Note that (iii) holds because \(C=D^{\mathbf{X}_{C}}\) is finite and does not intersect with γ X(X). Also (iv) holds because the property (H) is expressible by a universal sentence.

Let \(\bar{y}=(y_{0},\ldots,y_{n-1})\in Y^{n}-R^{\mathbf{Y}}\). The proof will be finished when (relative to the topology induced by γ Y) we find, for each i<n, an open neighbourhood O i of y i such that O 0×⋯×O n−1R Y=∅. Let J={i<ny i γ Y(Y)}.

Case when J≠∅: Let N be the set of elements occurring in the tuples from \(\bigcup_{i \in J} \operatorname {Nb}_{R}(y_{i})\). For i<n define

$$O_i= \begin{cases} \{y_i\} & \text{if }i \in J;\\ \gamma^{-1}(y_i)-N\cup\{y_i\} &\text{if }i \notin J. \end{cases} $$

Note that by (ii), the set N has at most n 2 d elements. In particular, it is finite and every O i is open. Note also that we had to add {y i } in the above formula because it may happen that y i N. Now, the definition of O i yields O 0×⋯×O n−1R Y=∅.

Case when J=∅: For i<n define

$$O_i = \bigl(\gamma^\mathbf{Y}\bigr)^{-1}(y_i)-D^\mathbf{Y}. $$

By (iii), O i is an open neighborhood of y i . Moreover, by (iv) and the fact that \(\bar{y}\notin R^{\mathbf{Y}}\), we have O 0×⋯×O n−1R Y=∅. □

Proof of Proposition 5.1

Let be the topological structure constructed in the proof of Proposition 4.1. Define γ X:XX by

$$\gamma^\mathbf{X}(x)= \begin{cases} x &\text{if } x\in\{a_0,a_1,a'_0,a'_1,b,e\};\\ c_\infty&\text{if } x\in\{c_0,c_1,c_2,\ldots,c_\infty\};\\ d_\infty&\text{if } x\in\{d_0,d_1,d_2,\ldots,d_\infty\};\\ d'_\infty&\text{if } x\in\{d'_0,d'_1,d'_2,\ldots,d'_\infty\}. \end{cases} $$

Claim 5.4

The topology of is induced by γ X.

Proof

First let us verify that for every \(x\in X-\{d_{\infty}d'_{\infty},c_{\infty}\}\) the singleton {x} is clopen in . For \(x\in \{a_{0},a_{1},a'_{0},a'_{1},b,e\}\) we have {x}={xXx(0)=x} (here we again abuse the notation). Moreover

$$\begin{aligned} \{d_n\} =&\bigl\{ x\in X\mid x(n+1)=d_n\bigr\} , \\ \bigl\{ d'_n\bigr\} =&\bigl\{ x\in X\mid x(n+1)=d'_n\bigr\} , \\ \{c_n\} =&\bigl\{ x\in X\mid x(n)=c_n\bigr\} . \end{aligned}$$

Next, the following sets are open

$$\begin{aligned} \bigl(\gamma^{\mathbf{X}}\bigr)^{-1}(c_\infty) =& \{c_0\}\cup\bigcup_{k\in \mathbb{N}}\bigl\{ x\in X\mid x(k)=c_\infty\bigr\} , \\ \bigl(\gamma^{\mathbf{X}}\bigr)^{-1}(d_\infty) =&\bigcup _{k\in \mathbb{N}}\bigl\{ x\in X\mid x(k)=d_k\bigr\} , \\ \bigl(\gamma^{\mathbf{X}}\bigr)^{-1}\bigl(d'_\infty \bigr) =&\bigcup_{k\in \mathbb{N}}\bigl\{ x\in X\mid x(k)=d'_k\bigr\} . \end{aligned}$$

Now we check that for ZY, where γ X(X)∩Z≠∅ and Y is one of the sets (γ X)−1(c ), (γ X)−1(d ), \((\gamma^{\mathbf{X}})^{-1}(d'_{\infty})\), the subset Z is open in iff YZ is finite. The “if” direction follows from what we already verified. For the “only if” direction let us assume that Z is open. From the definition of the product topology on it follows that we may assume that Z={xXx(n)∈O}∩Y for some \(n\in \mathbb{N}\) and OX n . Let c Z. Then c O. Hence {c n+1,c n+2,…,c }⊆Z and YZ=(γ X)−1(c )−Z is finite. If d Z then d n O, and hence {d n+1,d n+2,…,d }⊆Z, YZ=(γ X)−1(d )−Z is finite. For the case when \(d'_{\infty}\in Z\) we argue analogically. □

Now, when ◊∈{2,>}, one may straightforwardly find a finite number d such that the structure X is of degree almost d-bounded relative to γ X, and apply Lemma 5.3 and Theorem 5.2. Indeed, for ◊=> the maximum of the cardinality of \(\operatorname {Nb}_{R}(x)\) for xXγ X, which is 6, is obtained for \(d_{n},d'_{n}\) for \(n\in \mathbb{N}\). For instance

$$\begin{aligned} \operatorname {Nb}(d_n) =&\bigl\{ (c_n,d_{n-1},d_n),(d_{n-1},c_n,d_n),(c_\infty,d_{n},d_n), (d_n,c_\infty,d_n), \\ &\hphantom{\bigl\{ }(c_{n+1},d_{n},d_{n+1}),(d_{n},c_{n+1},d_{n+1}) \bigr\} . \end{aligned}$$

(Here by d −1 we mean a 1 and by \(d'_{-1}\) we mean \(a'_{1}\).) Similarly for ◊=2 the maximum of the cardinality of \(\operatorname {Nb}_{R}(x)\) for xXγ(X), which is 2⋅3!+3=15, is also obtained for \(d_{n},d'_{n}\) for \(n\in \mathbb{N}\) as, e.g., \(\operatorname {Nb}_{R}(d_{n})\) consists of the tuples (c n ,d n−1,d n ), (c ,d n ,d n ), (c n+1,d n ,d n+1) and all their rearrangements.

For ◊=∨ and every finite λ and d the structure X is not almost d-bounded relative to any λ-compactification. To see this note that for every \(n\in \mathbb{N}\) the set \(\operatorname {Nb}_{R}(c_{n})\) is infinite, as (c n ,d m ,d m )∈R X for all mn.  □

5.2 Semilattice case

This subsection may be skipped, with the exception of Lemma 5.8, as the main result here, Proposition 5.5, is a special case of Proposition 5.13 which will be independently proved in the next subsection. However we decided to add this subsection, as it proposes a different proof technique which, we hope, will be used in the future elsewhere.

On the set 2={0,1} let us define two relational structures: \({\mathbf{2}}_{\leqslant}=(2,\leqslant^{{\mathbf{2}}_{\leqslant}})\) with the usual order, and \({\mathbf{2}}_{\vee}=(2,R^{{\mathbf{2}}_{\vee}})\) which is the graph of the two element join semilattice with respect to the order \(\leqslant ^{{\mathbf{2}}_{\leqslant}}\). Recall that we denote the class UH(2 ) of ordered sets by 𝒫. Denote also UH(2 ) by 𝒫. Note that since 𝒫 contains all graphs of semilattices, for every non-trivial semilattice S we have UHG(S)=𝒫.

Proposition 5.5

The class (𝒫) BC is not first-order axiomatizable.

We start with the formulation of a rather general way for transferring axiomatization from one class to another in a different language.

For a formula θ in a language ℒ let ℒ θ be the relational language consisting of one relation symbol R with the arity being equal to the number of free variables in θ. For a topological structure in ℒ in which the interpretation of θ is closed let be the topological structure in ℒ θ with the same carrier set and topology as and with the relation \(R^{\mathbf{Y}_{\theta}}\) which is the interpretation of θ in . For a class 𝒦 of topological structures in ℒ with all members having closed interpretations of θ let . Occasionally we will use the symbol Y θ to denote the structure obtained in the same manner from a non-topological structure Y.

Proposition 5.6

Let θ be a formula in a languageand let 𝒦 be a class of topological structures inwith all members having closed interpretations of θ. Let Σ be a set of formulas in θ . If

  1. (1)

    Σ defines 𝒦 θ and

  2. (2)

    for every topological structure in ℒ, yields ,

then 𝒦 is defined by the set Σ θ of sentences which is obtained from Σ by substituting \(\theta(\bar{x})\) for \(R(\bar{x})\) everywhere in every sentence from Σ.

Proof

The satisfaction of Σ θ by 𝒦 follows directly from (1). On the other hand, if , then , and by (1) and (2), . Note that the topology plays no role in this proof. □

Recall that the class of Priestley spaces 𝒫 BC equals the topological prevariety generated by . In the proof of Proposition 5.5 we use the following fact, already mentioned in the introduction.

Theorem 5.7

[6, Example 6.2]

The class 𝒫 BC of Priestley spaces is not first-order definable.

In what follows in this subsection ℒ will be the language of ordered sets, i.e., it consists of one binary relation symbol ⩽, and θ will be the formula given by

$$\theta(x,y,z)= (x\leqslant y\wedge y\approx z)\vee(y\leqslant x\wedge x\approx z). $$

Lemma 5.8

Let Y=(Y,⩽X) and Y′=(Y′,⩽Y) be two relational structures and h:YYbe a mapping. IfY is reflexive, then h is a homomorphism from Y into Yiff it is a homomorphism from Y θ into \(\mathbf{Y}'_{\theta}\).

Proof

The forward direction is obvious, and even the reflexivity of ⩽Y is not needed here. For the converse direction assume that h is a homomorphism from Y θ into \(\mathbf{Y}'_{\theta}\) and consider elements x,yY such that Yxy. Then Yθ(x,y,y), and hence Y′⊨θ(h(x),h(y),h(y)). Thus either Y′⊨h(x)⩽h(y) or we have Y′⊨h(y)⩽h(x) and h(x)=h(y). But, in the latter case, by the reflexivity of ⩽Y, we also have Y′⊨h(x)⩽h(y). □

Proof of Proposition 5.5

We will use Proposition 5.6 for 𝒦=𝒫 BC , and ℒ and θ specified as above. Note that the interpretation of θ in every topological structure in ℒ is closed. Note also that (2 ) θ =2 .

Let

$$\rho=(\forall x,y,z)\bigl[R(x,y,z)\to\bigl(R(x,y,y)\vee R(x,y,x)\bigr)\bigr]. $$

We will verify that the class (𝒫 BC ) θ consists of the topological structures from (𝒫) BC satisfying ρ.

Claim 5.9

If , then and .

Proof

The definition of θ yields the first statement.

For the second statement, from Separation Principle 3.1 it follows that it is enough to show that for every triple \((x,y,z)\in Y^{3}-R^{\mathbf{Y}_{\theta}}\) there is a continuous homomorphism such that \((h(x),h(y),h(z))\notin R^{{\mathbf{2}}_{\vee}}\). Indeed, when it is proved and xy, then, by the antisymmetry of \(\leqslant^{{\mathbf{2}}_{\leqslant}}\), either \((x,y,y)\notin R^{\mathbf{Y}_{\theta}}\) or \((x,y,x)\notin R^{\mathbf{Y}_{\theta}}\). Hence there is a homomorphism h into 2 such that either \((h(x),h(y),h(y))\notin R^{{\mathbf{2}}_{\vee}}\) or \((h(x),h(y),h(x))\notin R^{{\mathbf{2}}_{\vee}}\). This gives h(x)≠h(y).

So take a triple \((x,y,z)\in Y^{3}-R^{\mathbf{Y}_{\theta}}\). In the following arguments Lemma 5.8 is used several times.

Case when xY yz: Since Y is a Priestley space, there is a continuous homomorphism separating y and z. Now (h(x),h(y),h(z)) must be one of the three tuples (0,0,1), (0,1,0), or (1,1,0), and in each case we have \((h(x),h(y),h(z))\notin R^{{\mathbf{2}}_{\vee}}\).

Case when yY xz: It goes analogically.

Case when x and y are incomparable: Since is a Priestley space, there are continuous homomorphisms such that k 0(x)=k 1(y)=0 and k 0(y)=k 1(x)=1. Let . If k 0(z)=0 take h=k 0. If k(z)=(1,0) take h=k 1. Let \(e\colon {\mathbf{2}}_{\leqslant}^{2}\to{\mathbf{2}}_{\leqslant}^{3}\) be the embedding given by

$$e(a,b)= \begin{cases} (a,b,0) &\text{if } (a,b)\neq(1,1);\\ (a,b,1) &\text{if } (a,b)= (1,1). \end{cases} $$

If k(z)=(1,1) take \(h=\operatorname {pr}_{2}\circ e\circ k\), where \(\operatorname {pr}_{2}\) is the projection on the last coordinate. □

Claim 5.10

If and , then .

Proof

Assume that and Xρ. Since (𝒫) BC is the topological prevariety generated by , we may assume that is a closed substructure of for some nonempty set I. Notice that the formula R(x,y,y) defines in X a closed order ⩽X on X, and moreover, (X,⩽X) equipped with the topology of is a closed substructure of . An easy way to see this is to consider the structure \((2,\leqslant^{{\mathbf{2}}_{\leqslant}},R^{{\mathbf{2}}_{\vee}})\) and realize that it satisfies the following universal Horn sentence, which is preserved under taking substructures of products: (∀x,y)[xyR(x,y,y)]. Now the crucial point is that Xρ yields that θ is interpreted in (X,⩽X) as R X. This proves that . □

In order to use Proposition 5.6 we need to verify one more fact.

Claim 5.11

If , then .

Proof

By assumption, there is a Priestley space , with the same carrier and topology as Y, such that . Since Y′ is an ordered set, ⩽Y is reflexive. Also, since Y θ ⊨(∀x)R(x,x,x), the definition of θ yields that ⩽Y is reflexive. Now consider the identity map on Y. As the topologies of and coincide, the above mentioned reflexiveness and Lemma 5.8 applied to this map twice gives us that . □

Now we can finish the proof. So if (𝒫) BC were definable in first-order logic by a set Λ of sentences, then by Claims 5.9 and 5.10, (𝒫 BC ) θ would be definable by Λ∪{ρ}. Thus Condition (1) in Proposition 5.6 would hold for 𝒦=𝒫 BC and Σ=Λ∪{ρ}. Since, by Claim 5.11, Condition (2) holds, 𝒫 BC would be definable by (Λ∪{ρ})θ. But it is not, as Theorem 5.7 states.  □

Corollary 5.12

Let S be a semigroup with a neutral element. Then the Boolean core of UHG(S) is not first-order axiomatizable.

Proof

The case when S is a semilattice is covered by Proposition 5.5. Otherwise, S has a non-idempotent element a. Let X be a substructure of G(S) containing a and the neutral element of S. Then X isomorphic to the substructure with the carrier {0,1} of the graph of the semigroup whose operation is addition modulo 2 or modulo 3. Thus we may apply Proposition 5.1. □

Still, Proposition 5.5 and Corollary 5.12 do not cover all situations from Theorem 1.1. For instance, the universal Horn class generated by the two-element semilattice and the two-element semigroup satisfying (∀x,y)[xy=x] (i.e., the two-element left-zero semigroup) does not fall into their scope.

5.3 Idempotent case

Proposition 5.13

Let 𝒞 be a class of semigroups containing a nontrivial idempotent member with a neutral element. Letbe the universal Horn class generated by G(𝒞). Then BC is not first-order axiomatizable.

In the proof of Proposition 5.13 we will use the following facts.

Theorem 5.14

[6, First Inverse Limit Technique 3.5]

Assume that the underlying language is relational and finite. Let be a surjective inverse limit of finite structures, and letbe a universal Horn class. Assume that is pointwise non-separable with respect toand that the following condition holds.

(F)

Then andis non-standard.

A relational substructure Y of X is isolated if Y=X or there is a substructure Y′ of X such that YY′=∅, YY′=X and for every relation symbol R in the language of X we have R X=R YR Y. A connected component of X is an isolated substructure of X which is minimal with respect to the set inclusion of carriers.

Theorem 5.15

[6, First Ultraproduct Technique 5.2]

Assume that the underlying language is relational and finite. Letbe a universal Horn class and be a Boolean topological structure. Assume that

  1. (1)

    is non-standard with a witness and

  2. (2)

    up to isomorphism, there are only finitely many connected components of and all them are finite.

Then BC is not first-order axiomatizable.

Proof of Proposition 5.13

Let be the Stralka space, i.e., is the Cantor space and xSt y iff x=y or y covers x in the order inherited from the commonly ordered real line. Recall that St is a disjoint union of one and two element chains. Define the relation R St by the formula θ from Sect. 5.2, so that R St is closed in the topology and . Note that St is a substructure of the graph of the semilattice obtained by adding a top element to St , and is therefore in 𝒫≤ℋ. We claim that may be used in Theorem 5.15 in order to show that ℋ BC is not first-order axiomatizable. Condition (2) in Theorem 5.15 follows from the fact that each connected component of St is the graph of a one or two element semilattice. In order to verify condition (1) we will use Theorem 5.14.

Let us recall from [6, Sect. 6] a construction of the Stralka space as a surjective inverse limit. Let X n =Y n ={0,1,…,2n−1},

$$\leqslant^{\mathbf{Y}_{n}}=\bigl\{ (i,j)\in Y_n\mid i=j\text{ or }i+1=j\bigr\} $$

and \(\mathbf{Y}_{n}=(Y_{n},\leqslant^{\mathbf{Y}_{n}})\). The connecting homomorphisms are given by

$$\varphi_{n-1}\colon \mathbf{Y}_{n}\to \mathbf{Y}_{n-1}; i\mapsto \biggl\lfloor \frac {i}{2} \biggr\rfloor . $$

Then . Let X n =(Y n ) θ , i.e., \(R^{\mathbf{X}_{n}}\) is the relation defined by the formula θ from Sect. 5.2. Lemma 5.8 yields that every φ n−1 is also a homomorphism from X n onto X n−1. Put .

Claim 5.16

.

Proof

Actually it is enough to show that \(R^{\mathbf{X}}=R^{\mathbf{Y}_{\theta}}\). Let us start with verifying the easy inclusion \(R^{\mathbf{Y}_{\theta}}\subseteq R^{\mathbf{X}}\). Take \((x,y,z)\in R^{\mathbf{Y}_{\theta}}\). Then either Yxy and y=z, or Yyx and x=z. Let us assume that the first case holds (in the second case we infer analogically). Then Y n x(n)⩽y(n) and y(n)=z(n), and hence X n R(x,y,z) for \(n\in \mathbb{N}\). Thus (x,y,z)∈R X.

In order to see the inverse inclusion take (x,y,z)∈R X. Then X n R(x(n),y(n),z(n)), and hence Y n θ(x(n),y(n),z(n)) for all \(n\in \mathbb{N}\). We may assume that xy as otherwise x=y=z, and the reflexivity of the relation \(\leqslant^{\mathbf {St}_{\leqslant}}\) guarantees that \((x,x,x)\in R^{\mathbf{Y}_{\theta}}\). Let k be the least natural number with respect to x(k)≠y(k). Since Y k θ(x(k),y(k),z(k)), exactly one of the statements \(x(k)\leqslant^{\mathbf{Y}_{k}}y(k)\) and \(y(k)\leqslant^{\mathbf{Y}_{k}}x(k)\) is true. Let us assume that the first is true (in the second case we infer similarly). Then, since \(y(k)\nleq^{\mathbf{Y}_{k}}x(k)\) and all φ n are homomorphisms, \(y(n)\nleq^{\mathbf{Y}_{n}}x(n)\) for nk. This together with Y n θ(x(n),y(n),z(n)) yields \(x(n)\leqslant^{\mathbf{Y}_{n}}y(n)\) and y(n)=z(n) for nk. Moreover, for every natural number n<k we have x(n)=y(n)=z(n). This shows that for every \(n\in \mathbb{N}\)

$$\mathbf{Y}_{n}\models x(n)\leqslant y(n)\wedge y(n)=z(n), $$

and hence \((x,y,z)\in R^{\mathbf{Y}_{\theta}}\). □

Claim 5.17

The condition (F) from Theorem 5.14 holds.

Proof

Suppose Z is a substructure of X n such that φ n−1| Z is injective. Let Z be the substructure of Y n having the carrier set Z. We may obtain a semilattice W from Z by adding a top element. Then Z is a substructure of \(\sf G(\mathbf{W})\), whence Z∈𝒫≤ℋ. □

Claim 5.18

is pointwise non-separable with respect to ℋ.

Proof

In every semigroup the universal Horn sentence

$$(\forall v_0,\ldots,v_{m-1})[v_0v_1 \approx v_1\wedge\cdots\wedge v_{m-2}v_{m-1}\approx v_{m-1}\to v_0v_{m-1}\approx v_{m-1}] $$

holds. Thus in every graph of a semigroup the following sentence

$$(\forall v_0,\ldots,v_{m-1})\bigl[R(v_0,v_1,v_1) \wedge\cdots\wedge R(v_{m-2},v_{m-1},v_{m-1})\to R(v_0,v_{m-1},v_{m-1})\bigr] $$

also holds. Hence, if h is a homomorphism from X n into the graph Z of a semigroup, we have (h(0),h(2n−1),h(2n−1))∈R Z. Thus is pointwise non-separable with respect to ℋ which is witnessed by the triple (x 0,x 1,x 1), where x 0(n)=0 and x 1(n)=2n−1 for \(n\in \mathbb{N}\). □

This completes the proof of Proposition 5.13.  □

Proof of Theorem 1.1

Combine Propositions 5.1 and 5.13. □

6 Graphs of monoids and groups

Because for monoids the language of graphs has an additional unary relation symbol R 1, which is interpreted as the graph of a constant, and for groups one more binary relation symbol \(R_{(\,)^{-1}}\), which is interpreted as the graph of the inverse operation, we need slight modifications of the proof of Theorem 1.1 in order to obtain the proof of Corollary 1.2.

Modification needed for the proof of Corollary 1.2

Case of monoids: In the non-idempotent case, in the proofs of Propositions 4.1 and 5.1 we expand X and X n by interpreting R 1 in both as {c }. In the idempotent case, in the proof of Proposition 5.13 we expand X and X n by interpreting R 1 in both as ∅. Let us just look closer at Claim 5.17. It holds because UH(𝒞) contains a three element monoid with a semilattice reduct, and hence ℋ contains the structure \((2,R^{{\mathbf{2}}_{\vee}},\emptyset)\).

Case of groups: In the proofs of Propositions 4.1 and 5.1 we expand X and X n by interpreting R 1 in both as {c }, and by interpreting \(R_{(\,)^{-1}}\) in both as ∅ when ◊=> or as the identity relation when ◊=2.