Cartesian lattice counting by the vertical 2-sum

A vertical 2-sum of a two-coatom lattice $L$ and a two-atom lattice $U$ is obtained by removing the top of $L$ and the bottom of $U$, and identifying the coatoms of $L$ with the atoms of $U$. This operation creates one or two nonisomorphic lattices depending on the symmetry case. Here the symmetry cases are analyzed, and a recurrence relation is presented that expresses the number of such vertical 2-sums in some family of interest, up to isomorphism. Nonisomorphic, vertically indecomposable modular and distributive lattices are counted and classified up to 35 and 60 elements respectively. Asymptotically their numbers are shown to be at least $\Omega(2.3122^n)$ and $\Omega(1.7250^n)$, where $n$ is the number of elements. The number of semimodular lattices is shown to grow faster than any exponential in $n$.


Introduction
Let L and U be finite lattices. Their vertical sum is obtained by identifying the top of L with the bottom of U . If L has two coatoms and U has two atoms, their vertical 2-sum is obtained by removing the top of L and the bottom of U , and identifying the coatoms of L with the atoms of U .
The vertical sum leads to a simple and well-known recurrence relation. A lattice is a vi-lattice (short for vertically indecomposable) if it is not a vertical sum of two non-singleton lattices. If f (n) and f vi (n) are the numbers of nonisomorphic n-element lattices and vi-lattices, respectively, then (1) f (n) = n k=2 f vi (k) f (n − k + 1), for n ≥ 2.
We call this Cartesian counting because each term expresses the cardinality of a Cartesian product, namely, of the set of k-element vi-lattices and the set of (n−k +1)-element lattices. One does not need to list the members of a Cartesian product to find its cardinality. Recurrence (1) has been used in counting small lattices [4,5,7,8,12] and in proving lower bounds [4,13]. Many vi-lattices can be further decomposed as vertical 2-sums of smaller lattices. So let us pursue a kind of Cartesian counting of vi-lattices. Now we must observe that from two given lattices, one obtains two vertical 2-sums, because there are two ways to match the coatoms and the atoms. Whether the results are isomorphic depends on the symmetries of L and U .
Our main result, Theorem 1, is a recurrence relation that distinguishes the symmetry cases, and expresses the exact number of nonisomorphic lattices obtainable as vertical 2-sums. To apply the recurrence, we need to classify and count the component lattices by symmetry type.
The motivations of this study are threefold. First, our recurrence provides a new way of counting small lattices. Only the component lattices are generated explicitly; their vertical 2-sums are then counted with the recurrence in the Cartesian fashion. This is faster, so we can count further. We count modular and distributive vilattices of at most 35 and 60 elements, respectively. This also provides a verification of previous countings (of at most 33 and 49 elements, respectively), because the method is different.
The second motivation is a more compact lattice listing. A full listing of distributive vi-lattices of at most 60 elements would contain about 4.9 × 10 12 lattices. We can shrink the list to less than 1/200 of that size, to 2.3 × 10 10 lattices, by leaving out all vertical 2-sums. A smaller listing is more practical to store and to study, and one can still recover the left-out lattices by performing the vertical 2-sums.
The third motivation is in improving lower bounds. A simple recurrence for vertical 2-sums was derived in [13], but it is only a loose lower bound as it does not consider the symmetry cases. The new recurrence gives tighter bounds because of an extra factor of 2 in the asymmetric cases. It may not sound much, but the factor compounds when vertical 2-sum is applied repeatedly. Some further improvement comes from counting small lattices larger than before. For nonisomorphic modular vi-lattices, we improve the lower bound from Ω(2.1562 n ) [13] to Ω(2.3122 n ). For nonisomorphic distributive vi-lattices, we improve from Ω(1.678 n ) [4] to Ω(1.7250 n ), which is close to the empirical growth rate.

