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

Categories for Weyl character rings and weight rings (was: pickling fails in WeightRing) #7922

Closed
nthiery opened this issue Jan 13, 2010 · 39 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Jan 13, 2010

This ticket refactors the code of WeylCharacterRing and WeightRing to use categories and (combinatorial) free modules. Along the way, it adds a couple features (Dan: please list them here), and solves a pickling issue which was caught by #7921:

sage: A2 = WeylCharacterRing(['A',2])
sage: a2 = WeightRing(A2)
sage: TestSuite(a2).run()
Failure in _test_element_pickling:
Traceback (most recent call last):
...
AssertionError: 2*a2(0,0,0) != 2*a2(0,0,0)

Indeed:

sage: x = a2.an_element()
sage: x == loads(dumps(x))
False

Apply attachment: trac_7922-rebased-4.7.alpha3.patch

Remove the following pickles from the pickle jar:

_class__sage_combinat_root_system_weyl_characters_WeightRing__.*
_class__sage_combinat_root_system_weyl_characters_WeylCharacterRing_class__.*
_class__sage_combinat_root_system_weyl_characters_WeylCharacter__.*

Copy the contents of
attachment: trac_7922-new_pickles.tar.gz into data/ext_code/pickle_jar.

CC: @dwbump @sagetrac-sage-combinat

Component: combinatorics

Author: Daniel Bump, Nicolas M. Thiéry

Reviewer: Nicolas M. Thiéry, Dan Bump

Merged: sage-4.7.1.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/7922

@dwbump

This comment has been minimized.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Sep 5, 2010

comment:1

Regarding speed, testing a large number of branching rules show that the patch is a substantial speedup over the old code with a caveat: the old code has an option cache=true for WeylCharacterRings. If this option (which is not the default) is selected for every WeylCharacterRing, then the old code is faster. Typical times:

Old Code 48 seconds
New Code 25 seconds
Old Code, cache=true 18 seconds

Since I made the method _irr_weights a cached method, the caching done in the new code is approximately equivalent to the caching in the old code, so at the moment I don't see any way to improve the situation.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Sep 5, 2010

Reviewer: nthiery

@dwbump dwbump mannequin added this to the sage-4.6 milestone Sep 5, 2010
@dwbump dwbump mannequin added the s: needs review label Sep 5, 2010
@dwbump
Copy link
Mannequin

dwbump mannequin commented Sep 6, 2010

comment:2

Revised and reposted the patch in view of Nicolas' comment to use _from_dict(coerce=True).

@dwbump
Copy link
Mannequin

dwbump mannequin commented Sep 11, 2010

Converts WeylCharacterRings and WeightRings to use category framework

@dwbump
Copy link
Mannequin

dwbump mannequin commented Sep 11, 2010

comment:3

Attachment: trac_7922.patch.gz

I uploaded a revised version of the patch. The only change is in classical_crystals.py, where the revision of WeylCharacterRings necessitated a revision.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Oct 29, 2010

comment:4

Requires rebuilding the pickle jar.

@dwbump dwbump mannequin modified the milestones: sage-4.6, sage-4.6.1 Oct 29, 2010
@dwbump
Copy link
Mannequin

dwbump mannequin commented Nov 15, 2010

Attachment: trac_7922-rebased-4.6.1.gz

#7922: WeylCharacters inherit from CombinatorialFreemodule (substantial speedup)

@dwbump
Copy link
Mannequin

dwbump mannequin commented Nov 15, 2010

comment:5

Since #9838 was merged in sage-4.6.1.alpha1, this patch needed rebasing.

I therefore posted trac_7922-rebased-4.6.1.

@dwbump dwbump mannequin modified the milestones: sage-4.6.1, sage-4.6.2 Dec 22, 2010
@dwbump
Copy link
Mannequin

dwbump mannequin commented Feb 8, 2011

7922: thematic tutorial revision

@dwbump
Copy link
Mannequin

dwbump mannequin commented Feb 8, 2011

Work Issues: pickle jar will have to be rebuilt

@dwbump

This comment has been minimized.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Feb 8, 2011

comment:7

Attachment: trac_7922-doc.patch.gz

This patch slightly conflicts with #8442 which was merged. So I'm posting a second patch trac_7922-doc.patch which revises the thematic tutorial.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 18, 2011

