Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If I've not misread the docs, this is a function that computes $F_{k,S}$:

def myF(k,S,N):
    S = sorted(S)
    C = [u-v for u,v in zip(S+[k],[0]+S)]
    QSym = QuasiSymmetricFunctions(QQ)
    return QSym.F()[C].expand(N)

If you want it in unexpanded form, then you can return QSym.F()[C] instead.

If I've not misread the docs, this is a function that computes $F_{k,S}$:

def myF(k,S,N):
    S = sorted(S)
    C = [u-v for u,v in zip(S+[k],[0]+S)]
vector(S+[k]) - vector([0]+S)
    QSym = QuasiSymmetricFunctions(QQ)
    F = QSym.F()
    return QSym.F()[C].expand(N)
F[C].expand(N)

If you want it in unexpanded form, form as a quasi-symmetric polynomial object, then you can return QSym.F()[C]F[C] instead.