Vertical 2-sum and symmetry
In order to understand how the vertical 2-sum operates on lattices, we classify them by the number and symmetry of their atoms and coatoms. Our aim is in modular and distributive vi-lattices, but we state the results more generally when convenient. All lattices considered in this work are finite. If L is a lattice, we write a(L) and c(L) for the numbers of its atoms and coatoms, and 0 L and 1 L for its bottom and top. Definition 1. Let L and U be disjoint lattices of length 3 or greater, L with two coatoms c 1 , c 2 and U with two atoms a 1 , a 2 . Then their vertical 2-sums are the two lattices obtained by removing 1 L and 0 U , and identifying (c 1 , c 2 ) with either (a 1 , a 2 ) or (a 2 , a 1 ). L and U are the summands of the vertical 2-sum.
Note that vertical 2-sums are indeed lattices, those of graded lattices are graded, and those of vi-lattices are vi-lattices [13]. We do not consider summands of length 2 as that would be essentially an identity operation. If S is a vertical 2-sum of L and U , then |S| = |L| + |U | − 4.
Definition 2. If a lattice has two coatoms [atoms], they are symmetric if the lattice has an automorphism that swaps them, and fixed otherwise. Lemma 1. Let L and U be lattices with vertical 2-sums S 1 and S 2 . Then S 1 and S 2 are nonisomorphic if and only if L has fixed coatoms and U has fixed atoms.
Proof. If L has an automorphism that swaps the coatoms, then extending it with the identity mapping on U yields an isomorphism S 1 → S 2 . If U has symmetric atoms, the case is similar. Finally, if there is an isomorphism S 1 → S 2 , it must either fix the coatoms of L and swap the atoms of U , or vice versa; but this is impossible if L has fixed coatoms and U has fixed atoms.
From here on we confine our attention to graded vi-lattices. We divide them into three kinds as follows.
Definition 3. If L is a graded vi-lattice, then its kth level, denoted L k , is the set of elements that have rank k. A neck is a two-element level other than the atoms and the coatoms. We say that L is (1) a composition, if it contains a neck; (2) a piece, if does not contain a neck, has rank 3 or greater, and at least one of a(L) and c(L) equals two; (3) special otherwise.
A composition has necessarily at least 8 elements, and a piece has at least 6. All compositions ensue from pieces by repeated application of the vertical 2-sum. Specials are not vertical 2-sums, but also cannot act as their summands, because they are too short (rank two or smaller) or contain too many atoms and coatoms. A middle piece can act as either summand of a vertical 2-sum. A bottom piece can act only as the lower summand, and a top piece only as the upper summand.

Definition 5.
A middle piece is of symmetry type: (1) MF, if its atoms and coatoms are fixed; (2) MA, if its atoms are symmetric and coatoms are fixed; (3) MC, if its atoms are fixed and coatoms are symmetric; (4) MX, if it has an automorphism that swaps the atoms but fixes the coatoms, and another automorphism that swaps the coatoms but fixes the atoms; (5) MH, if it is not MX, but has an automorphism that swaps both the atoms and the coatoms.

Definition 6.
A bottom piece is of symmetry type: (1) BF, if its coatoms are fixed; (2) BS, if its coatoms are symmetric.

Definition 7.
A top piece is of symmetry type: (1) TF, if its atoms are fixed; (2) TS, if its atoms are symmetric.

Definition 8.
A composition is of symmetry type: (1) CF, if it has two coatoms and they are fixed; (2) CS, if it has two coatoms and they are symmetric; (3) CN ("composition-nonextensible"), if it has three or more coatoms.
The symmetry types are illustrated in Figure 1. If we take the BF example as the lower summand, and the MC example as the upper summand, we obtain two nonisomorphic vertical 2-sums (both of type CS) as shown in Figure 2.
Note that in an MX piece atoms and coatoms can be swapped independently, but in an MH piece only simultaneously; the shapes of the letters X and H are meant as mnemonics for this.   We will form compositions "bottom up", adding new pieces over pieces or smaller compositions. The following lemma characterizes how many and what kinds of compositions are formed in different cases.

Lemma 2.
If L is a piece or a composition, and U is a piece, then the number and type of their nonisomorphic vertical 2-sums are as follows.  Proof. Let us first prove the numbers. We proceed by the rows. Row 1: L has two fixed coatoms. By Lemma 1, if U has fixed atoms (MF, MC or TF), then there are two nonisomorphic vertical 2-sums; otherwise there is one.
Row 2: L has two symmetric coatoms. By Lemma 1 there is one vertical 2-sum up to isomorphism.
Row 3: L has three or more coatoms, so no vertical 2-sums are formed. Next we deduce the symmetry type of each vertical 2-sum S i (i = 1, 2). We proceed by the columns.
If U is MF or MA, it has fixed coatoms. Then S i cannot have an automorphism that swaps the coatoms of S i , because its restriction to U would be an automorphism that swaps the coatoms of U . Thus S i has fixed coatoms.
If U is MC or MX, it has an automorphism that swaps its coatoms and fixes its atoms; extending with the identity mapping in L gives, in each S i , an automorphism that swaps the coatoms. Thus S i has symmetric coatoms.
If U is MH, then an automorphism of S i that swaps the coatoms also swaps the atoms of U , which are also the coatoms of L. Thus S i has symmetric coatoms if and only if L has symmetric coatoms.
If U is TF or TS, then S i has three or more coatoms and is of type CN.

Cartesian counting in a lattice family
In this section we present our main result, a recurrence relation that counts all nonisomorphic compositions in some desired lattice family, provided that the family has suitable form. We also give examples of such families. The first condition ensures that vertical 2-sums stay in the family, and the second ensures that all compositions in F are indeed obtained as vertical 2-sums of smaller lattices in F. Theorem 1. Let F be a 2-summable family, and let XX n denote the number of nonisomorphic n-element lattices in F having symmetry type XX. Then for n < 8 we have CF n = CS n = CN n = 0, and for n ≥ 8 the following recurrences hold: where k = n − j + 4, and Proof. For n < 8 the numbers are zero, because a composition cannot have fewer than 8 elements.
Let then n ≥ 8 and consider an n-element CF-type composition S ∈ F. There is exactly one way of expressing S as a vertical 2-sum of two lattices L, U such that U is a piece. This U contains the elements of S above and including its highest-ranked neck, plus an augmented bottom element. By condition (C2) we have L, U ∈ F. Furthermore, because |U | ≥ 6 and and |L| + |U | − 4 = n, it follows that |L| ≤ n − 2.
We also observe that different nonisomorphic choices of L and U , where U is a piece, lead to nonisomorphic results. To be more precise: If L L or U U , and U and U are pieces, then the vertical 2-sums of L and U are not isomorphic to the vertical 2-sums of L and U .
All nonisomorphic n-element CF-type compositions in F can be counted by considering (for all j = 6, . . . , n − 2) first the choices of a j-element lower summand L ∈ F, and then the choices of an upper summand U ∈ F such that U is a piece with k = n − j + 4 elements, subject to the requirement that the resulting vertical 2-sums are of type CF. Now LF j is the number of nonisomorphic lower summands that have fixed coatoms. For each such lower summand, by collecting the CF-type results from the first row of the table in Lemma 2, we get 2 · MF k + MA k + MH k nonisomorphic vertical 2-sums, which are in F by condition (C1).
Similarly, LS j is the number of nonisomorphic lower summands that have symmetric coatoms. For each such lower summand, by collecting the CF-type results from the second row of the table in Lemma 2, we get MF k + MA k nonisomorphic vertical 2-sums, which are in F by condition (C1).
Adding up the cases we obtain the stated expression for CF n . The expressions for CS n and CN n follow in the same manner.
Not all families of graded vi-lattices are 2-summable. For a simple example, finite graded rank-four vi-lattices fail both conditions (C1) and (C2). Interestingly, finite geometric lattices are 2-summable but in a vacuous way.
Theorem 2. The only finite geometric lattice that has a two-element level is M 2 .
Proof. Let L be a finite geometric lattice that has a two-element level {a, b}. Because L is atomistic, neither a or b has any join-irreducible covers, thus a and b are covered by exactly one element c. Further, because L is necessarily vertically indecomposable, it follows that c = 1 L , and a, b are the coatoms.
The numbers of atoms and coatoms in a finite geometric lattice of rank r are known as the Whitney numbers W 1 and W r−1 . It is known that W 1 ≤ W r−1 ; see e.g. Dowling and Wilson [3]. This implies that our L has two atoms. But we have shown that L cannot have two-element levels other than the coatoms; thus the atoms are the coatoms, and L = M 2 .
In other words, Theorem 2 says that all finite geometric lattices are special; there are no pieces and no compositions, so no use for the vertical 2-sum. Modular and distributive lattices will be more interesting for our purposes. We first prove an auxiliary result by elementary means. Lemma 3. In the Hasse diagram of a finite semimodular lattice, the subgraph induced by two consecutive levels is connected.
Proof. Let L be a finite semimodular lattice, L k its kth level, and H k the subgraph induced by L k and L k+1 . We use induction on k. Clearly H 0 is connected. Assume then that H k−1 is connected. If L k is a singleton, then obviously H k is connected. Otherwise, let (U, V ) be any partition of L k into two nonempty subsets. Because H k−1 is connected, there is an element in L k−1 that is covered by some two elements u ∈ U and v ∈ V . Then by semimodularity u and v are covered by some w ∈ L k+1 , so there is a path from U to V in H k . Finally, from every element in L k+1 there is an edge to L k . Thus H k is connected.
Note that Lemma 3 also follows from previously known, more general results: Björner [1] proved that finite semimodular lattices are lexicographically shellable, and Collins [2] proved that graded lexicographically shellable lattices are rankconnected (i.e. the subgraph induced by two consecutive levels is connected). Proof. We use subscripted symbols ∧ L , ∨ L and ≺ L to denote meet, join and covered-by in lattice L. (C1) Let L and U be finite semimodular vi-lattices, S their vertical 2-sum, and N the two identified elements of L and U . Clearly S is a vi-lattice. We show that S is semimodular by using Birkhoff's condition [6, p. 331]. Let a, b ∈ S such that they cover a ∧ S b. Then a and b have the same rank, and are either below N , in N or above N . If a, b are below N , then because L is (C2) Let S be a finite semimodular vi-lattice that is a vertical 2-sum of L and U .
Clearly L and U are vi-lattices. We show that they are semimodular, again using Birkhoff's condition. First let a, b ∈ L such that they cover a ∧ L b. If a, b are not the coatoms of L, then a ∨ L b = a ∨ S b. If a, b are the coatoms of L, then a ∨ L b = 1 L . In both cases a, b ≺ L a ∨ L b. Thus L is semimodular.
Let then a, b ∈ U such that they cover a∧ U b. If a, b are not the atoms of U , then a∧ U b = a∧ S b, and because S is semimodular, a, b ≺ U a∨ U b = a∨ S b. If a, b are the atoms of U , then they are a neck of S. Because S is semimodular, it follows from Lemma 3 that a, b have a common upper cover c in S. Then also a, b ≺ U c. Thus U is semimodular.  Proof. We recall that a finite modular lattice is distributive if and only if it does not contain a cover-preserving diamond [6, p. 109], that is, five distinct elements o, a, b, c, i such that o ≺ a, b, c ≺ i. (C1) Let L and U be finite distributive vi-lattices and S their vertical 2-sum.
By Lemma 5 S is modular. Since L and U do not contain a cover-preserving diamond, the only possibility for S to contain one would be with o ∈ L and i ∈ U , but the neck consisting of the two identified elements of L and U cannot contain three distinct elements a, b, c. Thus S is distributive. (C2) Let S be a finite distributive vi-lattice that is a vertical 2-sum of L and U . By Lemma 5 L and U are modular vi-lattices. Since S does not contain a coverpreserving diamond, the only possibility for L to contain one would be with i = 1 L , but this is impossible because L has only two coatoms. Thus L is distributive. The case of U is similar.

4.1.
Method of classifying a lattice. Given a graded vi-lattice represented by its covering graph, a short piece of program code classifies the lattice into the types described in Section 2. Calculating lattice length, counting atoms and coatoms, and finding possible necks is straightforward. For analyzing the symmetry type we use the Nauty library, version 2.7r1 [14,15]. Nauty returns the automorphism group of a given directed graph as a list of generators (γ 1 , . . . , γ k ). To classify a bottom piece we check if any generator swaps the coatoms; in that case the coatoms are symmetric, otherwise fixed. With a top piece we check if any generator swaps the atoms.
To classify a middle piece some more cases are required. It is easily seen that this procedure produces the correct classification. Note that for an MX piece, Nauty does not necessarily return generators of types A and C. It can instead return, for example, a generator γ i of type A, and a generator γ j of type B. But then γ i • γ j is an automorphism that swaps the coatoms and fixes the atoms, and then we know that the piece is indeed MX.

Modular lattices.
Modular vi-lattices were previously generated and counted up to 30 elements in [12], and up to 33 elements in unpublished work [16]. That was done with a program that starts from length-two seed lattices, and then adds new levels of elements recursively. The program lists exactly one representative lattice from each isomorphism class.
We use here essentially the same lattice-generating program, modified so that it skips all compositions, and generates only the pieces and the specials. The modification is simply that two-element levels are not allowed between coatom and atom levels, because such a level would form a neck.
With this program, all modular pieces and specials of n ≤ 35 elements were generated (up to isomorphism), and classified as described in §4.1. Because modular vi-lattices are 2-summable (Lemma 5), the numbers of modular compositions of n ≤ 35 elements are then calculated using Theorem 1.
The results of the exact counting are shown in Table 1. Rows MF-TF and "special" are from direct counting with the lattice-generating program. Rows CF-CN are calculated with the recurrence in Theorem 1. Row "vi-latt." contains the numbers of all modular vi-lattices: this is the sum of specials, pieces and compositions. Finally, row "all" has the numbers of all modular lattices (including vertical sums of vi-lattices), calculated with the vertical sum recurrence (1).
An exponential lower bound is derived as follows. Using Theorem 1 with the known numbers of modular pieces of up to 35 elements, and plugging in zeros for larger pieces (whose numbers we do not know), we obtain lower bounds on CF n , CS n and CN n for n arbitrarily large. We observe that the growth ratios (from n to n + 1) of all three lower bounds settle a little above 2.3122 for n large enough. To obtain rigorous lower bounds, we choose a convenient starting point n = 50, convenient constant coefficients in front, and apply induction.  Table 1, and zeros when the number of pieces is not known.
For n > 85 the claim follows by induction on n. Let n > 85 be arbitrary, and assume that the claimed lower bounds hold on CF m , CS m and CN m when n − 35 ≤ m ≤ n − 1. Then applying Theorem 1 gives the claimed lower bounds on CF n , CS n and CN n , which completes the induction. Corollary 1. There are at least 0.005415 × 2.3122 n nonisomorphic modular vilattices of n elements when n ≥ 50.
Proof. Add up the three lower bounds from Theorem 3.

