feedback on construction functor for symmetric functions

64 views
Skip to first unread message

Martin R

unread,
Feb 11, 2024, 11:34:44 AM2/11/24
to sage-devel
At https://github.com/sagemath/sage/pull/37220, I implemented a (simple minded) construction functor for symmetric functions.

The only major user visible change should be that

sage: sZ = SymmetricFunctions(ZZ).s()
sage: sQ = SymmetricFunctions(QQ).s()
sage: sZ[1,1] + sQ[2]
s[1,1] + s[2]

now works.  This, and a little bit more, is what I need for my lazy symmetric functions project.

Under the hood, the pull request replaces `corresponding_basis_over` with a proper construction functor which, however, follows the same spirit: every basis of symmetric functions has to provide a description on how to create it, by storing the appropriate method names.

There is a todo note by Darij Grinberg from 2013 that this is an ugly hack, and I agree, but nobody came up with anything better in the last 11 years, so we might as well go with the idea which is working, at least for the moment.

There is one more uglyness I have to mention: I describe the functor as a functor on the category of commutative rings, which is not true in general.  For example, for Macdonald polynomials, the functor really is from the category of commutative rings with two distinguished elements.  I am guessing that creating a category RingsWithDistinguishedElements is a bit much, and I wouldn't know how to do it.

Comments (and, of course, also a review) would be greatly appreciated!

Martin

Martin R

unread,
Feb 11, 2024, 5:42:52 PM2/11/24
to sage-devel
Apart from that, I think the last bit I need to do is to make the TensorProductFunctor inherit from MultivariateConstructionFunctor, to make coercion work for things like

sage: h = SymmetricFunctions(ZZ).h()
sage: T = tensor([h, h])
sage: T.base_ring()
Integer Ring
sage: 1/2*T.an_element()

(which currently raises TypeError: unsupported operand parent(s) for *: 'Rational Field' and 'Symmetric Functions over Integer Ring in the homogeneous basis # Symmetric Functions over Integer Ring in the homogeneous basis')

Am I on the right track?

Martin

Travis Scrimshaw

unread,
Feb 11, 2024, 11:13:58 PM2/11/24
to sage-devel
Hi Martin,
   I plan to look closely at this this week. Unfortunately I cannot offer anything quick now.

Best,
Travis

Martin R

unread,
Feb 14, 2024, 11:01:39 AM2/14/24
to sage-devel
Thank you!  To get a working prototype for the functional equations solver, the coercion issue with tensors is the most interesting issue.

I am already quite happy that it works with symmetric functions in one variable!

Apart from technicalities, it might then be interesting to explore whether we can improve on the set of equations we want to solve.  Interestingly, the example I had (line 912 in lazy_series_ring.py of the pull request) currently fails in an unexpected way }:-)

Liebe Grüße aus Bonn,

Martin
Reply all
Reply to author
Forward
0 new messages