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.Fri, 19 Mar 2021 21:05:06 +0100Obtaining signed permutation in the bruhat poset in another formhttps://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/(I edited the question, to make it more clear)
When I input the Bruhat poset of type Bn in Sage as follows
W = WeylGroup("B2", prefix="s")
P = W.bruhat_poset()
display(plot(P))
the elements look like `s2*s1*s2`.
>Question: Is there a way to represent (in the picture of the poset in Sage) the elements in the form of signed permutation as for example findstat does (see for example http://www.findstat.org/StatisticsDatabase/St001427/ ) but so that - is replaced by 0 and brackets and commas are ommited?
So for example all signed permutations for $n=2$ would look as follows in this notation:
12
102
012
0102
21
201
021
0201
(The motivation is that one can use the code in the thread https://ask.sagemath.org/question/56230/obtaining-incidence-algebras-for-gap-via-sage/ to obtain the quiver algebra in GAP with names one can regognize later).
Thanks for any helpFri, 19 Mar 2021 19:46:59 +0100https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/Comment by FrédéricC for <p>(I edited the question, to make it more clear)</p>
<p>When I input the Bruhat poset of type Bn in Sage as follows</p>
<pre><code>W = WeylGroup("B2", prefix="s")
P = W.bruhat_poset()
display(plot(P))
</code></pre>
<p>the elements look like <code>s2*s1*s2</code>.</p>
<blockquote>
<p>Question: Is there a way to represent (in the picture of the poset in Sage) the elements in the form of signed permutation as for example findstat does (see for example <a href="http://www.findstat.org/StatisticsDatabase/St001427/">http://www.findstat.org/StatisticsDat...</a> ) but so that - is replaced by 0 and brackets and commas are ommited?
So for example all signed permutations for $n=2$ would look as follows in this notation:</p>
</blockquote>
<pre><code>12
102
012
0102
21
201
021
0201
</code></pre>
<p>(The motivation is that one can use the code in the thread <a href="https://ask.sagemath.org/question/56230/obtaining-incidence-algebras-for-gap-via-sage/">https://ask.sagemath.org/question/562...</a> to obtain the quiver algebra in GAP with names one can regognize later).</p>
<p>Thanks for any help</p>
https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56275#post-id-56275And we have
sage: W=CoxeterGroup(['B',3])
sage: W.category()
Category of finite irreducible coxeter groups
sage: W.an_element()
[ 0 1 -a]
[ 1 1 -a]
[ 0 a -1]
which you may want to try.Fri, 19 Mar 2021 20:50:47 +0100https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56275#post-id-56275Comment by FrédéricC for <p>(I edited the question, to make it more clear)</p>
<p>When I input the Bruhat poset of type Bn in Sage as follows</p>
<pre><code>W = WeylGroup("B2", prefix="s")
P = W.bruhat_poset()
display(plot(P))
</code></pre>
<p>the elements look like <code>s2*s1*s2</code>.</p>
<blockquote>
<p>Question: Is there a way to represent (in the picture of the poset in Sage) the elements in the form of signed permutation as for example findstat does (see for example <a href="http://www.findstat.org/StatisticsDatabase/St001427/">http://www.findstat.org/StatisticsDat...</a> ) but so that - is replaced by 0 and brackets and commas are ommited?
So for example all signed permutations for $n=2$ would look as follows in this notation:</p>
</blockquote>
<pre><code>12
102
012
0102
21
201
021
0201
</code></pre>
<p>(The motivation is that one can use the code in the thread <a href="https://ask.sagemath.org/question/56230/obtaining-incidence-algebras-for-gap-via-sage/">https://ask.sagemath.org/question/562...</a> to obtain the quiver algebra in GAP with names one can regognize later).</p>
<p>Thanks for any help</p>
https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56274#post-id-56274We have
sage: W=ColoredPermutations(4,2)
sage: W.category()
Category of well generated finite irreducible complex reflection groups
but this has no Bruhat order method.Fri, 19 Mar 2021 20:49:19 +0100https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56274#post-id-56274Answer by FrédéricC for <p>(I edited the question, to make it more clear)</p>
<p>When I input the Bruhat poset of type Bn in Sage as follows</p>
<pre><code>W = WeylGroup("B2", prefix="s")
P = W.bruhat_poset()
display(plot(P))
</code></pre>
<p>the elements look like <code>s2*s1*s2</code>.</p>
<blockquote>
<p>Question: Is there a way to represent (in the picture of the poset in Sage) the elements in the form of signed permutation as for example findstat does (see for example <a href="http://www.findstat.org/StatisticsDatabase/St001427/">http://www.findstat.org/StatisticsDat...</a> ) but so that - is replaced by 0 and brackets and commas are ommited?
So for example all signed permutations for $n=2$ would look as follows in this notation:</p>
</blockquote>
<pre><code>12
102
012
0102
21
201
021
0201
</code></pre>
<p>(The motivation is that one can use the code in the thread <a href="https://ask.sagemath.org/question/56230/obtaining-incidence-algebras-for-gap-via-sage/">https://ask.sagemath.org/question/562...</a> to obtain the quiver algebra in GAP with names one can regognize later).</p>
<p>Thanks for any help</p>
https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?answer=56276#post-id-56276You can use
sage: W = WeylGroup("B2", prefix="s")
sage: w=W.an_element()
sage: w.to_permutation()
(2, -1)
And relabel the poset using this map.
**EDIT**
sage: def new_label(w):
....: return ''.join(str(u) for u in w.to_permutation()).replace('-','0')
sage: W.bruhat_poset().relabel(new_label)
Finite poset containing 8 elementsFri, 19 Mar 2021 20:53:11 +0100https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?answer=56276#post-id-56276Comment by klaaa for <p>You can use</p>
<pre><code>sage: W = WeylGroup("B2", prefix="s")
sage: w=W.an_element()
sage: w.to_permutation()
(2, -1)
</code></pre>
<p>And relabel the poset using this map.</p>
<p><strong>EDIT</strong></p>
<pre><code>sage: def new_label(w):
....: return ''.join(str(u) for u in w.to_permutation()).replace('-','0')
sage: W.bruhat_poset().relabel(new_label)
Finite poset containing 8 elements
</code></pre>
https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56277#post-id-56277Thanks, but it seems that in this form the code of the other thread can not be applied to the poset. I will do some more tests.Fri, 19 Mar 2021 21:05:06 +0100https://ask.sagemath.org/question/56271/obtaining-signed-permutation-in-the-bruhat-poset-in-another-form/?comment=56277#post-id-56277