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.
2 | No.2 Revision |
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
instead.QSym.F()[C]F[C]