Corollary 2.
There are at least 0.02 × 2.3713 n nonisomorphic modular lattices of n elements when n ≥ 100.
Proof. For 100 ≤ n ≤ 400 the claim follows by direct calculation with recurrence (1), using as input the lower bounds on vi-lattices of up to 400 elements computed using Theorem 3.
For the induction step, let n > 400 be arbitrary, and assume that the claimed lower bound holds for the previous 300 values. Applying (1) then gives the claimed lower bound for the number of n-element modular lattices. This completes the induction.

Distributive lattices.
Distributive vi-lattices were previously counted up to 49 elements by Erné et al. [4,17]. To count n-element distributive lattices, they actually generated posets that have n antichains; these are in a bijective correspondence with the distributive lattices.
Our approach is more direct. We generate the distributive lattices directly, using the same program that we used for modular lattices, with some modifications. The first modification is a condition that ensures that we generate only the distributive lattices. Since the original program generates modular lattices, we only need to check that whenever a new element is created, it does not create a cover-preserving diamond [6, p. 109]. This ensures that we generate the distributive lattices but no others.
We also employ an important optimization that cuts short search branches that cannot lead to distributive lattices. Our lattice-generating program (see [12] for more details) builds lattices levelwise, top down, until the number of elements reaches a preset maximum. When creating a new level, it adds new elements in decreasing order of updegree. The last step on each level is thus to create meetirreducible elements. In the original algorithm, this step can create a large number of meet-irreducible elements, limited only by the maximum lattice size. But in a distributive lattice we can limit their number as follows. We recall (see Corollary 112 in [6]) that the number of meet-irreducible elements in a distributive lattice equals the lattice length. As we build a lattice, we keep track of the meet-irreducible elements created so far, and at each level we compute an updated upper bound R on the lattice length (based on the current length and the budget of remaining elements). The number of meet-irreducible elements, including the ones already created, is then limited to be at most R.
With this program, all distributive pieces and specials of n ≤ 60 elements were generated (up to isomorphism), and classified with the method described in §4.1. Compositions were then counted using Theorem 1. The results are shown in Table 2.
An exponential lower bound is derived in the same way as with modulars. Using Theorem 1 with the known numbers of distributive pieces of up to 60 elements, and plugging in zeros for larger pieces, we obtain lower bounds on CF n , CS n and CN n whose growth ratios settle a little above 1.7250 for n large enough. To obtain rigorous lower bounds, we choose a convenient starting point n = 100, convenient constant coefficients in front, and apply induction.  Table 2, and zeros when the number of pieces is not known.
For n > 161 the claim follows by induction on n. Let n > 161 be arbitrary, and assume that the claimed lower bounds hold on CF m , CS m and CN m when n − 61 ≤ m ≤ n − 1. Then applying Theorem 1 gives the claimed lower bounds on CF n , CS n and CN n , which completes the induction.  Proof. For 100 ≤ n ≤ 400 the claim follows by direct calculation with recurrence (1), using as input the lower bounds on vi-lattices of up to 400 elements computed using Theorem 4.
For the induction step, let n > 400 be arbitrary, and assume that the claimed lower bound holds for the previous 300 values. Applying (1) then gives the claimed lower bound for the number of n-element distributive lattices. This completes the induction.

