Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/algebras/affine_nil_temperley_lieb.py
4145 views
1
"""
2
Affine nilTemperley Lieb Algebra of type A
3
"""
4
#*****************************************************************************
5
# Copyright (C) 2010 Anne Schilling <anne at math.ucdavis.edu>
6
#
7
# Distributed under the terms of the GNU General Public License (GPL)
8
# http://www.gnu.org/licenses/
9
#*****************************************************************************
10
from sage.categories.all import AlgebrasWithBasis
11
from sage.combinat.root_system.cartan_type import CartanType
12
from sage.combinat.root_system.weyl_group import WeylGroup
13
from sage.rings.ring import Ring
14
from sage.rings.all import ZZ
15
from sage.combinat.free_module import CombinatorialFreeModule
16
from sage.misc.cachefunc import cached_method
17
18
class AffineNilTemperleyLiebTypeA(CombinatorialFreeModule):
19
r"""
20
Constructs the affine nilTemperley Lieb algebra of type `A_{n-1}^{(1)}` as used in [P2005].
21
22
REFERENCES:
23
24
.. [P2005] A. Postnikov, Affine approach to quantum Schubert calculus, Duke Math. J. 128 (2005) 473-509
25
26
INPUT:
27
28
- ``n`` -- a positive integer
29
30
The affine nilTemperley Lieb algebra is generated by `a_i` for `i=0,1,\ldots,n-1`
31
subject to the relations `a_i a_i = a_i a_{i+1} a_i = a_{i+1} a_i a_{i+1} = 0` and
32
`a_i a_j = a_j a_i` for `i-j \not \equiv \pm 1`, where the indices are taken modulo `n`.
33
34
EXAMPLES::
35
36
sage: A = AffineNilTemperleyLiebTypeA(4)
37
sage: a = A.algebra_generators(); a
38
Finite family {0: a0, 1: a1, 2: a2, 3: a3}
39
sage: a[1]*a[2]*a[0] == a[1]*a[0]*a[2]
40
True
41
sage: a[0]*a[3]*a[0]
42
0
43
sage: A.an_element()
44
2*a0 + 3*a0*a1 + 1 + a0*a1*a2*a3
45
"""
46
47
def __init__(self, n, R = ZZ, prefix = 'a'):
48
"""
49
Initiates the affine nilTemperley Lieb algebra over the ring `R`.
50
51
EXAMPLES::
52
53
sage: A = AffineNilTemperleyLiebTypeA(3, prefix="a"); A
54
The affine nilTemperley Lieb algebra A3 over the ring Integer Ring
55
sage: TestSuite(A).run()
56
sage: A = AffineNilTemperleyLiebTypeA(3, QQ); A
57
The affine nilTemperley Lieb algebra A3 over the ring Rational Field
58
"""
59
if not isinstance(R, Ring):
60
raise TypeError("Argument R must be a ring.")
61
self._cartan_type = CartanType(['A',n-1,1])
62
self._n = n
63
W = WeylGroup(self._cartan_type)
64
self._prefix = prefix
65
self._index_set = W.index_set()
66
self._base_ring = R
67
category = AlgebrasWithBasis(R)
68
CombinatorialFreeModule.__init__(self, R, W, category = category)
69
70
def _element_constructor_(self, w):
71
"""
72
Constructs a basis element from an element of the Weyl group.
73
74
If `w = w_1 ... w_k` is a reduced word for `w`, then `A(w)` returns
75
zero if `w` contains braid relations.
76
TODO: Once the functorial construction is in sage, perhaps this should be
77
handled constructing the affine nilTemperley Lieb algebra as a quotient algebra.
78
79
EXAMPLES::
80
81
sage: A = AffineNilTemperleyLiebTypeA(3, prefix="a")
82
sage: W = A.weyl_group()
83
sage: w = W.from_reduced_word([2,1,2])
84
sage: A(w)
85
0
86
sage: w = W.from_reduced_word([2,1])
87
sage: A(w)
88
a2*a1
89
"""
90
W = self.weyl_group()
91
assert(w in W)
92
word = w.reduced_word()
93
if all( self.has_no_braid_relation(W.from_reduced_word(word[:i]), word[i]) for i in range(len(word)) ):
94
return self.monomial(w)
95
else:
96
return self.zero()
97
98
@cached_method
99
def one_basis(self):
100
"""
101
Returns the unit of the underlying Weyl group, which index
102
the one of this algebra, as per
103
:meth:`AlgebrasWithBasis.ParentMethods.one_basis`.
104
105
EXAMPLES::
106
107
sage: A = AffineNilTemperleyLiebTypeA(3)
108
sage: A.one_basis()
109
[1 0 0]
110
[0 1 0]
111
[0 0 1]
112
sage: A.one_basis() == A.weyl_group().one()
113
True
114
sage: A.one()
115
1
116
"""
117
return self.weyl_group().one()
118
119
def _repr_(self):
120
"""
121
EXAMPLES::
122
123
sage: A = AffineNilTemperleyLiebTypeA(3); A
124
The affine nilTemperley Lieb algebra A3 over the ring Integer Ring
125
"""
126
return "The affine nilTemperley Lieb algebra A%s over the ring %s"%(self._n, self._base_ring)
127
128
def weyl_group(self):
129
"""
130
EXAMPLES::
131
132
sage: A = AffineNilTemperleyLiebTypeA(3)
133
sage: A.weyl_group()
134
Weyl Group of type ['A', 2, 1] (as a matrix group acting on the root space)
135
"""
136
return self.basis().keys()
137
138
def index_set(self):
139
"""
140
EXAMPLES::
141
142
sage: A = AffineNilTemperleyLiebTypeA(3)
143
sage: A.index_set()
144
[0, 1, 2]
145
"""
146
return self._index_set
147
148
@cached_method
149
def algebra_generators(self):
150
"""
151
Returns the generators `a_i` for `i=0,1,2,\ldots,n-1`.
152
153
EXAMPLES::
154
155
sage: A = AffineNilTemperleyLiebTypeA(3)
156
sage: a = A.algebra_generators();a
157
Finite family {0: a0, 1: a1, 2: a2}
158
sage: a[1]
159
a1
160
"""
161
return self.weyl_group().simple_reflections().map(self.monomial)
162
163
def algebra_generator(self, i):
164
"""
165
EXAMPLES::
166
167
sage: A = AffineNilTemperleyLiebTypeA(3)
168
sage: A.algebra_generator(1)
169
a1
170
sage: A = AffineNilTemperleyLiebTypeA(3, prefix = 't')
171
sage: A.algebra_generator(1)
172
t1
173
"""
174
return self.algebra_generators()[i]
175
176
def product_on_basis(self, w, w1):
177
"""
178
Returns `a_w a_{w1}`, where `w` and `w1` are in the Weyl group
179
assuming that `w` does not contain any braid relations.
180
181
EXAMPLES::
182
183
sage: A = AffineNilTemperleyLiebTypeA(5)
184
sage: W = A.weyl_group()
185
sage: s = W.simple_reflections()
186
sage: [A.product_on_basis(s[1],x) for x in s]
187
[a1*a0, 0, a1*a2, a3*a1, a4*a1]
188
189
sage: a = A.algebra_generators()
190
sage: x = a[1] * a[2]
191
sage: x
192
a1*a2
193
sage: x * a[1]
194
0
195
sage: x * a[2]
196
0
197
sage: x * a[0]
198
a1*a2*a0
199
200
sage: [x * a[1] for x in a]
201
[a0*a1, 0, a2*a1, a3*a1, a4*a1]
202
203
sage: w = s[1]*s[2]*s[1]
204
sage: A.product_on_basis(w,s[1])
205
Traceback (most recent call last):
206
...
207
AssertionError
208
"""
209
assert(self(w) != self.zero())
210
for i in w1.reduced_word():
211
if self.has_no_braid_relation(w, i):
212
w = w.apply_simple_reflection(i)
213
else:
214
return self.zero()
215
return self.monomial(w)
216
217
@cached_method
218
def has_no_braid_relation(self, w, i):
219
"""
220
Assuming that `w` contains no relations of the form `s_i^2` or `s_i s_{i+1} s_i` or
221
`s_i s_{i-1} s_i`, tests whether `w s_i` contains terms of this form.
222
223
EXAMPLES::
224
225
sage: A = AffineNilTemperleyLiebTypeA(5)
226
sage: W = A.weyl_group()
227
sage: s=W.simple_reflections()
228
sage: A.has_no_braid_relation(s[2]*s[1]*s[0]*s[4]*s[3],0)
229
False
230
sage: A.has_no_braid_relation(s[2]*s[1]*s[0]*s[4]*s[3],2)
231
True
232
sage: A.has_no_braid_relation(s[4],2)
233
True
234
"""
235
if w == w.parent().one():
236
return True
237
if i in w.descents():
238
return False
239
s = w.parent().simple_reflections()
240
wi = w*s[i]
241
adjacent = [(i-1)%w.parent().n, (i+1)%w.parent().n]
242
for j in adjacent:
243
if j in w.descents():
244
if j in wi.descents():
245
return False
246
else:
247
return True
248
return self.has_no_braid_relation(w*s[w.first_descent()],i)
249
250
def _repr_term(self, t, short_display=True):
251
"""
252
EXAMPLES::
253
254
sage: A = AffineNilTemperleyLiebTypeA(3)
255
sage: W = A.weyl_group()
256
sage: A._repr_term(W.from_reduced_word([1,2,0]))
257
'a1*a2*a0'
258
sage: A._repr_term(W.from_reduced_word([1,2,0]), short_display = False)
259
'a[1]*a[2]*a[0]'
260
"""
261
redword = t.reduced_word()
262
if len(redword) == 0:
263
return "1"
264
elif short_display:
265
return "*".join("%s%d"%(self._prefix, i) for i in redword)
266
else:
267
return "*".join("%s[%d]"%(self._prefix, i) for i in redword)
268
269