# isModular -- determines if a lattice is modular

## Synopsis

• Usage:
i = isModular P
• Inputs:
• P, an instance of the type Poset, a ranked lattice
• Outputs:
• i, , whether $P$ is modular

## Description

Let $r$ be the ranking of $P$. Then $P$ is modular if for every pair of vertices $a$ and $b$, $r(a) + r(b) = r(join(a,b)) + r(meet(a,b,))$. That is, $P$ is modular if it isLowerSemimodular and isUpperSemimodular.

The $n$ chain and the $n$ booleanLattice are modular.

 i1 : n = 4; i2 : isModular chain n o2 = true i3 : isModular booleanLattice n o3 = true

The following lattice is not modular.

 i4 : P = poset {{1, 2}, {1, 5}, {2, 3}, {2, 4}, {3, 7}, {4, 7}, {5, 4}, {5, 6}, {6, 7}}; i5 : isLattice P o5 = true i6 : isModular P o6 = false

This method uses the methods isLowerSemimodular and isUpperSemimodular, which were ported from John Stembridge's Maple package available at http://www.math.lsa.umich.edu/~jrs/maple.html#posets.

• isLattice -- determines if a poset is a lattice
• isLowerSemimodular -- determines if a ranked lattice is lower semimodular
• isRanked -- determines if a poset is ranked
• isUpperSemimodular -- determines if a lattice is upper semimodular
• posetJoin -- determines the join for two elements of a poset
• posetMeet -- determines the meet for two elements of a poset
• rankFunction -- computes the rank function of a ranked poset

## Ways to use isModular :

• "isModular(Poset)"

## For the programmer

The object isModular is .