Attachment: trac_7922-rebased-4.7.alpha1.patch.gz

#7922: Revision of Weyl Character Rings

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 18, 2011

comment:8

I have posted trac_7922-rebased-4.7.alpha1.patch, which
addresses many of the comments in the reviewer patch:

http://combinat.sagemath.org/patches/file/tip/trac_7922-review-nt.patch

Those changes that are not addressed are discussed here:

http://groups.google.com/group/sage-combinat-devel/browse_thread/thread/277e146862632d72

@dwbump

This comment has been minimized.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 18, 2011

#7922: revised pickle jar

@dwbump

This comment has been minimized.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 18, 2011

comment:9

Attachment: pickle_jar.tar.bz2.gz

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 18, 2011

Changed work issues from pickle jar will have to be rebuilt to none

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 24, 2011

#7922: revision of Weyl Character Rings

@dwbump
Copy link
Mannequin

dwbump mannequin commented Mar 25, 2011

Attachment: trac_7922-rebased-4.7.alpha2.patch.gz

#7922: replacement pickles

@nthiery
Copy link
Contributor Author

nthiery commented Apr 5, 2011

comment:13

Attachment: trac_7922-new_pickles.tar.gz

Hi Dan,

I just did a final proofreading, fixed a couple typos, updated coerce_to_sl in the doctests of the thematic tutorials, and removed some trailing white space and tabs.

For me it is now all good to go. Please check my reviewer's patch on the sage-combinat patch server. If it's ok with you, you can fold/upload and set a positive review here on my behalf.

http://combinat.sagemath.org/patches/file/tip/trac_7922-final-review-nt.patch

Cheers,
Nicolas

@nthiery
Copy link
Contributor Author

nthiery commented Apr 5, 2011

Changed reviewer from nthiery to Nicolas M. Thiéry, Dan Bump

@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor Author

nthiery commented Apr 5, 2011

Author: Dan Bump, Nicolas M. Thiéry

@nthiery nthiery changed the title Pickling fails in WeightRing Categories for Weyl character rings and weight rings (was: pickling fails in WeightRing) Apr 5, 2011
@dwbump

This comment has been minimized.

@dwbump
Copy link
Mannequin

dwbump mannequin commented Apr 6, 2011

#7922: Categories for Weyl character rings and weight rings

@nthiery

This comment has been minimized.

@nthiery
Copy link
Contributor Author

nthiery commented Apr 7, 2011

comment:15

Attachment: trac_7922-rebased-4.7.alpha3.patch.gz

Hi Dan,

I just checked out your final changes on the Sage-Combinat queue (trac_7922_alpha3-changes.patch), and it looks all good. So the final rebased patch you just posted (and which includes the above) is good to go.

Positive review!

@jdemeyer
Copy link

Merged: sage-4.7.1.alpha2

@jdemeyer
Copy link

comment:18

This needs a few small fixes:

  1. at various places doc/en/thematic_tutorials/lie/weyl_character_ring.rst, the indentation is inconsistent. It should be 4 spaces but in the newly added examples it is more or less random.
  2. in doc/en/thematic_tutorials/lie/weyl_character_ring.rst, the test on line 250 takes a very long time but is not marked as such.

Please add an additional patch fixing these issues.

@jdemeyer jdemeyer reopened this Jun 22, 2011
@jdemeyer jdemeyer closed this as completed Jun 3, 2013
@jdemeyer jdemeyer modified the milestones: sage-5.10, sage-4.7.1 Jun 3, 2013
@nthiery
Copy link
Contributor Author

nthiery commented Jun 3, 2013

comment:20

Replying to @jdemeyer:

This needs a few small fixes:

  1. at various places doc/en/thematic_tutorials/lie/weyl_character_ring.rst, the indentation is inconsistent. It should be 4 spaces but in the newly added examples it is more or less random.
  2. in doc/en/thematic_tutorials/lie/weyl_character_ring.rst, the test on line 250 takes a very long time but is not marked as such.

Please add an additional patch fixing these issues.

Fixing the indentation is now #14678. The very long time is not necessary anymore, most likely thanks to the optimizations in #13391 (the example takes 0.22s on my machine).

@fchapoton
Copy link
Contributor

Changed author from Dan Bump, Nicolas M. Thiéry to Daniel Bump, Nicolas M. Thiéry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants