isModularCut(M, K)
This function is provided by the package Matroids.
A modular cut for a matroid M is a collection K of flats of M with the properties that for any flats F and G of M: (i) if F is in K and F is contained in G, then G is also in K, and (ii) if the rank of union of F and G plus the rank of the intersection of F and G equals the sum of the ranks of F and G, then the intersection of F and G is also in K. Two flats F and G satisfying the rank condition in (ii) above are called a modular pair. If F is contained in G, then F and G trivially form a modular pair.
Each flat in the modular cut may be represented as either a set or a list of elements of the ground set of M. The list of flats K below is a modular cut for the uniform matroid U_{4,5} since the only two incomparable flats are not a modular pair; both flats have rank 3, but their intersection and union have rank 1 and 4 respectively.



The list of flats K' below is not a modular cut since the flats {0,1,2} and {0,1,3} are a modular pair but their intersection does not belong to K'.


The object isModularCut is a method function.