Skip to content
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

Merged
merged 171 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from 168 commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
8a5f1db
Initial commit
Newtech66 May 12, 2024
ce7c87f
Added _add_, _mul_, _element_constructor_ for group action input
Newtech66 May 14, 2024
2ae5497
Fixed bugs with caching and _mul_
Newtech66 May 14, 2024
663b422
Improved repr output and added a way to name conjugacy classes of sub…
Newtech66 May 15, 2024
b3f16ba
Merge branch 'develop' into burnside_ring
mantepse May 15, 2024
6f9cac4
Update src/sage/rings/burnside.py
Newtech66 May 16, 2024
bec9b0b
Doctest updates
Newtech66 May 16, 2024
476218f
Added ConjugacyClassesOfSubgroups
Newtech66 May 16, 2024
3d2a730
Burnside ring now inherits from CombinatorialFreeModule
Newtech66 May 16, 2024
d49eb76
Changed category of Burnside ring to Algebras(base_ring).Commutative(…
Newtech66 May 16, 2024
bf76e0d
Implemented monomial() and one_basis()
Newtech66 May 17, 2024
dc1d95d
Add rename_gen
Newtech66 May 17, 2024
c271e60
Add construct_from_action
Newtech66 May 17, 2024
1453c90
Add _from_dict
Newtech66 May 17, 2024
fa8b9f5
Add product_on_basis and monomial_coefficients
Newtech66 May 18, 2024
be11997
Remove ConjugacyClassesOfSubgroups from import
Newtech66 May 18, 2024
f39807c
Make indexes for generators use ConjugacyClassesOfSubgroups internall…
Newtech66 May 18, 2024
d4af3fc
Add __eq__ for ConjugacyClassOfSubgroups so we can use it as dict key
Newtech66 May 18, 2024
de3ccbc
Removed BurnsideRingElement and refactored code
Newtech66 May 19, 2024
d9e5aab
Add __getitem__, minor doctest fix
Newtech66 May 19, 2024
1a377f5
Add __eq__ and minor fix in _normalize and set_name
Newtech66 May 19, 2024
45361c3
Implemented all suggested changes
Newtech66 May 20, 2024
b8da0e6
Doctest additions
Newtech66 May 20, 2024
ac4bb20
Doctest updates
Newtech66 May 21, 2024
8ecf26d
Run doctest fixer
Newtech66 May 21, 2024
f617657
Small change
Newtech66 May 21, 2024
6ecbe83
Draft implementation of PolynomialMolecularDecomposition + other mino…
Newtech66 Jun 15, 2024
bd55d15
Added PolynomialMolecularDecomposition to imports
Newtech66 Jun 16, 2024
2ce14a5
Fixed __iter__ and added subset in ConjugacyClassesOfSymmetricGroupSu…
Newtech66 Jun 16, 2024
04ac9e9
Refactor conjugacy classes of subgroups of symmetric groups, add spec…
Newtech66 Jun 17, 2024
3ca8861
Reworked naming facility + other minor changes
Newtech66 Jun 18, 2024
6dd1b87
Add default_name for fallback if no name is present
Newtech66 Jun 18, 2024
77136a3
Minor correction
Newtech66 Jun 18, 2024
1e0a707
Remove _repr_ from ConjugacyClassOfSubgroups_SymmetricGroup
Newtech66 Jun 18, 2024
9ffc003
Reworked naming system again to use CombinatorialFreeModule's naming …
Newtech66 Jun 22, 2024
4207aab
Minor performance improvements
Newtech66 Jun 23, 2024
8c4b0e2
Major performance improvement in PolynomialMolecularDecomposition pro…
Newtech66 Jun 23, 2024
12a129b
Much faster implementation of Burnside ring product
Newtech66 Jun 26, 2024
053346c
Improvements and corrections
Newtech66 Jun 30, 2024
9149023
Doctest fixes
Newtech66 Jun 30, 2024
9438800
Add most doctests
Newtech66 Jul 6, 2024
afbdd9c
Doctest fixes
Newtech66 Jul 13, 2024
bd59d1e
Doctest fix
Newtech66 Jul 16, 2024
a08c4a4
Rewrite of species decompositions
Newtech66 Jul 21, 2024
2900263
Doctests
Newtech66 Jul 21, 2024
1e8ce44
Add construct_from_action to PolynomialMolecularDecomposition
Newtech66 Jul 22, 2024
125103d
Rewrite
Newtech66 Jul 24, 2024
f6690bd
Minor fixes
Newtech66 Jul 24, 2024
6604d28
More fixes
Newtech66 Jul 24, 2024
ad7d13f
Add degree_on_basis
Newtech66 Jul 25, 2024
36e6c02
more fixes
Newtech66 Jul 25, 2024
5010e3f
Merge branch 'develop' into burnside_ring
Newtech66 Jul 25, 2024
6396163
Split species into new PR
Newtech66 Jul 29, 2024
ff1f3f3
grab changes from other PR
Newtech66 Jul 29, 2024
5eacfb0
Removed dependency on burnside.py (for the time being)
Newtech66 Jul 31, 2024
981ed0c
Rewrite
Newtech66 Jul 31, 2024
b1b028c
Normalization fixes
Newtech66 Jul 31, 2024
a0f1cc4
More fixes
Newtech66 Aug 1, 2024
b932b91
removed __eq__, added _repr_, and doctest fixes
Newtech66 Aug 1, 2024
a540531
remove Set, add shortcut element init for AtomicSpecies and Polynomia…
Newtech66 Aug 1, 2024
8b50890
doctest fixes
Newtech66 Aug 1, 2024
1ad7c46
improvements (mantepse)
Newtech66 Aug 2, 2024
3b0f03d
Add __call__ for partitional composition
Newtech66 Aug 3, 2024
6c7156e
Highly experimental commit aimed at improving performance, needs a lo…
Newtech66 Aug 5, 2024
22b3980
Refactoring and bug fixes
Newtech66 Aug 5, 2024
6a5af17
Composition works, if there are no coefficients
Newtech66 Aug 7, 2024
8dabfd6
Added cartesian product
Newtech66 Aug 7, 2024
3cec6b5
Added addition formula decomposition
Newtech66 Aug 8, 2024
776bd64
Added multiplicity handling
Newtech66 Aug 9, 2024
268b2c4
Fixed dompart, caching and construction errors, and equality checking…
Newtech66 Aug 14, 2024
a64700d
revert changes to permgroup.py
Newtech66 Aug 14, 2024
5ce6e11
Canonicalization fixes, doctest additions
Newtech66 Aug 17, 2024
a081b60
More doctests
Newtech66 Aug 17, 2024
16099c4
Remove current composition and cartesian product framework
Newtech66 Aug 17, 2024
b7f7beb
Add inner_sum
Newtech66 Aug 19, 2024
142c09a
Doctest fixes
Newtech66 Aug 19, 2024
19231be
Move things around and minor fixes
Newtech66 Aug 19, 2024
fd146bc
Add renaming patch (thanks mantepse)
Newtech66 Aug 19, 2024
284251b
Add substitution, element_constructor for molecular species
Newtech66 Aug 20, 2024
acc44f8
Add cartesian_product and doctests
Newtech66 Aug 21, 2024
2aa9cd0
Minor changes
Newtech66 Aug 21, 2024
3b6061e
Minor changes+partial naming changes
Newtech66 Aug 21, 2024
4c54733
New renaming (thanks mantepse) + construct from group action (wip)
Newtech66 Aug 21, 2024
f8e8bb2
Construct from group action (complete, added to MolecularSpecies and …
Newtech66 Aug 21, 2024
238eae1
Edits to error checking and messages
Newtech66 Aug 22, 2024
7a38ab7
More minor changes
Newtech66 Aug 22, 2024
f1e10fc
Added functorial composition for univariate molecular species
Newtech66 Aug 24, 2024
dd3fc7b
remove functorial_composition and change molecular species grading
Newtech66 Aug 25, 2024
700b925
Replace tuple with frozenset for dompart
Newtech66 Aug 25, 2024
0d07b86
fix doctests
Newtech66 Aug 25, 2024
35b1703
Add doctests
Newtech66 Aug 25, 2024
853b403
run doctest fixer
Newtech66 Aug 25, 2024
e7dcaef
some more doctests
Newtech66 Aug 26, 2024
046aa23
run doctest fixer
Newtech66 Aug 26, 2024
125771f
pycodestyle fix
Newtech66 Aug 26, 2024
2cedfcb
change AtomicSpeciesElement _repr_ and remove multicardinality check …
Newtech66 Aug 26, 2024
29bb7eb
Get rid of some calls to libgap ConjugateGroup without passing domain…
Newtech66 Aug 26, 2024
696f0e1
run doctest fixer
Newtech66 Aug 26, 2024
44a0b9b
Working composition (thanks mantepse)
Newtech66 Aug 26, 2024
c71a412
use Labelle's powersum species to compute compositions
mantepse Aug 27, 2024
56beab2
Only show dompart for arity >2
Newtech66 Aug 30, 2024
bf87e50
Rename _k to _arity globally
Newtech66 Aug 30, 2024
f9919ff
fix doctests
Newtech66 Aug 30, 2024
93b19bf
Fix in compose_with_singletons
Newtech66 Sep 9, 2024
5f89ce8
move test for conjugacy to PermutationGroup_generic
mantepse Sep 11, 2024
a705847
more doctests, fixes for LazySpecies
mantepse Sep 11, 2024
dada750
make MolecularSpecies accept names as argument, provide graded_compon…
mantepse Sep 11, 2024
772b79b
separate computation of group and domain partition of molecular species
mantepse Sep 12, 2024
7c1f219
remove _project and gen
mantepse Sep 13, 2024
1cf6894
fix bugs in _element_constructor_ when creating species from a group …
mantepse Sep 13, 2024
0c72461
make indexing of sorts 0-based, be more permissive with input of doma…
mantepse Sep 13, 2024
4e6419a
fix domain bug in group_and_partition, add cycle_index
mantepse Sep 23, 2024
d62beae
rename and simplify ElementCache by using hash
mantepse Sep 25, 2024
51326d2
remove debugging statement
mantepse Sep 25, 2024
0e0ae47
simpler and less buggy by using UniqueRepresentation
mantepse Sep 25, 2024
cc40a27
make homogeneous_degree work if the monomials are not comparable
mantepse Sep 26, 2024
8b7a096
beautify
mantepse Sep 26, 2024
383170c
update references, do not put AtomicSpecies and PolynomialSpecies int…
mantepse Sep 26, 2024
4189ceb
provide subset (to also get homogeneous_degree_basis) and change_ring
mantepse Sep 27, 2024
9ddb6b1
Merge branch 'develop' into simple-species
mantepse Sep 28, 2024
5252878
Merge branch 'develop' into simple-species
mantepse Sep 28, 2024
bd95f4d
enable user friendly P.<X> = PolynomialSpecies(R), without implementi…
mantepse Sep 29, 2024
a0382e7
Merge branch 'develop' into simple-species
mantepse Sep 29, 2024
b51a8b0
mark some doctests as random, run TestSuite also for element classes,…
mantepse Sep 29, 2024
a5484ce
partially fix bug
mantepse Oct 4, 2024
67b12b6
fix bug when specifying species via a group action
mantepse Oct 4, 2024
b5a2727
very minor docstring fixes
mantepse Oct 13, 2024
6ae42ad
Merge branch 'sagemath:develop' into simple-species
mantepse Oct 13, 2024
470fa71
add factorization of polynomial species
mantepse Oct 13, 2024
846690e
introduce comparisons and add subset and graded_component for atomic …
mantepse Oct 13, 2024
0e5c8f6
replace UniqueRepresentation of the Element classes with WithPickling…
mantepse Oct 15, 2024
c07f0b8
fix and doctest bug in group_and_partition
mantepse Oct 16, 2024
1362973
Apply suggestions from code review
mantepse Oct 21, 2024
8b88db8
adapt doctest, improve some docstrings
mantepse Oct 21, 2024
5e9cf42
test error cases of element constructors
mantepse Oct 21, 2024
650bd55
remove forgotten error in __contains__
mantepse Oct 21, 2024
8aea71d
restore accidentally deleted caching
mantepse Oct 22, 2024
9c673c2
Apply suggestions from code review
mantepse Oct 22, 2024
8b6ef90
test that we create every group only once
mantepse Oct 22, 2024
421623b
Merge branch 'simple-species' of https://github.com/Newtech66/sage-ne…
mantepse Oct 22, 2024
518a463
clarify output of group_and_partition
mantepse Oct 22, 2024
df0554a
fix some codecov reports
mantepse Oct 23, 2024
0577096
implement _richcmp_ instead of __le__ and friends
mantepse Oct 23, 2024
4104cc2
remove dead code discovered by codecov
mantepse Oct 24, 2024
0e84c39
test more errors and remove more dead code discovered by codecov
mantepse Oct 24, 2024
c22759a
remove ConjugacyClassOfDirectlyIndecomposableSubgroups and ConjugacyC…
mantepse Oct 26, 2024
c1f5285
allow to skip checks, make variable names more consistent, avoid unne…
mantepse Oct 26, 2024
070a08e
test sanity of parameters of _compose_with_weighted_singletons
mantepse Oct 26, 2024
96a5aa0
add doctest, remove dead code discovered by codecov
mantepse Oct 26, 2024
7721794
rename group_and_partition to permutation_group
mantepse Oct 26, 2024
0c49f2b
add example and test for _compose_with_weighted_singletons for 100% c…
mantepse Oct 27, 2024
6755330
show construction of table of marks
mantepse Oct 27, 2024
905079c
remove hash by switching inheritance order, replace richcmp with lt a…
mantepse Oct 27, 2024
02c082b
Merge branch 'develop' into simple-species
kwankyu Oct 28, 2024
084ea13
fix a bug in creating multisort species given an action and fix INPUT…
mantepse Oct 29, 2024
f4c4723
minor optimization
mantepse Oct 29, 2024
dd58ae3
Apply suggestions from code review
mantepse Nov 4, 2024
8a15c61
remove unnecessary else spotted by tscrim
mantepse Nov 4, 2024
a305a74
implement _an_element_ instead of caching an_element as spotted by ts…
mantepse Nov 4, 2024
cb5ef7b
adapt doctest
mantepse Nov 4, 2024
cd7b5a9
do not use assert for input checking, spotted by tscrim
mantepse Nov 4, 2024
0bc0224
remove superfluous __init__ as spotted by tscrim
mantepse Nov 4, 2024
580a5c2
sort cover relations as str
mantepse Nov 4, 2024
0ca9a5b
more replacements of parent == self to parent is self
mantepse Nov 4, 2024
4598eda
make MolecularSpecies.__classcall__ sane
mantepse Nov 7, 2024
ade63cc
improve documentation
mantepse Nov 7, 2024
727d4d2
Update src/sage/rings/species.py
mantepse Nov 8, 2024
ff604c8
Update src/sage/rings/species.py
mantepse Nov 8, 2024
8d7ab18
Apply suggestions from code review
mantepse Nov 8, 2024
622d08e
docfixes
mantepse Nov 8, 2024
9ef4cdb
avoid recursion in _element_constructor_
mantepse Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading