symfn, a library for computing with symmetric functions

63 views
Skip to first unread message

Mike Hansen

unread,
Sep 14, 2026, 3:49:38 AMSep 14
to sage-devel
Hello,

I just released symfn 0.9.0 on PyPI, which is a Rust and Python
library. It was designed to be a replacement for Symmetrica, but also
includes functionality not contained in Symmetrica as well.
Documentation for the library can be found at
https://symfn.readthedocs.io/en/latest/. It offers orders of magnitude
performance improvements.

I have a branch of Sage at
https://github.com/sagemath/sage/compare/develop...mwhansen:sage:symfn
which builds a small extensions module and integrates the library into
Sage. It should be passing all of the sage.combinat.sf tests.

sage: Sym = SymmetricFunctions(QQ); s = Sym.s()
sage: %time x = s[6].plethysm(s[6])
Wall time: 169 ms vs. 5min 30s in current Sage

sage: st = Sym.st()
sage: %time x = st[4,3]*st[4,3]
Wall time: 19 ms vs. 9.6 s in current Sage

sage: Sym = SymmetricFunctions(QQ['t']); m = Sym.m()
sage: HSp = Sym.llt(3).hspin()
sage: %time x = m(HSp[4,3,2])
Wall time: 46 ms vs. 56.5 s in current Sage

sage: Sym = SymmetricFunctions(FractionField(QQ['t'])); m = Sym.m()
sage: JP = Sym.jack().P()
sage: %time x = m(JP[5,3,2,1])
Wall time: 297 ms vs. 1min 12s in current Sage

On the packaging front, it is similar to rpds-py (which is shipped
with Sage) where wheels for many different platforms are built, and it
should not require a Rust toolchain to install.

--Mike

Michael Orlitzky

unread,
Sep 14, 2026, 8:33:38 AMSep 14
to sage-...@googlegroups.com
On Mon, 2026-09-14 at 09:49 +0200, Mike Hansen wrote:
>
> On the packaging front, it is similar to rpds-py (which is shipped
> with Sage) where wheels for many different platforms are built, and it
> should not require a Rust toolchain to install.

Sigh. I would love for symmetrica maintenance to be taken off my plate,
but rpds-py isn't a dependency of sage, only (transitively) of the
jupyter notebook. And on the platforms where there are no rpds-py
wheels, there is simply no jupyter notebook. This is "ok" because the
sage library doesn't depend on the notebook, but replacing symmetrica
with a rust package would nuke the entire library.

Mike Hansen

unread,
Sep 14, 2026, 8:51:46 AMSep 14
to sage-...@googlegroups.com
On Mon, Sep 14, 2026 at 2:33 PM Michael Orlitzky <mic...@orlitzky.com> wrote:
> Sigh. I would love for symmetrica maintenance to be taken off my plate,
> but rpds-py isn't a dependency of sage, only (transitively) of the
> jupyter notebook. And on the platforms where there are no rpds-py
> wheels, there is simply no jupyter notebook. This is "ok" because the
> sage library doesn't depend on the notebook, but replacing symmetrica
> with a rust package would nuke the entire library.

Do you happen to know if there are particular platforms that Sage
supports for which there aren't wheels?

--Mike

Michael Orlitzky

unread,
Sep 14, 2026, 9:01:16 AMSep 14
to sage-...@googlegroups.com
On Mon, 2026-09-14 at 14:51 +0200, Mike Hansen wrote:
>
> Do you happen to know if there are particular platforms that Sage
> supports for which there aren't wheels?

There's no official list AFAIK, but sage currently runs on every
platform that C, C++, and python run on. Python itself is largely
platform-independent and written in C, so that list includes pretty
much every system for which there is a C compiler, i.e. all of them.

The riscv/musl system that I have been using for several years now is
one that doesn't have wheels.

(I have been slowly working on a draft PR to make symmetrica optional
at build time, but we lose a large chunk of sage.combinat in the
process.)

Mike Hansen

unread,
Sep 14, 2026, 1:41:38 PMSep 14
to sage-...@googlegroups.com
On Mon, Sep 14, 2026 at 3:01 PM Michael Orlitzky <mic...@orlitzky.com> wrote:
> (I have been slowly working on a draft PR to make symmetrica optional
> at build time, but we lose a large chunk of sage.combinat in the
> process.)

It may need a bit of a cleanup, but this approach looks reasonable:
https://github.com/sagemath/sage/pull/42798

--Mike
Reply all
Reply to author
Forward
0 new messages