Ask Your Question

Substitution in Expression of Symmetric Functions over Polynomial Ring

asked 2021-04-06 08:12:11 +0100

RaymondChou gravatar image

Hi everyone! So I'm working in the ring of symmetric functions over a polynomial ring, say $\mathbb{Q}[q]$, and I have an expression of the form

$$ q^2s_{2,1} + (q-1)s_{1,1,1}$$

I want to perform the substitution $q = q+1$ in this expression, but all of the usual methods (subs, substitute, etc.) give me an error. Does anyone know how to do this?

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-04-06 09:21:38 +0100

FrédéricC gravatar image

Like this

sage: q=polygen(QQ,'q')                                                         
sage: s=SymmetricFunctions(q.parent()).s()                                      
sage: f=q*s([4])+(q-1)*s([3,2])                                                 
sage: f.map_coefficients(lambda q:q+1)                                          
q*s[3, 2] + (q+1)*s[4]
edit flag offensive delete link more


Thank you so much!

RaymondChou gravatar imageRaymondChou ( 2021-04-06 23:19:22 +0100 )edit

In f.map_coefficients(lambda q:q+1), the parameter q has nothing to do with the variable q defined above. One should better use f.substitute({q:q+1}) for replacing the defined variable q with q+1.

Max Alekseyev gravatar imageMax Alekseyev ( 2021-04-07 15:51:57 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-04-06 08:12:11 +0100

Seen: 268 times

Last updated: Apr 06 '21