Demonstration: Algebraic Combinatorics

<span id="demo-algebraic-combinatorics-short"></span>



<h1>Tableaux and the like</h1>

{{{id=0|
s = Permutation([5,3,2,6,4,8,9,7,1])
s
///
}}}

{{{id=1|
(p,q) = s.robinson_schensted()
p.pp()
///
1  4  7  92  6  835
}}}

{{{id=2|
p.row_stabilizer()
///
Permutation Group with generators [(), (7,9), (6,8), (4,7), (2,6), (1,4)]
}}}

<h1>Symmetric functions</h1>
<p>Usual bases:</p>

{{{id=3|
Sym = SymmetricFunctions(QQ); Sym
///
Symmetric Functions over Rational Field
}}}

{{{id=4|
Sym.inject_shorthands()
///
}}}

{{{id=5|
m(( ( h[2,1] * ( 1 + 3 * p[2,1]) ) + s[2](s[3])))
///
}}}

<p>Macdonald polynomials:</p>

{{{id=6|
J = MacdonaldPolynomialsJ(QQ)
P = MacdonaldPolynomialsP(QQ)
Q = MacdonaldPolynomialsQ(QQ)
J
///
Macdonald polynomials in the J basis over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field
}}}

{{{id=7|
P(J[2,2] + 3 * Q[3,1])
///
}}}

<h1>Root systems</h1>

{{{id=8|
L = RootSystem(['A',2,1]).weight_space()
L.plot(size=[[-1..1],[-1..1]],alcovewalks=[[0,2,0,1,2,1,2,0,2,1]])
///
}}}

{{{id=9|
W = WeylGroup([&quot;B&quot;, 3])
W.cayley_graph(side = &quot;left&quot;).plot3d(color_by_label = True)
///
}}}

<h1>GAP at work</h1>

{{{id=10|
print W.character_table()  # Thanks GAP!
///
CT1      2  4  4  3  3  4  3  1  1  3  4      3  1  .  .  .  .  .  1  1  .  1        1a 2a 2b 4a 2c 2d 6a 3a 4b 2eX.1      1  1  1  1  1  1  1  1  1  1X.2      1  1  1 -1 -1 -1 -1  1  1 -1X.3      1  1 -1 -1  1 -1  1  1 -1  1X.4      1  1 -1  1 -1  1 -1  1 -1 -1X.5      2  2  .  . -2  .  1 -1  . -2X.6      2  2  .  .  2  . -1 -1  .  2X.7      3 -1  1  1  1 -1  .  . -1 -3X.8      3 -1 -1 -1  1  1  .  .  1 -3X.9      3 -1 -1  1 -1 -1  .  .  1  3X.10     3 -1  1 -1 -1  1  .  . -1  3
}}}


{{{id=11|
type(W.character_table())
G = gap(W); G
G.Ch
T = G.CharacterTable(); T
T.Irr()[10,10]
///
}}}

<h1>Coxeter3 at work</h1>

{{{id=12|
W3 = CoxeterGroup(W, implementation=&quot;coxeter3&quot;)
KL = matrix([ [ W3.kazhdan_lusztig_polynomial(u,v) if u.bruhat_le(v) else 0 for u in W3 ]
               for v in W3])
show(KL)
///
}}}


{{{id=13|
W = WeylGroup([&quot;C&quot;, 3, 1])
W
///
Weyl Group of type ['C', 3, 1] (as a matrix group acting on the root space)
}}}


{{{id=14|
W.from_reduced_word([1,2,3,0,3,0,3,2,1,3,3,2]).stanley_symmetric_function()
///
256*m[1, 1, 1, 1, 1, 1] + 128*m[2, 1, 1, 1, 1] + 64*m[2, 2, 1, 1] + 32*m[2, 2, 2] + 48*m[3, 1, 1, 1] + 24*m[3, 2, 1] + 8*m[3, 3] + 16*m[4, 1, 1] + 8*m[4, 2] + 4*m[5, 1]
}}}

<h1>Crystals</h1>

{{{id=15|
latex.jsmath_avoid_list(['tikzpicture'])
K = KirillovReshetikhinCrystal(['A',3,1], 2,2)
G = K.digraph()
G.set_latex_options(format = &quot;dot2tex&quot;, edge_labels = True, color_by_label = {0:&quot;black&quot;, 1:&quot;blue&quot;, 2:&quot;red&quot;, 3:&quot;green&quot;}, edge_options = lambda (u,v,label):({&quot;backward&quot;:label ==0}))
view(G, viewer=&quot;pdf&quot;, tightpage=True)
///
}}}

