-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement basic multivariate polynomial species #38446
base: develop
Are you sure you want to change the base?
Conversation
…groups Also added various miscellaneous functions
Co-authored-by: Martin Rubey <[email protected]>
Also some fixes to _element_constructor_ ConjugacyClassesOfSubgroups
Added _repr_ for ConjugacyClassesOfSubgroups I now output B[(gens or name if available)] as _repr_ for generators, for example B[1] + 2*B[(2,3,4)]
…y and doctest updates
…ial case in construct_element
…in MolecularSpecies __call__
… and use gens_small in ConjugacyClassOfSubgroups _canonicalize
Done, now |
src/sage/rings/species.py
Outdated
sage: E2XY = At(G, pi) | ||
sage: At(G, pi).rename("E_2(XY)"); E2XY | ||
E_2(XY) | ||
sage: m = P._indices.gen((G, pi)); m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit fishy to me: why should gen
accept anything but an atomic species? It seems to me that only _element_constructor_
should accept input that is not in the right form.
I think you could remove gen
, and make _project
return an atomic species, no?
I now see that you then get an infinite recursion because of the group computation - can you remind me why it is better to compute the group always, rather than only when it is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intention originally was to only compute the group when needed. It appears that I may have instead achieved the opposite, because I was trying to cache intermediate results for optimisation 🤔 ...
I just found this comment. I think it is best to make it a cached method of
and compute it there. |
Let me ask another question concerning canonicalization: why does It seems to me that given the "canonical" representative (in |
So, how do we store the name associations? And yes, given the canonical representative, the domain partition is enough. |
I see, in principle, two ways to do this:
I could only find one example of an element class that inherits from |
Here is an important bug which is possibly related to the missing total order:
|
How would we break ties between atomic species with equal multicardinality? |
|
||
EXAMPLES:: | ||
|
||
sage: P = PolynomialSpecies(QQ, ["X"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E2(X^2) fails if we use P = PolynomialSpecies(ZZ, ["X"]) instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is unfortunate, but a consequence of the way I implement call
src/sage/rings/species.py
Outdated
ElementCache.__init__(self) | ||
self._arity = indices._arity | ||
|
||
def _project(self, G, pi, part): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not depend on self
currently. Maybe it should really be def _project(self, part)
?
@tscrim, I think this is now essentially ready for discussion. My main question is whether the ad-hoc There is certainly a lot of room for improvement, but I am hoping that such would be of local kind. |
Related to #30727.
We implement basic functionality for multivariate polynomial species, using its representation as a pair of a permutation group and a mapping between the domain of the permutation group and some variables. We provide addition, multiplication, and (partitional) composition (for some special cases). We also allow it to be constructed as a group action (or a sequence thereof). Atomic and molecular decompositions are automatically computed thanks to #38371.
📝 Checklist
⌛ Dependencies
Dependent on #37991 (presently, may change soon).