On Sun, Jan 31, 2010 at 10:28:11PM -0800, Anne Schilling wrote:
> I have implemented the direct sum of crystals in the patch 
> crystal-hw-as.patch.
> 
> The good news is that in the case when there are no multiplicities in the B_i,
> one can use the options keepkey = False, facade = True
> and then I did not even need to implement the crystal operators e and f since 
> the
> elements in DisjointUnionEnumeratedSets are still interpreted as crystal 
> elements.
> In the other case, one can set keepkey = True, facade = False.

Excellent :-)

Just one thing though: with facade = True, the elements of the crystal
won't know that their parent is the direct sum crystal. This may, or
may not, be a problem in practice. It's a good occasion to gain
experience on this.

> Could you please have a look whether the code makes sense before I upgrade
> HighestWeightCrystals
> 
> What is the difference between
> 
> DirectSumOfCrystals.Element
> DirectSumOfCrystals.element_class

The later (used to construct elements) is built from the former
(implemented in the sources) by adding the super classes inherited
from the categories:

    sage:         sage: U1 = DisjointUnionEnumeratedSets((
            ...         FiniteEnumeratedSet([1,2,3]),
            ...         FiniteEnumeratedSet([4,5,6])))
    sage: U1
    Disjoint union of Family ({1, 2, 3}, {4, 5, 6})
    sage: U1.Element.mro()
    [<class 
'sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets.Element'>,
     <class 'sage.structure.element_wrapper.ElementWrapper'>,
     <type 'sage.structure.element.Element'>,
     <type 'sage.structure.sage_object.SageObject'>,
     <type 'object'>]
    sage: U1.element_class.mro()
    [<class 
'sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets_with_category.element_class'>,
     <class 
'sage.sets.disjoint_union_enumerated_sets.DisjointUnionEnumeratedSets.Element'>,
     <class 'sage.structure.element_wrapper.ElementWrapper'>,
     <type 'sage.structure.element.Element'>,
     <type 'sage.structure.sage_object.SageObject'>,
     <class 'sage.categories.category.FiniteEnumeratedSets.element_class'>,
     <class 'sage.categories.enumerated_sets.EnumeratedSets.element_class'>,
     <class 'sage.categories.sets_cat.Sets.element_class'>,
     <class 'sage.categories.objects.Objects.element_class'>,
     <type 'object'>]

See Category? for details. Note: cls.mro() gives you the method
resolution order i.e. the list of all super classes of cls.

> I now use the same options that Florent used in DisjointUnionEnumeratedSets.

Ok! You may want to put different default values depending on whether
the weights are equal or not.

> >Please have a look at TestSuite?, and let me know if it could use
> >improvements. In short, you just have to throw a ``_test_whatever``
> >method anywhere in your class hierarchy (typically in Crystal). For an
> >example of such method, see:
> >
> >     sage: S = Semigroups().example()
> >     sage: S._test_associativity??
> 
> I added _test_fast_iter_ in combinat/crystals/crystals.py but now get
> a few test failures in spins.py, affine.py, ... . I suppose one needs
> to check whether the crystal if of classical Cartan type? But this was not
> checked before in check().

You probably want to move this method down to ClassicalCrystal, since
it tests the iterator implemented there (and put the two close
together). This will do for the affine crystals; for spins crystals I
don't know. Do those implement their own iterator or list method?

Cheers,                         Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-de...@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to