ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 14 Feb 2011 04:41:28 -0600Dictating the roots to RootSystemhttp://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/Is there a way to dictate the choice of roots/simple roots to the RootSystem command?Sun, 13 Feb 2011 11:32:19 -0600http://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/Answer by Mike Hansen for <p>Is there a way to dictate the choice of roots/simple roots to the RootSystem command?</p>
http://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/?answer=12101#post-id-12101Currently, 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.Sun, 13 Feb 2011 12:48:35 -0600http://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/?answer=12101#post-id-12101Answer by benjaminfjones for <p>Is there a way to dictate the choice of roots/simple roots to the RootSystem command?</p>
http://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/?answer=12102#post-id-12102Depending on what you want to do, you can use the theorem which says that the Weyl group acts simply transitively on the set of choices of simple roots (or positive root systems, or Weyl chambers..) in order to translate back and forth between the choice that is attached to RootSystem( .. ) by default and any other choice:
sage: R=RootSystem(['A',Integer(2)])
sage: space=R.ambient_space()
sage: space.simple_roots()
Finite family {1: (1, -1, 0), 2: (0, 1, -1)}
sage: W = space.weyl_group()
sage: w0 = W.long_element()
sage: minus_sr = [ w0.action(s) for s in space.simple_roots() ]; minus_sr
[(0, -1, 1), (-1, 1, 0)]Mon, 14 Feb 2011 04:41:28 -0600http://ask.sagemath.org/question/7928/dictating-the-roots-to-rootsystem/?answer=12102#post-id-12102