Opened 6 years ago

Closed 6 years ago

#11546 closed enhancement (fixed)

Implementation of energy function for crystals

Reported by: aschilling Owned by: sage-combinat
Priority: major Milestone: sage-4.7.2
Component: combinatorics Keywords: energy, crystals
Cc: sage-combinat Merged in: sage-4.7.2.alpha1
Authors: Anne Schilling Reviewers: Tom Denton
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #11183 Stopgaps:

Description (last modified by jdemeyer)

This patch implements the energy function and affine grading for affine crystals and adds an entry in the corresponding thematic tutorial. It also adds functions to obtain the level and test perfectness for Kirillov-Reshetikhin crystals.

In addition, it removes the condition that for the Lusztig involution the element is supposed to live in a crystal with a single highest weight element, and modifies the methods to_highest_weight and to_lowest_weight in crystal.py to make them more robust.

The update to the thematic tutorial can be built using

sage -docbuild thematic_tutorials html

is available here:

http://www.math.ucdavis.edu/~anne/sage/lie/affine_crystals.html

Apply: trac_11546-crystals_energy-as.patch

Attachments (1)

trac_11546-crystals_energy-as.patch (17.6 KB) - added by aschilling 6 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by aschilling

  • Description modified (diff)
  • Status changed from new to needs_review

comment:2 Changed 6 years ago by aschilling

Ready for review!

comment:3 Changed 6 years ago by aschilling

  • Description modified (diff)

comment:4 follow-up: Changed 6 years ago by sdenton

  • Status changed from needs_review to needs_info

1) Funny problem with the classical crystal command, unrelated to patch? K.classical_decomposition seems to work fine, though.

    sage: K = KirillovReshetikhinCrystal(['A',2,1],2,1) 
    sage: Kc=K.classical_crystal()
    sage: Kc
    ERROR: An unexpected error occurred while tokenizing input
    The following traceback may be corrupted or invalid
    The error message is: ('EOF in multi-line statement', (396, 0))

    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    ....
    AttributeError: 'int' object has no attribute 'value'

2) small request... Could there be a 'level' function on KR crystals? It looks like this would be as easy as wrapping the assertion in the energy function in a separate function, and would give a natural response to the user when the 'All crystals in the tensor product need to be perfect of the same level' assertion error comes up.

3) The 'list' option removed from the 'to_highest_weight' functions looks like it was a bit of extraneous code, so this is good! I'm a little concerned though, because the old way returned:

        return self.to_highest_weight(list = list + [i], index_set = index_set)

While the new returns:

        hw = self.to_highest_weight(index_set = index_set) 
        return [hw[0], [i] + hw[1]]

It looks like the new 'i' is being added to opposite ends of the list in these two cases; is this consistent one way or the other across the code-base?

This reminds me of a functionality extension I had thought would be nice at one point, namely being able to feed a list to the 'e' and 'f' functions instead of just a single letter. It would both extend the functionality a bit and establish a convention for which way this 'list' should be applied!

comment:5 in reply to: ↑ 4 Changed 6 years ago by aschilling

  • Status changed from needs_info to needs_review

Hi Tom,

Thank you for looking at the patch!

Replying to sdenton:

1) Funny problem with the classical crystal command, unrelated to patch? K.classical_decomposition seems to work fine, though.

    sage: K = KirillovReshetikhinCrystal(['A',2,1],2,1) 
    sage: Kc=K.classical_crystal()
    sage: Kc
    ERROR: An unexpected error occurred while tokenizing input
    The following traceback may be corrupted or invalid
    The error message is: ('EOF in multi-line statement', (396, 0))

    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    ....
    AttributeError: 'int' object has no attribute 'value'

classical_crystal is an attribute, not a method, so the correct way of using it is

    sage: K = KirillovReshetikhinCrystal(['A',2,1],2,1)
    sage: Kc = K.classical_crystal
    sage: Kc
    The crystal of tableaux of type ['A', 2] and shape(s) [[1, 1]]

2) small request... Could there be a 'level' function on KR crystals? It looks like this would be as easy as wrapping the assertion in the energy function in a separate function, and would give a natural response to the user when the 'All crystals in the tensor product need to be perfect of the same level' assertion error comes up.

The notion of level really only exists for perfect crystals. However, the method affine_grading also works in the non-perfect setting. Note that in the assert there is no ceiling for the quotient!

3) The 'list' option removed from the 'to_highest_weight' functions looks like it was a bit of extraneous code, so this is good! I'm a little concerned though, because the old way returned:

        return self.to_highest_weight(list = list + [i], index_set = index_set)

While the new returns:

        hw = self.to_highest_weight(index_set = index_set) 
        return [hw[0], [i] + hw[1]]

Doing it this way gives the same output as before! I did not change any of the tests and they still pass.

It looks like the new 'i' is being added to opposite ends of the list in these two cases; is this consistent one way or the other across the code-base?

This reminds me of a functionality extension I had thought would be nice at one point, namely being able to feed a list to the 'e' and 'f' functions instead of just a single letter. It would both extend the functionality a bit and establish a convention for which way this 'list' should be applied!

This already exists and is used as follows:

    sage: K = KirillovReshetikhinCrystal(['A',2,1],1,1)
    sage: t = K(rows=[[1]])
    sage: t.f_string([1,2])
    [[3]]

comment:6 follow-up: Changed 6 years ago by aschilling

  • Description modified (diff)

comment:7 in reply to: ↑ 6 Changed 6 years ago by aschilling

  • Reviewers set to Tom Denton

Hi Tom,

Methods level and is_perfect have been added to the Kirillov-Reshetikhin crystal code. Is everything ok now?

Thanks,

Anne

comment:8 follow-up: Changed 6 years ago by sdenton

  • Status changed from needs_review to positive_review

great! Thanks for taking the time to address my questions.

Best, -tom

comment:9 in reply to: ↑ 8 Changed 6 years ago by aschilling

Replying to sdenton:

great! Thanks for taking the time to address my questions.

Best, -tom

Hi Tom,

Thanks for the careful review!

Anne

comment:10 Changed 6 years ago by jdemeyer

  • Dependencies set to #11183
  • Description modified (diff)

comment:11 follow-up: Changed 6 years ago by jdemeyer

  • Status changed from positive_review to needs_work
  • Work issues set to documentation

There are multiple problems with the documentation:

dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/categories/examples/crystals.rst:69: WARNING: more than one target found for cross-reference u'cartan_type': sage.combinat.crystals.tensor_product.CrystalOfTableaux.cartan_type, sage.combinat.root_system.dynkin_diagram.DynkinDiagram_class.cartan_type, sage.combinat.root_system.weyl_characters.WeightRing.cartan_type, sage.combinat.root_system.weyl_characters.WeylCharacterRing.cartan_type, sage.combinat.root_system.weyl_group.WeylGroup_gens.cartan_type, sage.combinat.root_system.root_system.RootSystem.cartan_type, sage.algebras.iwahori_hecke_algebra.IwahoriHeckeAlgebraT.cartan_type, sage.categories.crystals.Crystals.ParentMethods.cartan_type, sage.combinat.root_system.weyl_group.ClassicalWeylSubgroup.cartan_type, sage.combinat.root_system.weyl_characters.WeylCharacterRing.Element.cartan_type, sage.combinat.root_system.weyl_characters.WeightRing.Element.cartan_type, sage.categories.crystals.Crystals.ElementMethods.cartan_type
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/categories/examples/crystals.rst:73: WARNING: more than one target found for cross-reference u'Element.weight': sage.combinat.crystals.direct_sum.DirectSumOfCrystals.Element.weight, sage.combinat.crystals.fast_crystals.FastCrystal.Element.weight
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst:: WARNING: citation not found: FOS2010
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst:: WARNING: citation not found: FOS2010
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst:: WARNING: citation not found: SchillingTingley2011
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst:: WARNING: citation not found: SchillingTingley2011

comment:12 in reply to: ↑ 11 Changed 6 years ago by aschilling

Hi!

The problems regarding the references should be fixed in the revised patch.

Best regards,

Anne

comment:13 Changed 6 years ago by aschilling

  • Status changed from needs_work to positive_review

comment:14 follow-up: Changed 6 years ago by jdemeyer

  • Status changed from positive_review to needs_work

Unfortunately, for me the problem is still not fixed:

dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/local/lib/python2.6/site-packages/sage/combinat/crystals/kirillov_reshetikhin.py:docstring of sage.combinat.crystals.kirillov_reshetikhin.KirillovReshetikhinGenericCrystal.level:9: (WARNING/2) Duplicate explicit target name: "fos2010".
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst:9: WARNING: duplicate citation FOS2010, other instance in /mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/local/lib/python2.6/site-packages/sage/combinat/crystals/tensor_product.py:docstring of sage.combinat.crystals.tensor_product.TensorProductOfCrystalsElement.energy_function:15: (WARNING/2) Duplicate explicit target name: "schillingtingley2011".
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst:15: WARNING: duplicate citation SchillingTingley2011, other instance in /mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst

Changed 6 years ago by aschilling

comment:15 in reply to: ↑ 14 Changed 6 years ago by aschilling

  • Status changed from needs_work to positive_review

Replying to jdemeyer:

Unfortunately, for me the problem is still not fixed:

dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/local/lib/python2.6/site-packages/sage/combinat/crystals/kirillov_reshetikhin.py:docstring of sage.combinat.crystals.kirillov_reshetikhin.KirillovReshetikhinGenericCrystal.level:9: (WARNING/2) Duplicate explicit target name: "fos2010".
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst:9: WARNING: duplicate citation FOS2010, other instance in /mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/kirillov_reshetikhin.rst
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/local/lib/python2.6/site-packages/sage/combinat/crystals/tensor_product.py:docstring of sage.combinat.crystals.tensor_product.TensorProductOfCrystalsElement.energy_function:15: (WARNING/2) Duplicate explicit target name: "schillingtingley2011".
dochtml.log:/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst:15: WARNING: duplicate citation SchillingTingley2011, other instance in /mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha1/devel/sage/doc/en/reference/sage/combinat/crystals/tensor_product.rst

Unfortunately, I cannot reproduce the problem, but I hope it is fixed with the revised patch (where I took out multiple entries of the same reference in the same file).

Best wishes,

Anne

comment:16 Changed 6 years ago by jdemeyer

  • Merged in set to sage-4.7.2.alpha1
  • Resolution set to fixed
  • Status changed from positive_review to closed
  • Work issues documentation deleted

It works now, thanks!

Note: See TracTickets for help on using tickets.