ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 02 Mar 2016 00:59:18 +0100An issue with Root systems in sagehttps://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/Here is a problem that I cannot seem to understand.
<pre><code>
R=RootSystem(['A', 2])
F=R.ambient_space().fundamental_weights()
D=R.ambient_space().simple_roots()
</pre></code>
The output we get is as follows:
<pre><code>
F=Finite family {1: (1, 0, 0), 2: (1, 1, 0)}
D=Finite family {1: (1, -1, 0), 2: (0, 1, -1)}
</pre> </code>
The issue is the root lattice is contained in the weight lattice but clearly D[2] is not contained in the lattice generated by F. Perhaps I am missing something simple.
I need to write a program I would need the weyl group action on some weights and roots at the same time. How can this be done?
Thank you for your time in advance.
EDIT: Consider now the Weyl group action on weight lattice. We will continue using the notations above.
<pre><code>
W= R.ambient_space(). weyl_group()
S= W.gens()
s1, s2= S
s1.action(F[1])
</pre></code>
Gives an output
<pre> <code>
ValueError Traceback (most recent call last)
<ipython-input-12-4b0b8fd74264> in <module>()
---- 1 s1.action(F[Integer(1)])
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/combinat/root_system/weyl_group.pyc in action(self, v)
843 """
844 if v not in self.domain():
--> 845 raise ValueError("{} is not in the domain".format(v))
846 return self.domain().from_vector(self.__matrix*v.to_vector())
847
ValueError: Lambda[1] is not in the domain
</pre> </code>
The only way I have been able to make it work is that
<pre><code>
L = R. weight_lattice()
F=L.fundamental_weights()
f= L.to_ambient_space-morphism()
s1.action(f(F[1]))
(1,0,0)
</pre></code>
This is what I can get but the problem is
<code> s2* f(F[2]) = (0,0,1). </code>
So we are in a situation of the original problem again.
I need to calculate the Weyl group action on the fundamental weights. If there is a better way to do it I would like to know. Sun, 28 Feb 2016 04:45:10 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/Answer by FrédéricC for <p>Here is a problem that I cannot seem to understand.
</p><pre><code>
R=RootSystem(['A', 2])
F=R.ambient_space().fundamental_weights()
D=R.ambient_space().simple_roots()
</code></pre>
The output we get is as follows:
<pre><code>
F=Finite family {1: (1, 0, 0), 2: (1, 1, 0)}
D=Finite family {1: (1, -1, 0), 2: (0, 1, -1)}
</code></pre><code> </code>
The issue is the root lattice is contained in the weight lattice but clearly D[2] is not contained in the lattice generated by F. Perhaps I am missing something simple. <p></p>
<p>I need to write a program I would need the weyl group action on some weights and roots at the same time. How can this be done?
Thank you for your time in advance.</p>
<p>EDIT: Consider now the Weyl group action on weight lattice. We will continue using the notations above.
</p><pre><code>
W= R.ambient_space(). weyl_group()
S= W.gens()
s1, s2= S
s1.action(F[1])
</code></pre>
Gives an output
<pre> <code>
ValueError Traceback (most recent call last)
<ipython-input-12-4b0b8fd74264> in <module>()
---- 1 s1.action(F[Integer(1)])<p></p>
<p>/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/combinat/root_system/weyl_group.pyc in action(self, v)
843 """
844 if v not in self.domain():
--> 845 raise ValueError("{} is not in the domain".format(v))
846 return self.domain().from_vector(self.__matrix<em>v.to_vector())
847
ValueError: Lambda[1] is not in the domain
</em></p></code></pre><code><em> </em></code><em>
The only way I have been able to make it work is that
<pre><code>
L = R. weight_lattice()
F=L.fundamental_weights()
f= L.to_ambient_space-morphism()
s1.action(f(F[1]))
(1,0,0)
</code></pre>
This is what I can get but the problem is
<code> s2</code></em><code> f(F[2]) = (0,0,1). </code>
So we are in a situation of the original problem again.
I need to calculate the Weyl group action on the fundamental weights. If there is a better way to do it I would like to know. <p></p>
https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?answer=32684#post-id-32684Yes, this looks strange indeed. You can proceed like that instead:
sage: R = RootSystem(['A', 2])
sage: WL = R.weight_lattice()
sage: FW = R.weight_lattice().basis()
sage: SR = WL.simple_roots()
sage: FW
Finite family {1: Lambda[1], 2: Lambda[2]}
sage: SR
Finite family {1: 2*Lambda[1] - Lambda[2], 2: -Lambda[1] + 2*Lambda[2]}
EDIT: here is how to get the Weyl group acting on the weight lattice
sage: W = WL.weyl_group()
sage: s = W.gens()
sage: s[0].action(FW[1])
-Lambda[1] + Lambda[2]
EDIT: with the same notations
sage: v=s[0].action(SR[1])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[0].action(SR[2])
sage: v.to_ambient().is_positive_root()
True
sage: v=s[1].action(SR[2])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[1].action(SR[1])
sage: v.to_ambient().is_positive_root()
True
Sun, 28 Feb 2016 09:08:35 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?answer=32684#post-id-32684Comment by DBS for <p>Yes, this looks strange indeed. You can proceed like that instead:</p>
<pre><code>sage: R = RootSystem(['A', 2])
sage: WL = R.weight_lattice()
sage: FW = R.weight_lattice().basis()
sage: SR = WL.simple_roots()
sage: FW
Finite family {1: Lambda[1], 2: Lambda[2]}
sage: SR
Finite family {1: 2*Lambda[1] - Lambda[2], 2: -Lambda[1] + 2*Lambda[2]}
</code></pre>
<p>EDIT: here is how to get the Weyl group acting on the weight lattice</p>
<pre><code>sage: W = WL.weyl_group()
sage: s = W.gens()
sage: s[0].action(FW[1])
-Lambda[1] + Lambda[2]
</code></pre>
<p>EDIT: with the same notations</p>
<pre><code>sage: v=s[0].action(SR[1])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[0].action(SR[2])
sage: v.to_ambient().is_positive_root()
True
sage: v=s[1].action(SR[2])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[1].action(SR[1])
sage: v.to_ambient().is_positive_root()
True
</code></pre>
https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32686#post-id-32686Thank you for your answer. But there is a problem with this approach. I have edited the question accordingly!Sun, 28 Feb 2016 14:50:27 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32686#post-id-32686Comment by DBS for <p>Yes, this looks strange indeed. You can proceed like that instead:</p>
<pre><code>sage: R = RootSystem(['A', 2])
sage: WL = R.weight_lattice()
sage: FW = R.weight_lattice().basis()
sage: SR = WL.simple_roots()
sage: FW
Finite family {1: Lambda[1], 2: Lambda[2]}
sage: SR
Finite family {1: 2*Lambda[1] - Lambda[2], 2: -Lambda[1] + 2*Lambda[2]}
</code></pre>
<p>EDIT: here is how to get the Weyl group acting on the weight lattice</p>
<pre><code>sage: W = WL.weyl_group()
sage: s = W.gens()
sage: s[0].action(FW[1])
-Lambda[1] + Lambda[2]
</code></pre>
<p>EDIT: with the same notations</p>
<pre><code>sage: v=s[0].action(SR[1])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[0].action(SR[2])
sage: v.to_ambient().is_positive_root()
True
sage: v=s[1].action(SR[2])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[1].action(SR[1])
sage: v.to_ambient().is_positive_root()
True
</code></pre>
https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32687#post-id-32687This solves part of my problem. The other part is how can I simultaneously check id weyl group action on a simple root makes it positive or negative. The issue is if I redefine Weyl group in term of root lattice again I cannot make it operate on weight lattice.Sun, 28 Feb 2016 22:25:35 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32687#post-id-32687Comment by DBS for <p>Yes, this looks strange indeed. You can proceed like that instead:</p>
<pre><code>sage: R = RootSystem(['A', 2])
sage: WL = R.weight_lattice()
sage: FW = R.weight_lattice().basis()
sage: SR = WL.simple_roots()
sage: FW
Finite family {1: Lambda[1], 2: Lambda[2]}
sage: SR
Finite family {1: 2*Lambda[1] - Lambda[2], 2: -Lambda[1] + 2*Lambda[2]}
</code></pre>
<p>EDIT: here is how to get the Weyl group acting on the weight lattice</p>
<pre><code>sage: W = WL.weyl_group()
sage: s = W.gens()
sage: s[0].action(FW[1])
-Lambda[1] + Lambda[2]
</code></pre>
<p>EDIT: with the same notations</p>
<pre><code>sage: v=s[0].action(SR[1])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[0].action(SR[2])
sage: v.to_ambient().is_positive_root()
True
sage: v=s[1].action(SR[2])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[1].action(SR[1])
sage: v.to_ambient().is_positive_root()
True
</code></pre>
https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32693#post-id-32693Thank you this helps me a lot!Tue, 01 Mar 2016 15:47:57 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32693#post-id-32693Comment by DBS for <p>Yes, this looks strange indeed. You can proceed like that instead:</p>
<pre><code>sage: R = RootSystem(['A', 2])
sage: WL = R.weight_lattice()
sage: FW = R.weight_lattice().basis()
sage: SR = WL.simple_roots()
sage: FW
Finite family {1: Lambda[1], 2: Lambda[2]}
sage: SR
Finite family {1: 2*Lambda[1] - Lambda[2], 2: -Lambda[1] + 2*Lambda[2]}
</code></pre>
<p>EDIT: here is how to get the Weyl group acting on the weight lattice</p>
<pre><code>sage: W = WL.weyl_group()
sage: s = W.gens()
sage: s[0].action(FW[1])
-Lambda[1] + Lambda[2]
</code></pre>
<p>EDIT: with the same notations</p>
<pre><code>sage: v=s[0].action(SR[1])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[0].action(SR[2])
sage: v.to_ambient().is_positive_root()
True
sage: v=s[1].action(SR[2])
sage: v.to_ambient().is_positive_root()
False
sage: v=s[1].action(SR[1])
sage: v.to_ambient().is_positive_root()
True
</code></pre>
https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32694#post-id-32694I didn't remember seeing the methods .to_ambient and to_vector in the documentation on Weyl Group/ root space realizations etc. It is probably because I was looking at the wrong places. Can you suggest where I should be looking?Wed, 02 Mar 2016 00:59:18 +0100https://ask.sagemath.org/question/32683/an-issue-with-root-systems-in-sage/?comment=32694#post-id-32694