Skip to content

Commit

Permalink
sagemathgh-38446: Implement basic multivariate polynomial species
Browse files Browse the repository at this point in the history
    
Related to sagemath#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 sagemath#38371.

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#38446
Reported by: Mainak Roy
Reviewer(s): Mainak Roy, Martin Rubey, Travis Scrimshaw
  • Loading branch information
Release Manager committed Nov 13, 2024
2 parents d4a056c + 9ef4cdb commit 3a25729
Show file tree
Hide file tree
Showing 4 changed files with 2,428 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ REFERENCES:
graphs and isoperimetric inequalities*, The Annals of Probability
32 (2004), no. 3A, 1727-1745.
.. [ALL2002] P. Auger, G. Labelle and P. Leroux, *Combinatorial
addition formulas and applications*, Advances in Applied
Mathematics 28 (2002) 302-342.
.. [ASV2020] Federico Ardila, Mariel Supina, and Andrés R. Vindas-Meléndez,
*The Equivariant Ehrhart Theory of the Permutahedron*,
Proc. Amer. Math. Soc. Volume 148, Number 12, 2020, pp. 5091--5107.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/filtered_modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def homogeneous_degree(self):
raise ValueError("the zero element does not have a well-defined degree")
if not self.is_homogeneous():
raise ValueError("element is not homogeneous")
return self.parent().degree_on_basis(self.leading_support())
return self.parent().degree_on_basis(next(iter(self.support())))

# default choice for degree; will be overridden as necessary
degree = homogeneous_degree
Expand Down
19 changes: 19 additions & 0 deletions src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,25 @@ def conjugate(self, g):
raise TypeError("{0} does not convert to a permutation group element".format(g))
return PermutationGroup(gap_group=libgap.ConjugateGroup(self, g))

def are_conjugate(self, H1, H2):
r"""
Return whether ``H1`` and ``H2`` are conjugate subgroups in ``G``.
EXAMPLES::
sage: G = SymmetricGroup(3)
sage: H1 = PermutationGroup([(1,2)])
sage: H2 = PermutationGroup([(2,3)])
sage: G.are_conjugate(H1, H2)
True
sage: G = SymmetricGroup(4)
sage: H1 = PermutationGroup([[(1,3),(2,4)], [(1,2),(3,4)]])
sage: H2 = PermutationGroup([[(1,2)], [(1,2),(3,4)]])
sage: G.are_conjugate(H1, H2)
False
"""
return libgap.IsConjugate(self, H1, H2).sage()

def direct_product(self, other, maps=True):
"""
Wraps GAP's ``DirectProduct``, ``Embedding``, and ``Projection``.
Expand Down
Loading

0 comments on commit 3a25729

Please sign in to comment.