Symmetric functions from polynomials

77 views
Skip to first unread message

Trevor Karn

unread,
Oct 30, 2025, 4:32:47 PMOct 30
to sage-devel
Hi all,

I have a question about a design decision for working with symmetric functions.

I was doing some computations passing back and forth between symmetric polynomials (finitely many variables) and symmetric functions (infinitely many variables). When converting between a symmetric polynomial in 2 variables and one in infinitely many variables in the s-basis, I obtained a term of -s_{111}. I understand why this is happening under the hood, but my question is about the desired behavior. To me, it seems like `.from_polynomial()` should only return Schur functions indexed by partitions with at most the number of rows equal to the number of variables in the polynomial or in the ambient ring. On the other hand, creating the polynomial and then expanding back in terms of two variables is the identity.

Does anyone else have any opinions on this matter? If the consensus is that length should be bounded by number of polynomial generators, then I can open the ticket and make the fix, but I wanted to hear some input from others.

Thanks,
Trevor

Trevor Karn

unread,
Oct 30, 2025, 4:33:59 PMOct 30
to sage-devel
Sorry - I forgot to include the example I had in mind.

sage: Sym = SymmetricFunctions(QQ)

sage: s = Sym.s()

sage: s[3].expand(2)(1+x,1+y)

x^3 + x^2*y + x*y^2 + y^3 + 4*x^2 + 4*x*y + 4*y^2 + 6*x + 6*y + 4

sage: f = s[3].expand(2)(1+x,1+y)

sage: s.from_polynomial(f).expand(2)(x,y) == f

True

sage: s.from_polynomial(f)

4*s[] + 6*s[1] - s[1, 1, 1] + 4*s[2] + s[3]


Martin R

unread,
Oct 31, 2025, 5:14:01 AMOct 31
to sage-devel
I think it boils down to the question whether `basis.from_polynomial` should depend on the basis or not.  Currently, it does not, since basis is always the monomial basis, right?  What would you want it to do in the h basis?

Martin

Trevor Karn

unread,
Oct 31, 2025, 10:57:21 AMOct 31
to sage-...@googlegroups.com
In my mind it should depend on the basis. I see your point about the h basis but in my mind since I am already choosing a basis and a number of variables to substitute there is no reason to want something canonical. What do you think, Martin?

Best,

Trevor


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/vwDhGB5Q5uI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/7d70e726-64b5-4fef-9d7d-05656e5dc900n%40googlegroups.com.

Martin R

unread,
Oct 31, 2025, 7:24:23 PMOct 31
to sage-devel
I don't see a natural way to define it depending on the basis.  I think it would be weird to make a special case for the Schur basis.  Also, isn't it easy to get rid of the partitions that are too long afterwards, if this is necessary for your application?

Best wishes,

Martin
Reply all
Reply to author
Forward
0 new messages