Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Currently, there isn't an easy way to specify the choice of simple roots.

If you really want to work with a different set of roots, here's the best way to do it. For the sake of this example, we'll pretend we're working in type A.

1) Create a class MyAmbientSpace which subclasses sage.combinat.root_system.ambient_space.AmbientSpace. The main method you'll need to implement is simple_root(i) which returns the simple root associated with i in the index set. You'll also need implement methods like smallest_base_ring and dimension. See sage.combinat.root_system.type_A for an example.

from sage.combinat.root_system.ambient_space import AmbientSpace
class MyAmbientSpace(AmbientSpace):
    def simple_root(self, i):
        ...
    ...

2) Create a class MyCartanType which is a subclass of the current Cartan type, and set its AmbientSpace attribute to your MyAmbientSpace class:

from sage.combinat.root_system.type_A import CartanType as CartanTypeA
class MyCartanType(CartanTypeA):
    AmbientSpace = MyAmbientSpace

3) Instantiate a root system based on your "new" CartanType:

my_a = MyCartanType(3)
R = RootSystem(my_a)

That root system should now use the simple roots you specified.