Semimodular lattices.
Although semimodular vi-lattices are 2-summable, vertical 2-sum is not very useful with them. For example, of the 1 753 185 150 semimodular vi-lattices of 25 elements, only about 23% are compositions. This is in stark contrast with modular and distributive lattices. Basically this is because semimodular lattices are short and wide (cf. Figures 4-5 in [12]). For this reason we do not include tables of semimodular lattices here, but such tables can be easily computed using the accompanying program code.
We could apply the same techniques as above to obtain an exponential lower bound. But an asymptotically stronger lower bound is obtained by constructing semimodular lattices from Steiner triple systems. A Steiner triple system is a set of k elements (points) and a collection of their 3-sets (triples), such that each pair of distinct points occurs in exactly one triple. By counting the pairs it is easily seen that the number of triples must be k(k − 1)/6. It is known that Steiner triple systems on k points exist if and only if k ≡ 1 or 3 (mod 6); such values of k are called admissible.
Given a Steiner triple system on k ≥ 7 points, if we take the points as atoms, the triples as coatoms, and augment a top and a bottom, we obtain a rank-three semimodular vi-lattice, because each pair of atoms is covered by exactly one coatom. The lattice has k + k(k − 1)/6 + 2 elements.
Theorem 5. For any n ≥ 100, the number of nonisomorphic semimodular rankthree vi-lattices containing n elements is at least 0.3286 n 1/8 n .
From these N Steiner triple systems on k points, we can form N nonisomorphic semimodular rank-three vi-lattices that have n = k+k(k−1)/6+2 elements, and by our choice of k, we have n ≤ n. To each lattice, add n−n extra coatoms covering an arbitrarily chosen atom of the highest updegree. This operation makes the lattices have exactly n elements, and preserves semimodularity and nonisomorphism, so the claim follows.
The lower bound in Theorem 5 is very loose (it does not even exceed 1 until n ≈ 7000), and is presented in simple terms just to demonstrate the asymptotic behaviour, that the number of semimodular vi-lattices grows faster than any exponential in n. The bound might be improved in several ways, for example, by using Keevash's recent improvement on Wilson's lower bound [9]. 4.5. Notes on computation. The main computational load was in generating the pieces and specials. For the largest sizes this was parallelized by running the lattice-generating program until a predefined number of elements had been added. The search state at those points was saved to a file, and the remaining work was divided among worker processes. For modular lattices of 33, 34 and 35 elements, this computation took 8.9, 23.7 and 63.1 cpu-core-days on Intel Xeon Gold 6230 processors (nominally 2.1 GHz). The time grows roughly 2.66-fold as n grows by one. For distributive lattices of 58, 59 and 60 elements, the computation took 6.3, 10.4 and 17.2 cpu-core-days, growing roughly 1.66-fold each time.
The optimization in §4.3 that made it possible to count distributive lattices up to 60 elements is just one example, out of many, where the speed of a combinatorial search is greatly affected by a simple, innocent-looking bounding condition.
Here its implementation takes about a dozen lines of code (see the accompanying program code for details). But already at 30 elements, it speeds up the generation of distributive pieces and specials from 153 seconds to 0.4 seconds; and the savings ratio keeps improving as the lattices grow.
Unfortunately, it is not always easy to come up with conditions that actually have a great impact, and are also fast enough to compute during the search. Given the large existing theory of the structure of distributive and modular lattices, it is conceivable that our lattice-generating program could still be much improved by imposing some other, so far untried, bounding conditions. 4.6. Partial verification. We describe here some of the methods that were used to partially verify the correctness of the computational results.
The pieces and specials were generated and classified twice, on different computers. The counts and the actual lattice listings were verified to be identical by comparing their MD5 checksums. This would help against transient hardware and operational errors, but not against systematic errors in the program the.
The number of MA pieces equals the number of MC pieces in each column of Tables 1 and 2. This is as it should, because such pieces are duals of each other. The same holds between BF and TF pieces, and between BS and TS pieces.
We also performed a more thorough duality check. The rank sequence of a graded lattice is the sequence of its level sizes from bottom to top. The rank sequences of a lattice and its dual are reverses of each other. In Figure 1 the BF example piece has rank sequence (1, 3, 2, 1), and its dual, the TF example piece has (1, 2, 3, 1). We counted the occurrences of each combination of symmetry type and rank sequence in pieces and specials, and verified that the numbers match between the dual pairs (MF-MF, MA-MC, MX-MX, MH-MH, BF-TF, BS-TF, and special-special). For example, among all 60-element distributive MX pieces, there are 2 137 whose rank sequence is (1, 2, 3, 4, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 1), and 2 137 whose sequence is its reverse. If any of the lattice listings were accidentally truncated or corrupted, this would likely be detected as a mismatch. An error in the lattice-generating logic or in the classification code would also have a good chance of causing a mismatch.
As a consistency check of the Cartesian counting logic, we directly generated, classified and counted all distributive vi-lattices of 50 elements including compositions. In each class, the count thus obtained matches the calculated count in Table 2. Generating these 50-element lattices took 12.6 cpu-core-days, about 70 times longer than with compositions excluded, which also demonstrates the benefits of Cartesian counting.
Our totals on rows "vi-latt." and "all" agree with previously published numbers of modular lattices to 33 elements [12,16] and distributive lattices to 49 elements [4] (except at n = 1, because we count the singleton as a vi-lattice). The previous countings did not employ the vertical 2-sum.

