One hundred twenty-seven subsemilattices and planarity

Let $L$ be a finite $n$-element semilattice. We prove that if $L$ has at least $127\cdot 2^{n-8}$ subsemilattices, then $L$ is planar. For $n>8$, this result is sharp since there is a non-planar semilattice with exactly $127\cdot 2^{n-8}-1$ subsemilattices.

Our result is motivated by similar or analogous results for lattices and for congruences; see Ahmed and Horváth [1], Czédli [3], [4], [5], and [6], Czédli and Horváth [7], and Mureşan and Kulin [10]. In particular, [6] proves that if an n-element lattice L has at least 83 · 2 n−8 sublattices, then L is planar. Remark 1.5. Clearly, an n-element semilattice L can have at most 2 n − 1 subsemilattices, and it has so many subsemilattices if and only if L is a chain. Chains are planar semilattices. Since, up to isomorphism, there are only finitely many n-element semilattices, we can let µ(n) := 1 + max{k : there is an n-element non-planar semilattice with exactly k subsemilattices}. Putting these three facts together, it follows trivially that every n-element semilattice with at least µ(n) subsemilattices is planar, and this result is sharp. So the novelty in this paper is that µ(n) is explicitly determined and it is given by a simple expression.
Outline. Apart from half a page devoted to the proof of Remark 1.3 at the end of Section 4, the rest of the paper is devoted to the proof of Theorem 1.1. In particular, Section 2 contains Theorem 2.2, which is a useful reformulation of Theorem 1.1, and Lemma 2.4; both statements are worth separate mentioning here. In Section 3, a deep theorem of Kelly and Rival [9] for lattices is recalled and a related lemma, proved by our computer program, is presented. While reading this section and the rest of the paper, Czédli [6] should be near, since it contains some notation and figures that we need in the present paper. The rest of the proof is given in Section 4.

2.
Another form of our result and some lemmas 2.1. Relative number of subuniverses. A partial groupoid is a structure (A; ∨) such that A is a nonempty set and ∨ is a map from a subset Dom(∨) of A 2 to A. A subuniverse of a partial groupoid (A; ∨) is a subset X of A such that whenever x, y ∈ X and (x, y) ∈ Dom(∨), then x ∨ y ∈ X. The set of subuniverses of (A; ∨) will be denoted by Sub(A; ∨). For a semilattice (L; ∨), Sub(L; ∨) is usually called the lattice of subsemilattices of (L; ∨). In spite of this terminology, note that the collection of subsemilattices is only Sub(L; ∨) \ {∅}. We often abbreviate (L; ∨) and Sub(L; ∨) as L and Sub(L), respectively; sometimes, this convention is indicated by L = (L; ∨). Similar convention applies for posets, lattices, and partial groupoids. All semilattices, posets, lattices, and partial groupoids in this paper are automatically assumed to be finite even if this is not repeated all the time. For more about these structures, the reader can resort to the monograph Grätzer [8].
Since a large semilattice L has many (more than |L|) subsemilattices, it is reasonable to relate their number to the number |L| of elements of L. Thus, motivated by Czédli [6], we will adhere to the following terminology and notation. Furthermore, we say that a finite semilattice L has σ-many subsemilattices or, in other words, it has σ-many subuniverses if σ(L) > 127.
Since | Sub(L)| is larger than the number of subsemilattices by 1, we can reformulate Theorem 1.1 and Remark 1.2 as follows.
Theorem 2.2. If L is a finite semilattice such that σ(L) > 127, then L is planar. In other words, finite semilattices with σ-many subsemilattices are planar. Furthermore, for every natural number n ≥ 9, there exists an n-element semilattice L such that σ(L) = 127 and L is not planar.
For partial groupoids (A 1 ; ∨ 1 ) and (A 2 ; ∨ 2 ), we say that (A 1 ; ∨ 1 ) is a weak partial subgroupoid (or a weak partial subalgebra) of ( , and x ∨ 1 y = x ∨ 2 y holds for every (x, y) ∈ Dom(∨ 1 ). The following easy lemma has been proved in Czédli [6]; it is Lemma 2.3 there.  We also need a deeper statement, which we formulate below.
Lemma 2.4 (Key Lemma). Let S = (S; ∨) and L = (L; ∨) be finite semilattices, and assume that S is a subposet of L, i.e., S ⊆ L and for any x, y ∈ S, we have x ≤ S y if and only if x ≤ L y. Then σ(S) ≥ σ(L).
Since subsemilattices are subposets, Lemma 2.4 implies part (ii) of Lemma 2.3. For a poset P , we will use the standard notation M (P ) := {x ∈ P : x has exactly one upper cover}.
The covering relation in P will be denoted by ≺ P ; so x ≺ P y will mean that |{z ∈ P : x ≤ z ≤ y}| = 2. For X ⊆ P , the set of upper bounds of X is denoted by U P (X) := {y ∈ P : y ≥ x for all x ∈ X}. For X = {x 1 , . . . , x n }, we will write U P (x 1 , . . . , x n ) rather than U P ({x 1 , . . . , x n }).
Proof of Lemma 2.4. For the sake of contradiction, suppose that the lemma fails. Then we can pick semilattices S and L with minimal value of |L \ S| such that S is a subposet of L and σ(S) < σ(L). We know from Lemma 2.3(ii) that S is not a subsemilattice of L. Hence, we can pick a minimal element j ∈ S such that ) gives that j = a ∨ S b ≤ x, whereby d ≺ B j and, in addition, j is the only upper cover of d in B. This proves the first half of the following observation; the second half is an easy consequence of the first one.
d ≺ B j, d ∈ M (B), and so, for s ∈ S, s j ⇒ s d. (2.1) We are going to show that (B; ≤) is a (join-)semilattice. With the notation ↓ B d := {x ∈ B : x ≤ d}, we let D := S ∩ ↓ B d. If x, y ∈ B are comparable elements, then x ∨ B y trivially exists and equals x ∨ L y ∈ {x, y}. We claim that whenever x, y ∈ B and x y, then x ∨ B y still exists and 2) 3) Note that the inclusion {x, y} ⊆ S makes the assumption in (2.6) redundant; this inclusion occurs there only for emphasis. It suffices to show that for each of (2.2)-(2.6), the element given right after "x ∨ B y =" is the smallest element of U B (x, y).
In order to verify (2.2), assume that x d. Then d / ∈ U B (x, d), and it follows from (2.1) that U B (x, d) = U B (x, j) = U S (x, j), whereby we conclude (2.2). Since the role of x and y is symmetric, we also conclude (2.3).
Next, assume that {x, y} ⊆ S and x ∨ S y = j. If x ∨ S y > j or x ∨ S y j, then j / ∈ U S (x, y) gives that d / ∈ U B (x, y), whereby U B (x, y) = U S (x, y) and we obtain that x ∨ B y exists and equals x ∨ S y. If x ∨ S y < j, then there are two cases. First, Since the assumptions in (2. (2.7) Next, for a subset Y of S, we denote by [Y ] S the subsemilattice of (S; ∨) generated by Y . The notation [Y ] B is understood analogously. Consider the map our plan is to show that each Y ∈ Sub(S; ∨) has exactly one or two preimages with respect to ϕ. (2.8) In order to do so, assume that Y ∈ Sub(S; ∨). There are two cases to consider; assume first that j / ∈ Y and let Z : where N 0 denotes the set of nonnegative integers. Since Z 0 ∩ {j, d} = ∅ and j / ∈ Y , only (2.4) from the rules (2.2)-(2.6) can be applied when we compute Z 1 according to (2.9). However, (2.4) does not produce any new element since Thus, to show that Y has at most two preimages, it suffices to show that Y ⊆ X, because then X will necessarily belong to {Y, Y ∪ {d}}. Suppose, for a contradiction, that Y ⊆ X, and pick an element and none of them is j since j / ∈ Y . By the minimality of k, all the outer joins above apply to incomparable joinands. Thus, only (2.4) of the five computational rules applies to these outer joins, whereby the joins in (2.10) equal the joins Since all the y 1 , . . . , y k belong to X, so does u, which is a contradiction. Thus, (2.8) holds for the particular case The second inclusion is clear by the definition of ϕ. Suppose, for a contradiction, that the first inclusion fails, and pick an element u ∈ Y \ {j} such that u / ∈ X. Note that the earlier meaning of u, given before (2.10), is no longer valid. Observe that u ∈ Y = ϕ(X) = [X \ {d}] S and X ⊆ Y ∪ {d} imply that there is a smallest k such that u is of the form u = y 1 ∨ S · · · ∨ S y k with some y 1 , . . . , y k ∈ X ∩ (Y \ {u}). The equalities listed in (2.10) and (2.11) are understood for the present situation. If none of the joins in (2.10) equals j, then (2.11) is still valid and leads to u ∈ X, which is a contradiction. If one of the joins in (2.10) is j, then this join is not the last one (which gives u), and this join can change to d in (2.11) by rule (2.6). More precisely, it may happen that (y 1 ∨ S · · · ∨ S y i−1 ) ∨ S y i equals j in (2.10) for some i < k but (y 1 ∨ B · · · ∨ B y i−1 ) ∨ B y i = d in (2.11); note that i is uniquely determined since k was the least possible number for (2.10) and so the joins in (2.10) form a strictly increasing sequence. By the minimality of k, we have that j y i+1 . Hence, d y i+1 by (2.1). It follows from (2.3) that We have seen that there can be at most one i < k such that the i-th join in (2.10) and that in (2.11) are different, but we still have that u = y 1 ∨ B · · · ∨ B y n ∈ X, which is a contradiction. This proves (2.12).
If Y \ {j} ∈ Sub(S; ∨), then j must belong to X, because otherwise (2.12) would Hence, if Y \ {j} ∈ Sub(S; ∨), then j ∈ X combined with (2.12) allow at most two possible sets X. Hence, we can assume that in addition to j ∈ Y , we have that Y \ {j} / ∈ Sub(S; ∨). Then, since Y is ∨ S -closed but Y \ {j} is not, there are x, y ∈ Y \ {j} such that j = x ∨ S y. Clearly, x y. We know from (2.12) that x and y belong to X, whence x ∨ B y ∈ X. It follows from (2.5) and (2.6) that x ∨ B y ∈ {j, d}. If x ∨ B y = j, then j ∈ X and X ∈ {Y, Y ∪ {d}} by (2.12), so there are at most two preimages X of Y . Similarly, if x ∨ B y = d, then d ∈ X and X ∈ {(Y ∪ {d}) \ {j}, Y ∪ {d}} by (2.12) and, again there are at most two preimages X of Y . Hence, we have shown that if j ∈ Y , then Y has one or two preimages. Now, after that all cases have been considered, (2.8) has been proved. As a particular case of (2.8), we know that ϕ is a surjective map. It is a trivial consequence of (2.8) that 2 · | Sub(S; ∨)| ≥ | Sub(B; ∨)|. Dividing this inequality by 2 · 2 |S|−8 = 2 |B|−8 , we obtain that σ(S; ∨) ≥ σ(B; ∨). This inequality and (2.7) yield that σ(S; ∨) ≥ σ(L; ∨), contradicting our initial assumption and completing the proof of Lemma 2.4.

A deep result of D. Kelly and I. Rival and a computer program
For a poset P , its dual will be denoted by P δ . With reference to Kelly and Rival [9] or, more conveniently, to Figures 1-5 of Czédli [6], where Kelly and Rival's theorem is recalled, the Kelly-Rival list of lattices is defined as follows.
Note that A n , F n , G n , and H n are selfdual lattices. Our main tool is the following theorem.
Theorem 3.1 (Kelly-Rival Theorem, taken from Kelly and Rival [9]). A finite lattice L is planar if and only if for every X ∈ L KR , X is not a subposet of L.
Note that the original version of this theorem in [9] says more by stating that L KR is the unique minimal list that makes the theorem work but we will not use this fact.
When working on paper [6], the author has developed a straightforward computer program under Windows 10. This program, called subsize, is downloadable from the author's website. Using the straightforward trivial algorithm, the program computes | Sub(A; F )| for an arbitrary partial algebra (A; F ), provided |A| is small and it has only (at most) binary operations. The following lemma as well as some other statements in the rest of the paper are proved by this program; an appropriate input file (a single file for all these statements) is available from the author's website; see the list of publications there. While the program is reliable up to the author's best knowledge and one can easily write another computer program, the reader may want to (but need not) check the input file for correctness. (Note that the notation used in the input file is taken from the figures in Czédli [6].) The output file, from which the input file can easily be recovered, is an appendix of the arXiv version 1 of the present paper.
The join-semilattices occurring in the lemma below are the semilattice reducts of the "small" lattices occurring in the Kelly-Rival list L KR . Note that, for any lattice X, (X δ ; ∨) is the same as (X; ∧); this trivial fact made it easier to produce most parts of the input file from one of the input files that go with [6].

Fences, a snake, and the end of the proof
We need the following four posets. The enriched 8-element fence and the 10element snake are given in Figure 1. (In spite of its name, the enriched 8-element fence consists of ten elements.) If we remove all the black-filled elements, labeled by i, from Figure 1, then we obtain the 9-element up-fence, its dual, the 9-element down-fence, and the 8-crown.
Lemma 4.1. If L is a finite join-semilattice such that σ(L) > 127 (in other words, if L has σ-many subsemilattices), then none of the enriched 8-element fence, the 8crown, the 9-element up-fence, the 9-element down-fence, and the 10-element snake is a subposet of L.
Proof. Let (L; ∨) be a finite join-semilattice such that σ(L) > 127. Unless otherwise stated, the join ∨ is understood in (L; ∨). The notation for the elements given in Figure 1 will be in effect. For the sake of contradiction, suppose that the 9-element down-fence, denoted here by X, is a subposet of L. Clearly, a ∨ b ≤ f . If a ∨ b < f , then we can replace f by f := a ∨ b; all the previous comparabilities and incomparabilities that are true for f will remain true for f . For example, if we had f ≤ g then a ≤ f would lead to a ≤ g by transitivity, but a ≤ g in X. In the next step, we omit f and rename f as f . Hence, we can assume that a ∨ b = f in L. We can continue similarly, and finally we can assume that Note that these assumptions are indicated by grey-filled angles in Figure 1. Note also that these assumptions should be made in the order they are listed above; for example, we have to "fix" the joins at g and h before introducing the additional element i := g ∨ h. Clearly, (4.1) implies that Armed with the seven equalities given in (4.1) and (4.2), X ∪ {i} turns into a partial groupoid (X ∪ {i}; ∨ X ), which is a weak partial subalgebra of (L; ∨). Using our computer program, we obtain that σ(X ∪ {i}; ∨ X ) = 123.5. So, by Lemma 2.3, 123.5 ≥ σ(L; ∨), contradicting σ(L; ∨) > 127. Therefore, the 9-element down-fence cannot be a subposet of (L; ∨).
The argument for the 8-crown is almost the same; the only difference is that (4.1) and (4.2) are replaced by and, in addition, now the σ-value of the partial groupoid {a, b, . . . , i} is 125. The treatment for the 9-element up-fence, denoted here by Y , is a bit more complex, but the argument begins in the same way as above. After modifying f , g, and h, if necessary, and letting i := f ∨ g, we obtain a weak partial subgroupoid (Y ∪ {i}; ∨ Y ) of (L; ∨), where ∨ Y and its domain are described by Note that, in L, a∨g = a∨b∨g = f ∨g = i, which explains the first equality in (4.6); the second one is explained similarly. In Figure 1, (4.5) is visualized by grey-filled angles. Unfortunately, σ(Y ∪ {i}; ∨ Y ) = 137 is rather large to draw any conclusion. Hence, we need to deal with two cases. First, assume that h ∨ j = i in L. Then we add h ∨ Y j = i and its consequence, to the domain of ∨ Y , and σ(Y ∪ {i}; ∨ Y ) turns out to be 122. Second, assume that h∨j =: k is distinct from i. Then we add h∨ Y j = k and its consequence, c∨ y j = k (explained again by c ∨ j = c ∨ d ∨ j = h ∨ j) to the domain of ∨ Y , and we obtain that σ(Y ∪ {i, k}; ∨ Y ) = 114.25. In both cases, we have obtained a weak partial subgroupoid of (L; ∨) such that the σ-value of this subgroupoid is at most 122. Hence, by Lemma 2.3, σ(L; ∨) is at most 122, contradicting our assumption that σ(L; ∨) > 127. Therefore, the 9-element up-fence cannot be a subposet of (L; ∨). Next, let Z denote the enriched 8-element fence. For the sake of contradiction, suppose that Z is a subposet of (L; ∨). Observe that Z is a join-semilattice, whereby the computer program, Lemma 2.4, and our assumption on (L; ∨) yield that 78 = σ(Z; ∨) ≥ σ(L; ∨) > 127, which is a contradiction. Thus, the enriched 8-element fence cannot be a subposet of (L; ∨). Neither can the 10-element snake, because its σ-value is 125.5 by the program and the same reasoning applies.  If (L ∪0 ; ∨) had a diagram with non-crossing edges, then after deleting all edges starting from 0, we would obtain a planar digram of (L; ∨), and this would contradict our assumption on (L; ∨). Hence, (L ∪0 ; ∨, ∧), that is, (L ∪0 ; ≤) is a nonplanar lattice. By Theorem 3.1, the Kelly-Rival Theorem, there exists a lattice X = (X; ≤) ∈ L KR , see (3.1), such that (X; ∨) is a subposet of (L ∪0 ; ∨). If X = F 0 , then (the Key) Lemma 2.4 together with Lemma 3.2 give that σ(L ∪0 ; ∨) ≤ 127, contradicting (4.8). If X is another lattice occurring in Lemma 3.2, then the contradiction is even bigger since σ(X; ∨) is smaller than 127.
If X = A 1 or X ∈ {A 2 , A 3 , A 4 , . . . }, then X and, thus, (L ∪0 ; ∨) contains the 8-crown or the 9-element down-fence as a subposet, which contradicts Lemma 4.1. If X = E n or X = E δ n for some n ≥ 2, then the 9-element up-fence or the 9-element down-fence is a subposet of (L ∪0 ; ∨), and Lemma 4.1 gives a contradiction again. Since the enriched 8-element fence is a subposet of F 2 and each of F 3 , F 4 , . . . contains a 9-element up-fence as a subposet, Lemma 4.1 excludes that X ∈ {F n : n ≥ 2}. Since the 10-element snake is a subposet of each of the G n , n ≥ 0, we obtain from Lemma 4.1 that X is not of the form G n . (Note that G 0 is also taken care of by Lemma 3.2.) Finally, the possibility X = H n for some n ≥ 1 is excluded again by the same lemma, since each of these H n contains the 10-element snake as a subposet.
All X ∈ L KR have been ruled out, but this contradicts the existence of such an X. This proves the first sentence of Theorem 2.2.

APPENDIX
The rest of the paper is an appendix, which consists of the output file mentioned in the paragraph following Theorem 3.1. E_1 is the join-semilattice with edges ai bi ca da ei fb fc gc gd hd he ja of og oh oj |A|=11, A(without commas)={oiabcdefghj}. Constraints: a+b=i a+e=i b+c=i b+d=i b+e=i b+g=i b+h=i b+j=i c+d=a c+e=i c+h=a c+j=a d+e=i d+f=a d+j=a