Hello sympy community, I have a PhD in math and as a result of my research some unique knowledge that has allowed me to implement fast computations with Schubert polynomials. I compiled a python package in 2023 that started out as just console scripts, then it was suggested at a math conference that I try to integrate it into something like, say, Sage.
I did this, but Sage is monstrous and can only be used on a linux-based operating system, which is not ideal. Granted, the "market" for a Schubert polynomials package is quite limited (I say "market" because obviously no one would pay for this, it's a figure of speech), and the depth of computer algebra capabilities that are needed for this is quite low. No offense to sympy, but no one would argue that compared to Sage it is quite lightweight, takes seconds to install, etc. Anyway my training is in math, not programming, and I do mainly program for a living, but I'm not a software engineer per se, and the subject of my job has little to do with computer algebra. Anyway I have created subclasses of Expr that deal with Schubert polynomials, double Schubert polynomials, quantum Schubert polynomials, quantum double Schubert polynomials, parabolic quantum (double) Schubert polynomials, and interplays between them. I wanted to give a link to my github project for anyone who is interested at looking at it. I suspect that from your perspective it is pretty much a dumpster fire of bad practice, and any advice you may have is welcome. https://github.com/matthematics/schubmult I'm reaching out because I'm running into issues that should be pretty elementary if I were doing it right. For example, the best representation of linear combinations of Schubert polynomials is as a dict of coefficients of basis elements, but there are some times when they need to be left uncombined, but then you should be able to add to the uncombined terms and combine with the cominable ones. sympy does automatically do that, for example, >>> DSx([3,4,1,2]) + DSx([4,1,3,2],"z") DSx((3, 4, 1, 2), y) + DSx((4, 1, 3, 2), z) This is sympy.Add, not a DoubleSchubertAlgebraElement, because the sets of coefficient variables, y and z, are different. This is what I want. When we do this, however, >>> DSx([3,4,1,2]) + DSx([4,1,3,2],"z") + DSx([3,4,1,2]) 2*DSx((3, 4, 1, 2), y) + DSx((4, 1, 3, 2), z) This looks correct, however that 2*DSx((3, 4, 1, 2), y) is a sympy.Mul object, when what I want is for it to be internally represented as {(3,4,1,2): 2}, which it is not. I feel like this is similar to the Poly class being a subclass of Basic instead of Expr, but I don't know if I want to be that rigid. And combining terms as Expr alone is inefficient. These can have hundreds or thousands of terms after multiplying, and the hashmap of keys is the most efficient way to combine coefficients. I guess this is a question? What's the most elegant way to get that 2 into that dict? As well as an introduction and salutations. Thanks, Matt -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sympy/fec1e0d2-a271-4cea-8cd0-ab4c216ef721n%40googlegroups.com.