-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
TransitiveIdeal -> RecursivelyEnumeratedSet in the sage library #16352
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: |
Branch: u/slabbe/16352 |
New commits:
|
Changed keywords from none to sd66 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:9
Salut Sébastien, Your branch is based on sage-6.5!! Would you mind rebasing on sage-6.6.rc2? Your iterator for infinite conjugacy classes is wrong
I think that adding also inverses of generators would work. I.e. just replace Best, |
comment:11
I used Needs review again! |
comment:12
Shouldn't you remove the second |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Sébastien Labbé |
Reviewer: Vincent Delecroix |
comment:20
I think that it is necessary to keep the "graded" keyword whenever So I propose to try putting "graded" wherever it already was, and see what happens. |
comment:21
Ok, I agree, let's have this discussion. I first tried to replace every occurences of The reason is that if a structure is graded, the enumeration currently done in I won't have access to my machine until Tuesday for redoing those tests and tell you exactly where were the infinite loops happening... Meanwhile, I would like to know for each occurences of A) There were three files where File class Crystals(Category_singleton):
class ParentMethods:
def __iter__(self, index_set=None, max_depth=float('inf')):
from sage.combinat.backtrack import TransitiveIdealGraded
from sage.combinat.backtrack import TransitiveIdeal
# was using both ???
def subcrystal(self, index_set=None, generators=None, max_depth=float("inf"),
from sage.combinat.backtrack import TransitiveIdealGraded File class HighestWeightCrystals(Category_singleton):
class ParentMethods:
def __iter__(self, index_set=None, max_depth = float("inf")):
from sage.combinat.backtrack import TransitiveIdealGraded File from sage.combinat.backtrack import TransitiveIdeal, TransitiveIdealGraded
class RootLatticeRealizations(Category_over_base_ring):
class ParentMethods:
@cached_method
def positive_roots(self, index_set=None):
return TransitiveIdealGraded(attrcall('pred', index_set=index_set),
[self.simple_root(i) for i in index_set])
def positive_real_roots(self):
if self.cartan_type().is_finite():
return tuple(TransitiveIdealGraded(attrcall('pred'), self.simple_roots()))
@cached_method
def positive_roots_parabolic(self, index_set = None):
return TransitiveIdealGraded(parabolic_covers, generators)
class ElementMethods:
def orbit(self):
return [x for x in TransitiveIdealGraded(attrcall('simple_reflections'), [self])]
def greater(self):
return [x for x in TransitiveIdeal(attrcall('succ'), [self])]
def smaller(self):
return [x for x in TransitiveIdeal(attrcall('pred'), [self])] B) For reference, below are the files where only File class ConjugacyClass(Parent):
@cached_method
def set(self):
from sage.combinat.backtrack import TransitiveIdeal File class KirillovReshetikhinTableaux(CrystalOfWords):
def __iter__(self):
from sage.combinat.backtrack import TransitiveIdeal File class RiggedConfigurations(Parent, UniqueRepresentation):
def __iter__(self):
from sage.combinat.backtrack import TransitiveIdeal File class TensorProductOfKirillovReshetikhinTableaux(FullTensorProductOfRegularCrystals):
def __iter__(self):
from sage.combinat.backtrack import TransitiveIdeal File from sage.combinat.backtrack import TransitiveIdeal
class PieriFactors(UniqueRepresentation, Parent):
@cached_method
def elements(self):
return TransitiveIdeal(attrcall('bruhat_lower_covers'), self.maximal_elements()) |
comment:22
I would say that crystal things are usually graded, but it would be better if crystal people can opt in and say their word about the matter. Travis ? Anne ? |
Changed branch from u/slabbe/16352 to public/ticket/16352 |
comment:23
I have tried putting 'graded' in src/sage/categories/highest_weight_crystals.py I have tried putting 'graded' in src/sage/combinat/root_system/root_lattice_realizations.py and it worked fine. I tested the src/sage/combinat/root_system folder. Seems to be quicker by the way. Let us see if the bot founds a problem with these two changes. New commits:
|
comment:24
ok, no problem so far, the bot is happy. There remains only the case of src/sage/categories/crystals.py Anne, Travis ? What about affine crystals for example ? can we used "graded" ? |
comment:25
I can now confirm that the each of the two remaining instances runs into infinite loops Therefore this ticket is good to go. If you agree, set this to positive review. |
comment:26
Replying to @fchapoton:
Affine crystals are not necessarily graded. They can be cyclic. |
comment:27
Thanks ! And are we safe with using 'graded' for highest weight crystals, as it seems ? By the way, Anne, have you seen my Fulbright call on sage-combinat-devel ? |
comment:28
Replying to @fchapoton:
Yes.
I am not sure. For postdocs with a permanent position? |
comment:29
Yes, hum. I am afraid that it is like looking for an element in the empty set. But maybe you could have somebody in mind.. Young, with a position, willing to spend time in Lyon, likes algebraic combinatorics. Not so easy to find, indeed. |
comment:30
There was four occurences of |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
It seems to be ok for two of them, but not for the third one, which is an orbit. But, damn, tests for this file are so long ... |
comment:33
It seems that tests take slightly longer in |
comment:35
Replying to @fchapoton:
Okay, I will take a look at this. |
comment:36
Replying to @fchapoton:
Running
Running the same command three times on the same file with this branch, I get:
So I can't confirm that tests take any longer with this ticket. Needs review! |
Changed reviewer from Vincent Delecroix to Vincent Delecroix, Frédéric Chapoton |
comment:37
ok, avanti ! |
Changed branch from public/ticket/16352 to |
TransitiveIdeal
andTransitiveIealGraded
are used in the code ofsage/combinat
,sage/categories
andsage/groups
at least. These should be replaced byRecursivelyEnumeratedSet
for speed improvements and also to avoid issues explained in #6637.This is a follow up of #6637 where
TransitiveIdeal
andTransitiveIealGraded
have been deprecated.More precisely, occurences of
TransitiveIdeal(succ, seeds)
TransitiveIdealGraded(succ, seeds, max_depth)
are replaced (respectively) by:
RecursivelyEnumeratedSet(seeds, succ, structure=None, enumeration='naive')
RecursivelyEnumeratedSet(seeds, succ, structure=None, enumeration='breadth', max_depth=max_depth)
Indeed, deprecated
TransitiveIdealGraded
class was not using the hypothesis of being graded in its code. This is why the structure is set toNone
for now. Of course, if people have really a graded structure, then the structure argument should be set to'graded'
... For now, I am keeping the behavior like it was before and I am assuming the structure is not graded.CC: @anneschilling @tscrim
Component: combinatorics
Keywords: sd66
Author: Sébastien Labbé
Branch/Commit:
0beb042
Reviewer: Vincent Delecroix, Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/16352
The text was updated successfully, but these errors were encountered: