Hi all,
What I want to do right now is the minimum amount of work to get our code accepted into Sage. Going through the documentation, I noticed that extension() currently purports to do the following:
cpdef extension(self, element=None, subsets=None):
r"""
Return an extension of the matroid.
An *extension* of `M` by an element `e` is a matroid `M'` such that
`M' \setminus e = M`. The element ``element`` is placed such that it
lies in the :meth:`closure <sage.matroids.matroid.Matroid.closure>` of
each set in ``subsets``.
INPUT:
- ``element`` -- (default: ``None``) the label of the new element. If
not specified, a new label will be generated automatically.
- ``subsets`` -- (default: ``None``) a set of subsets of the matroid.
The extension should be such that the new element is in the span of
each of these. If not specified, the element is assumed to be in the
span of no set (so it will be a coloop).
But in the implementation it does this:
# TODO: turn ``subsets`` into a set of hyperplanes
hyperplanes = subsets
I think that in order to satisfy the specification of the method, we will have to compute the entire modular cut generated by "subsets", right? So I added a method that does just that (also useful when checking for clones -- I actually wrote that code for my research a while back). Apart from that I'm perfectly happy to use only linear subclasses, and perfectly happy to call them just that (with plenty of explaining and cross references in the documentation).
Cheers,
Stefan.