One way to do that is using the conjugate partition.
For any partition, the conjugate partition is the one whose lines are the columns of p;
analogue to the transpose for matrices.
Here is how to use it to remove vertical border strip.
sage: p = Partition([5,3,1])
sage: p
[5, 3, 1]
sage: unicode_art(p)
┌┬┬┬┬┐
├┼┼┼┴┘
├┼┴┘
└┘
sage: h = p.remove_horizontal_border_strip(1).list()
sage: h
[[5, 3], [5, 2, 1], [4, 3, 1]]
sage: unicode_art(q)
⎡ ┌┬┬┬┬┐ ┌┬┬┬┐ ⎤
⎢ ┌┬┬┬┬┐ ├┼┼┴┴┘ ├┼┼┼┘ ⎥
⎢ ├┼┼┼┴┘ ├┼┘ ├┼┴┘ ⎥
⎣ └┴┴┘ , └┘ , └┘ ⎦
sage: pc = p.conjugate()
sage: pc
[3, 2, 2, 1, 1]
sage: unicode_art(pc)
┌┬┬┐
├┼┼┘
├┼┤
├┼┘
├┤
└┘
sage: qq = [q.conjugate() for q in pc.remove_horizontal_border_strip(1)]
sage: qq
[[4, 3, 1], [5, 2, 1], [5, 3]]
sage: unicode_art(qq)
⎡ ┌┬┬┬┐ ┌┬┬┬┬┐ ⎤
⎢ ├┼┼┼┘ ├┼┼┴┴┘ ┌┬┬┬┬┐ ⎥
⎢ ├┼┴┘ ├┼┘ ├┼┼┼┴┘ ⎥
⎣ └┘ , └┘ , └┴┴┘ ⎦
One can define a corresponding function:
def remove_vertical_border_strip(p, k):
r"""
Return the partitions obtained from ``p`` by removing
a vertical border strip of length ``k``.
EXAMPLE::
sage: p = Partition([5, 3, 1])
sage: remove_vertical_border_strip(p, 1)
[[4, 3, 1], [5, 2, 1], [5, 3]]
"""
pc = p.conjugate()
return [q.conjugate() for q in pc.remove_horizontal_border_strip(k)]
and then just use that function:
sage: p = Partition([5, 3, 1])
sage: qq = remove_vertical_border_strip(p, 1)
sage: qq
[[4, 3, 1], [5, 2, 1], [5, 3]]
sage: unicode_art(qq)
⎡ ┌┬┬┬┐ ┌┬┬┬┬┐ ⎤
⎢ ├┼┼┼┘ ├┼┼┴┴┘ ┌┬┬┬┬┐ ⎥
⎢ ├┼┴┘ ├┼┘ ├┼┼┼┴┘ ⎥
⎣ └┘ , └┘ , └┴┴┘ ⎦
What is
remove_horizontal_border_strip
? What is a "border strip"? What isIntegerListLex
? And what is that $k$? Please insert the framework, an example - best coming with working code for it, and any details that may elucidate the problem. It is always a good idea to imagine how the answer would look like and give details in a length corresponding to this answer. Potential answerers may see connections with own work, this is then profitable for the community. In this second i have no point to start.When you use partitions a "border strip" is a partition which diagram has no two cell in the same column(horizontal) or not in the same row(vertical). In Sage with partitions you can do
remove_horizontal_border_strip
which returns the partitions obtained from self by removing an horizontal border strip of length k. For example Partition([5,3,1]).remove_horizontal_border_strip(1).list() [[5, 3], [5, 2, 1], [4, 3, 1]]