A lattice is said to be **modular** if the following identity holds $ (x \vee a) \wedge b = (x \wedge b) \vee a $ whenever $ a \le b $. Modular lattices include the following:

- Distributive lattices
- The lattice of subgroups of an abelian group.
- The lattice of subspaces of a vector space.
- More generally, the lattice of submodules of a module over a ring.
- The lattice of ideals in a ring.

Modularity is essentially the condition needed for some version of the Jordan-Hölder theorem to hold. Recall that a composition sequence in a poset is a sequence $ x_0 < x_1 < \cdots < x_n $ such that for each $ i $, there is no $ y $ such that $ x_i < y < x_{i+1} $. Then one has the following result:

Let $ (L,\le) $ be a modular lattice. Suppose $ x \le y $ are elements of $ L $. If there is a composition sequence starting with $ x $ and ending with $ y $, then all such composition sequences have the same length. If this length is $ \ell $, then any chain from $ x $ to $ y $ has length at most $ \ell $.

Suppose that $ L $ is a modular lattice with a least element $ 0 $, and suppose that for every $ x \in L $, there is a composition sequence from $ 0 $ to $ x $. Then one can define the "rank" of $ x $ to be the length of such a composition sequence, and the following identity holds: $ rank(x \vee y) + rank(x \wedge y) = rank(x) + rank(y). $ These assumptions hold in particular for finite modular lattices.

Conversely, if $ (L,\le) $ is a finite lattice with a function $ rank : L \to \mathbb{N} $ such that $ rank(x \vee y) + rank(x \wedge y) = rank(x) + rank(y) $ holds for every $ x, y $, and such that $ x < y \implies rank(x) < rank(y) $, then $ L $ is modular.

Modularity mainly appears in model theory through the notion of a modular pregeometry. A pregeometry is **modular** if the lattice of closed sets is modular. An equivalent condition is that the lattice of finite rank closed sets is modular, which is in turn equivalent to the identity $ rank(X \cap Y) + rank(X \cup Y) = rank(X) + rank(Y) $ whenever $ X $ and $ Y $ are closed sets (of finite rank). Modular pregeometries are essentially equivalent to projective planes and higher-dimensional generalizations (projective spaces).

Conversely, if $ (L,\le) $ is a modular lattice with least element 0, there is a natural pregeometry structure on the atoms of $ L $, i.e., the set of elements $ x \in L $ such that $ 0 < x $ is a composition sequence.

A (finite?) modular lattice is said to be **atomic** if every element is the join of the atoms below it. Atomic (finite?) modular lattices are essentially equivalent to modular pregeometries.

Modularity plays an important role in the (false) Zilber trichotomy conjecture, as well as results like the Buechler dichotomy and Zilber's theorem on countably categorical strongly minimal sets.