Ask Your Question

Revision history [back]

The first thing I would try would be to look in the following files in SAGE_ROOT/devel/sage/sage/combinat/: integer_list.py, partition.py, composition.py, etc. From the documentation for IntegerListsLex from integer_list.py:

A combinatorial class `C` for integer lists satisfying certain
sum, length, upper/lower bound and regularity constraints.

and

This is a generic low level tool. The interface has been designed
with efficiency in mind. It is subject to incompatible changes in
the future. More user friendly interfaces are provided by high
level tools like Partitions or Compositions.

I know you asked about permutations, not partitions, but this might help anyway.