Concluding remarks
One of our stated goals was to create more compact lattice listings by leaving out all compositions (vertical 2-sums of smaller lattices). As seen in Tables 1 and 2, this was more successful with distributive lattices than with modulars. Compositions make up 79% of the modular vi-lattices of 35 elements, and 99.6% of the distributive vi-lattices of 60 elements.
The observed growths of the numbers of modular and distributive vi-lattices, to the extent that they are now known, are illustrated in Figure 3. In modular vi-lattices our lower bound Ω(2.3122 n ) seems loose; the observed ratios keep increasing, hinting perhaps of a (very slightly) superexponential growth. We note that no exponential upper bound is currently known on the number of modular lattices. In distributive vi-lattices the observed ratios seem to be converging, and our lower bound Ω(1.7250 n ) seems pretty good. Erné et al. have shown an upper bound of O(2.33 n ) on nonisomorphic distributive vi-lattices [4]. Our improved lower bound Ω(2.3122 n ) on nonisomorphic modular vi-lattices is still not enough to separate the growth rates of these two families. To close the gap there are different options. We could count modular pieces further. Empirically, adding one element increases the base in our lower bound by 0.0048 (but the increase diminishes as n grows). Counting the pieces up to 40 elements would probably raise the lower bound above Ω(2.33 n ). But this would take about 10 000 cpu-core-days with the current lattice-generating program, and was deemed not worth the effort. Improving the algorithm or the lower bound techniques might be a better idea. Another option is to improve the upper bound on distributive vi-lattices. Indeed, Erné et al. note that "with more effort" it might be improved considerably, at least to 2.28 n . Combined with our lower bound, this would suffice to separate the growth rates.
Although our lower bounds are based on large computations, we must point out that proper analysis of symmetry is the key to good lower bounds. Indeed, using all our data on distributive lattices (n ≤ 60), if we ignore the symmetry cases (and lose the factors of 2 in Theorem 1), we only obtain a bound of Ω(1.6213 n ) for distributive vi-lattices. In contrast, using just the distributive middle pieces of n ≤ 21 elements (a truly modest collection of 134 lattices), our symmetry-distinguishing method already gives Ω(1.6818 n ). distributive vi-lattices Figure 3. Ratio between the numbers of nonisomorphic vilattices of (n−1) and n elements, with and without vertical 2-sums.
Accompanying program code is available in Bitbucket [10]. This includes C programs to generate the pieces and the specials, to classify and count them by symmetry type, and to perform the Cartesian counting. Also included is SageMath code for verifying the exponential lower bounds. The lattice listings (pieces and specials only) were stored in digraph6 format and compressed with xz. The compressed listings take about 167 GB of disk space, and will be available in [11].