On Sat, Jan 22, 2011 at 06:28:58AM -0800, Anne Schilling wrote:
> Well, since there was no answer, I already implemented it the first way.

It's a quick change to switch from one version to the other anyway.

> See crystal-spin-as.patch in the sage-combinat queue.  One problem
> is that currently all shapes in `shapes` need to be of the same type
> for this to work, so one cannot mix nonspin shapes with spin shapes
> in the same list.  I do not currently need this for the applications
> I have in mind, but to have the code in most generality it would be
> good to upgrade it to such.

Ah. That's an important point!

There are two ways out. Either the crystal C with mixed shapes should
be implemented as a direct sum of crystals each of which having only
one type of shape. Or the crystal C should have elements in different
classes. Namely there should be two Element classes:

   CrystalOfTableauxGenericElement

   CrystalOfTableauxGenericElementWithSpin(CrystalOfTableauxGenericElement)

and the choice of the appropriate class should be done by the
module_generator method.

Note that few parents in Sage currently admit several element classes,
and there is no syntactic sugar yet to streamline the process. So this
will require to manually create a self.element_class_with_spin
deriving from CrystalOfTableauxGenericElementWithSpin, in parallel to
the standard self.element_class which derives from
CrystalOfTableauxGenericElement. See e.g. element_class_set_morphism
in sage.categories.modules_with_basis.

> Would this be resolved using ClasscalMetaclass?

No, ClasscalMetaclass is nothing but syntactic sugar to use the same
name (CrystalOfTableaux) for both the wrapper function and the class
itself.

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-devel@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