Identifier
Mp00000: Integer partitions Decrement the largest parts of a partitionInteger partitions
Description
For partitions with the largest part > 1, we decrement all the largest parts by 1 and increment the other (largest possible) parts to obtain the resulting partition of the same number. The resulting partition may grow in length as needed.
Sage code
def increment_first_part(p,length=None):
    '''
        Increment the part with the smallest index `i` > 1 in partition `p` when such `i` exists.
        When `length` is given it bound the length of the resulting partition. Otherwise, it may become longer than `p`.
    '''
    q = list(p) + [0]*(0 if length is None else length-len(p))
    try:
        # find smallest index i>0 such that q[i] can be incremented
        i = next(i for i in range(1,len(q)) if q[i]<q[i-1])
        q[i] += 1
    except StopIteration:
        if length is None:
            # grow length of the partition
            q.append(1)
    return Partition(q)

def mapping(p):
    if len(p)==0 or p[0]==1: return p
    m0 = max(i+1 for i in range(len(p)) if p[i]==p[0])   # multiplicity of part p[0]
    q = list(p)
    for i in range(m0): q[i] -= 1
    for i in range(m0): q = increment_first_part(q)
    return Partition(q)

Created
Jul 02, 2025 at 19:45 by Max Alekseyev
Updated
Jul 02, 2025 at 19:45 by Max Alekseyev
1 Comments (hide)

Martin Rubey
4 Jul 10:30
Hi Max! Do you have any reference in which context this map appears (possibly implicitly)? Do you know of any desirable properties the map has? I am asking, because each map comes with (a rather high) cost: each map is combined with all the other maps in all possible ways, up to a certain weight. Therefore, I want to make sure that the "best" (or "useful", "naturally occurring", etc) version of the map is added.

Comment:
Name:
E-Mail:
Send e-mail on new comments:
Captcha:
Please type the top row of
captcha
add comment