Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ok, it sounds like you want to work in the ring of symmetric functions (however you didn't mention that there might be a + or * or take linear combinations, but these features don't seem to interfere with what you are asking for). Are you allowed repeated entries?

If I am not mistaken, even if this is not precisely what you are looking for, it seems like this algebra should be your model.

You seem to be asking for a vector space whose coefficients are integers and whose index set is a sorted list of non-negative integers (I'm adding the non-negative integer condition for convenience). If this is the case, then lets call them 'partitions.' I hope you don't mind that they will display in weakly decreasing order rather than increasing order, but I don't see that option built in so it will take slightly more than a couple of lines of programming.

sage: Sym = SymmetricFunctions(ZZ)
sage: s = Sym.complete()
sage: s._prefix='s'
sage: def my_s(lst):
....:     return s.mul(s([a]) for a in lst)
....: 
sage: my_s([2,1,2,3])
s[3, 2, 2, 1]
sage: 2*my_s([2,4])+my_s([1,2,3])
s[3, 2, 1] + 2*s[4, 2]

Is this what you were looking for or am I interpreting what you were asking.

P.S. calling the complete basis 's' kind of goes against my nature, because we use that for Schur functions normally. But the line "s._prefix='s'" makes sure that the result is displayed with an 's' instead of the default 'h' just to follow closely the notation you were looking for.

Ok, it sounds like you want to work in the ring of symmetric functions (however you didn't mention that there might be a + or * or take linear combinations, but these features don't seem to interfere with what you are asking for). Are you allowed repeated entries?

If I am not mistaken, even if this is not precisely what you are looking for, it seems like this algebra should be your model.

You seem to be asking for a vector space whose coefficients are integers and whose index set is a sorted list of non-negative integers (I'm adding the non-negative integer condition for convenience). If this is the case, then lets call them 'partitions.' I hope you don't mind that they will display in weakly decreasing order rather than increasing order, but I don't see that option built in so it will take slightly more than a couple of lines of programming.

sage: Sym = SymmetricFunctions(ZZ)
sage: s = Sym.complete()
sage: s._prefix='s'
sage: def my_s(lst):
....:     return s.mul(s([a]) for a in lst)
....: 
sage: my_s([2,1,2,3])
s[3, 2, 2, 1]
sage: 2*my_s([2,4])+my_s([1,2,3])
s[3, 2, 1] + 2*s[4, 2]

Is this what you were looking for or am I interpreting mis-interpreting what you were asking.asking?

P.S. calling the complete basis 's' kind of goes against my nature, because we use that for Schur functions normally. But the line "s._prefix='s'" makes sure that the result is displayed with an 's' instead of the default 'h' just to follow closely the notation you were looking for.

Ok, it sounds like you want to work in the ring of symmetric functions (however you didn't mention that there might be a + or * or take linear combinations, but these features don't seem to interfere with what you are asking for). Are you allowed repeated entries?

If I am not mistaken, even if this is not precisely what you are looking for, it seems like this algebra should be your model.

You seem to be asking for a vector space whose coefficients are integers and whose index set is a sorted list of non-negative integers (I'm adding the non-negative integer condition for convenience). If this is the case, then lets call them 'partitions.' I hope you don't mind that they will display in weakly decreasing order rather than increasing order, but I don't see that option built in so it will take slightly more than a couple of lines of programming.

sage: Sym = SymmetricFunctions(ZZ)
sage: s h = Sym.complete()
sage: s._prefix='s'
h._prefix='s'
sage: def my_s(lst):
s(lst):
....:     return s.mul(s([a]) h.mul(h([a]) for a in lst)
....: 
sage: my_s([2,1,2,3])
s([2,1,2,3])
s[3, 2, 2, 1]
sage: 2*my_s([2,4])+my_s([1,2,3])
2*s([2,4])+s([1,2,3])
s[3, 2, 1] + 2*s[4, 2]

Is this what you were looking for or am I mis-interpreting what you were asking?

P.S. calling the complete basis 's' kind of goes against my nature, because we use that for Schur functions normally. But the line "s._prefix='s'" makes sure that the result is displayed with an 's' instead of the default 'h' just to follow closely the notation you were looking for.