@@ -37,36 +37,43 @@ def convolution_product(self, *maps):
37
37
r"""
38
38
Return the convolution product (a map) of the given maps.
39
39
40
- INPUT:
40
+ Let `A` and `B` be bialgebras over a commutative ring `R`.
41
+ Given maps `f_i : A \to B` for `1 \leq i < n`, define the
42
+ convolution product
41
43
42
- - ``maps`` -- any number `n \geq 0` of linear maps `R, S, \dots,
43
- T` on ``self``; or a single ``list`` or ``tuple`` of such maps.
44
+ .. MATH::
44
45
45
- OUTPUT:
46
+ (f_1 * f_2 * \cdots * f_n) := \mu^{(n-1)} \circ (f_1 \otimes
47
+ f_2 \otimes \cdots \otimes f_n) \circ \Delta^{(n-1)},
46
48
47
- - the new map `R * S * \cdots * T` representing their convolution
48
- product.
49
+ where `\Delta^{(k)} := \bigl(\Delta \otimes
50
+ \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}`,
51
+ with `\Delta^{(1)} = \Delta` (the ordinary coproduct in `A`) and
52
+ `\Delta^{(0)} = \mathrm{Id}`; and with `\mu^{(k)} := \mu \circ
53
+ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})` and `\mu^{(1)} = \mu`
54
+ (the ordinary product in `B`). See [Sw1969]_.
49
55
50
- .. MATH::
56
+ (In the literature, one finds, e.g., `\Delta^{(2)}` for what we
57
+ denote above as `\Delta^{(1)}`. See [KMN2012]_.)
51
58
52
- (R*S*\cdots*T) := \mu^{(n-1)} \circ (R \otimes S \otimes\cdot\otimes T) \circ \Delta^{(n-1)},
59
+ INPUT:
60
+
61
+ - ``maps`` -- any number `n \geq 0` of linear maps `f_1, f_2,
62
+ \ldots, f_n` on ``self``; or a single ``list`` or ``tuple``
63
+ of such maps
53
64
54
- where `\Delta^{(k)} := \bigl(\Delta \otimes \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}`,
55
- with `\Delta^{(1)} = \Delta` (the ordinary coproduct) and `\Delta^{(0)} = \mathrm{Id}`;
56
- and with `\mu^{(k)} := \mu \circ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})` and `\mu^{(1)} = \mu`
57
- (the ordinary product). See [Sw1969]_.
65
+ OUTPUT:
58
66
59
- (In the literature, one finds, e.g., `\Delta^{(2)}` for what we denote above as `\Delta^{(1)}`. See [KMN2012]_.)
67
+ - the new map `f_1 * f_2 * \cdots * f_2` representing their
68
+ convolution product
60
69
61
70
.. SEEALSO::
62
71
63
72
:meth:`sage.categories.bialgebras.ElementMethods.convolution_product`
64
73
65
74
AUTHORS:
66
75
67
- Aaron Lauve - 12 June 2015 - Sage Days 65
68
- - based off of .adams_operator() code in sage-trac ticket #18350
69
- - by Jean-Baptiste Priez
76
+ - Aaron Lauve - 12 June 2015 - Sage Days 65
70
77
71
78
.. TODO::
72
79
@@ -128,40 +135,39 @@ def convolution_product(self, *maps):
128
135
sage: T(x)
129
136
2*[1, 3, 2] + [2, 1, 3] + 2*[2, 3, 1] + 3*[3, 1, 2] + 3*[3, 2, 1]
130
137
"""
131
- H = self
132
- # TYPE-CHECK:
133
- if not H in ModulesWithBasis :
134
- raise AttributeError ('`self` (%s) must belong to ModulesWithBasis. Try defining convolution product on a basis of `self` instead.' % H ._repr_ ())
135
-
136
- onbasis = lambda x : H .term (x ).convolution_product (* maps )
137
- return H .module_morphism (on_basis = onbasis , codomain = H )
138
+ onbasis = lambda x : self .term (x ).convolution_product (* maps )
139
+ return self .module_morphism (on_basis = onbasis , codomain = self )
138
140
139
141
class ElementMethods :
140
142
141
143
def adams_operator (self , n ):
142
144
r"""
143
- Compute the `n`-th convolution power of the identity morphism `Id`
144
- on ``self``.
145
+ Compute the `n`-th convolution power of the identity morphism
146
+ `\mathrm{Id}` on ``self``.
145
147
146
148
INPUT:
147
149
148
- - ``n`` -- a nonnegative integer.
150
+ - ``n`` -- a nonnegative integer
149
151
150
152
OUTPUT:
151
153
152
- - the image of ``self`` under the convolution power `Id ^{*n}`.
154
+ - the image of ``self`` under the convolution power `\mathrm{Id} ^{*n}`
153
155
154
- .. SEEALSO::
156
+ .. NOTE::
157
+
158
+ In the literature, this is also called a Hopf power or
159
+ Sweedler power, cf. [AL2015]_.
155
160
156
- :mod:`sage.categories.bialgebras.ElementMethods.convolution_product`
161
+ .. SEEALSO::
157
162
158
- (In the literature, this is also called a Hopf power or Sweedler power, cf. [AL2015]_.)
163
+ :meth:`sage.categories.bialgebras.ElementMethods.convolution_product`
159
164
160
165
REFERENCES:
161
166
162
- .. [AL2015] The characteristic polynomial of the Adams operators on graded connected Hopf algebras.
163
- Marcelo Aguiar and Aaron Lauve.
164
- Algebra Number Theory, v.9, 2015, n.3, 2015.
167
+ .. [AL2015] *The characteristic polynomial of the Adams operators
168
+ on graded connected Hopf algebras*.
169
+ Marcelo Aguiar and Aaron Lauve.
170
+ Algebra Number Theory, v.9, 2015, n.3, 2015.
165
171
166
172
.. TODO::
167
173
@@ -195,14 +201,13 @@ def adams_operator(self, n):
195
201
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m()
196
202
sage: m[[1,3],[2]].adams_operator(-2)
197
203
3*m{{1}, {2, 3}} + 3*m{{1, 2}, {3}} + 6*m{{1, 2, 3}} - 2*m{{1, 3}, {2}}
198
-
199
204
"""
200
205
if n < 0 :
201
206
if hasattr (self , 'antipode' ):
202
207
T = lambda x : x .antipode ()
203
208
n = abs (n )
204
209
else :
205
- raise ValueError ("`self` has no antipode, hence cannot take negative convolution powers of identity_map: %s < 0" % str (n ))
210
+ raise ValueError ("antipode not defined; cannot take negative convolution powers: {} < 0" . format (n ))
206
211
else :
207
212
T = lambda x : x
208
213
return self .convolution_product ([T ] * n )
@@ -212,40 +217,48 @@ def convolution_product(self, *maps):
212
217
Return the image of ``self`` under the convolution product (map) of
213
218
the maps.
214
219
215
- INPUT:
220
+ Let `A` and `B` be bialgebras over a commutative ring `R`.
221
+ Given maps `f_i : A \to B` for `1 \leq i < n`, define the
222
+ convolution product
216
223
217
- - ``maps`` -- any number `n \geq 0` of linear maps `R, S, \dots,
218
- T` on ``self.parent()``; or a single ``list`` or ``tuple`` of
219
- such maps.
224
+ .. MATH::
220
225
221
- OUTPUT:
226
+ (f_1 * f_2 * \cdots * f_n) := \mu^{(n-1)} \circ (f_1 \otimes
227
+ f_2 \otimes \cdots \otimes f_n) \circ \Delta^{(n-1)},
222
228
223
- - `(R * S * \cdots * T)` applied to ``self``.
229
+ where `\Delta^{(k)} := \bigl(\Delta \otimes
230
+ \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}`,
231
+ with `\Delta^{(1)} = \Delta` (the ordinary coproduct in `A`) and
232
+ `\Delta^{(0)} = \mathrm{Id}`; and with `\mu^{(k)} := \mu \circ
233
+ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})` and `\mu^{(1)} = \mu`
234
+ (the ordinary product in `B`). See [Sw1969]_.
224
235
225
- .. MATH::
236
+ (In the literature, one finds, e.g., `\Delta^{(2)}` for what we
237
+ denote above as `\Delta^{(1)}`. See [KMN2012]_.)
226
238
227
- (R*S*\cdots*T)(h) := \mu^{(n-1)} \circ (R \otimes S \otimes\cdot\otimes T) \circ \Delta^{(n-1)}(h),
239
+ INPUT:
240
+
241
+ - ``maps`` -- any number `n \geq 0` of linear maps `f_1, f_2,
242
+ \ldots, f_n` on ``self.parent()``; or a single ``list`` or
243
+ ``tuple`` of such maps
228
244
229
- where `\Delta^{(k)} := \bigl(\Delta \otimes \mathrm{Id}^{\otimes(k-1)}\bigr) \circ \Delta^{(k-1)}`,
230
- with `\Delta^{(1)} = \Delta` (the ordinary coproduct) and `\Delta^{(0)} = \mathrm{Id}`;
231
- and with `\mu^{(k)} := \mu \circ \bigl(\mu^{(k-1)} \otimes \mathrm{Id})` and `\mu^{(1)} = \mu`
232
- (the ordinary product). See [Sw1969]_.
245
+ OUTPUT:
233
246
234
- (In the literature, one finds, e.g., `\Delta^{(2)}` for what we denote above as `\Delta^{(1)}`. See [KMN2012]_.)
247
+ - the convolution product of ``maps`` applied to ``self``
235
248
236
249
REFERENCES:
237
250
238
251
.. [KMN2012] On the trace of the antipode and higher indicators.
239
- Yevgenia Kashina and Susan Montgomery and Richard Ng.
240
- Israel J. Math., v.188, 2012.
252
+ Yevgenia Kashina and Susan Montgomery and Richard Ng.
253
+ Israel J. Math., v.188, 2012.
241
254
242
255
.. [Sw1969] Hopf algebras.
243
- Moss Sweedler.
244
- W.A. Benjamin, Math Lec Note Ser., 1969.
256
+ Moss Sweedler.
257
+ W.A. Benjamin, Math Lec Note Ser., 1969.
245
258
246
259
AUTHORS:
247
260
248
- Amy Pang - 12 June 2015 - Sage Days 65
261
+ - Amy Pang - 12 June 2015 - Sage Days 65
249
262
250
263
.. TODO::
251
264
@@ -301,7 +314,6 @@ def convolution_product(self, *maps):
301
314
sage: x.convolution_product([Id]*6)
302
315
9*[1, 2, 3]
303
316
304
-
305
317
TESTS::
306
318
307
319
sage: Id = lambda x: x
@@ -323,7 +335,8 @@ def convolution_product(self, *maps):
323
335
324
336
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
325
337
sage: S[4].convolution_product([Id]*5)
326
- 5*S[1, 1, 1, 1] + 10*S[1, 1, 2] + 10*S[1, 2, 1] + 10*S[1, 3] + 10*S[2, 1, 1] + 10*S[2, 2] + 10*S[3, 1] + 5*S[4]
338
+ 5*S[1, 1, 1, 1] + 10*S[1, 1, 2] + 10*S[1, 2, 1] + 10*S[1, 3]
339
+ + 10*S[2, 1, 1] + 10*S[2, 2] + 10*S[3, 1] + 5*S[4]
327
340
328
341
::
329
342
@@ -360,7 +373,6 @@ def convolution_product(self, *maps):
360
373
361
374
sage: s[3,2].counit().parent() == s[3,2].convolution_product().parent()
362
375
False
363
-
364
376
"""
365
377
# Be flexible on how the maps are entered: accept a list/tuple of
366
378
# maps as well as multiple arguments
@@ -370,87 +382,27 @@ def convolution_product(self, *maps):
370
382
T = maps
371
383
372
384
H = self .parent ()
373
- # TYPE-CHECK:
374
- if not H in ModulesWithBasis :
375
- raise AttributeError ('`parent` (%s) must belong to ModulesWithBasis. Try defining convolution product on a basis of `parent` instead.' % H ._repr_ ())
376
385
377
386
n = len (T )
378
387
if n == 0 :
379
388
return H .one () * self .counit ()
380
- elif n == 1 :
389
+ if n == 1 :
381
390
return T [0 ](self )
382
- else :
383
- # We apply the maps T_i and products concurrently with coproducts, as this
384
- # seems to be faster than applying a composition of maps, e.g., (H.nfold_product) * tensor(T) * (H.nfold_coproduct).
385
391
386
- i = 0
387
- out = tensor ((H .one (),self ))
388
- HH = tensor ((H ,H ))
392
+ # We apply the maps T_i and products concurrently with coproducts, as this
393
+ # seems to be faster than applying a composition of maps, e.g., (H.nfold_product) * tensor(T) * (H.nfold_coproduct).
394
+
395
+ out = tensor ((H .one (),self ))
396
+ HH = tensor ((H ,H ))
389
397
398
+ for mor in T [:- 1 ]:
390
399
#ALGORITHM:
391
400
#`split_convolve` moves terms of the form x # y to x*Ti(y1) # y2 in Sweedler notation.
392
- split_convolve = lambda (x ,y ): (((xy1 ,y2 ),c * d ) for ((y1 ,y2 ),d ) in H .term (y ).coproduct () for (xy1 ,c ) in H .term (x )* T [i ](H .term (y1 )))
393
- while i < n - 1 :
394
- out = HH .module_morphism (on_basis = lambda t : HH .sum_of_terms (split_convolve (t )), codomain = HH )(out )
395
- i += 1
396
-
397
- #Apply final map `T_n` to last term, `y`, and multiply.
398
- out = HH .module_morphism (on_basis = lambda (x ,y ): H .term (x )* T [n - 1 ](H .term (y )), codomain = H )(out )
401
+ split_convolve = lambda (x ,y ): ( ((xy1 ,y2 ),c * d )
402
+ for ((y1 ,y2 ),d ) in H .term (y ).coproduct ()
403
+ for (xy1 ,c ) in H .term (x )* mor (H .term (y1 )) )
404
+ out = HH .module_morphism (on_basis = lambda t : HH .sum_of_terms (split_convolve (t )), codomain = HH )(out )
399
405
400
- return out
401
-
402
-
403
- def coproduct_iterated (self , n = 1 ):
404
- r"""
405
- Apply `n` coproducts to ``self``.
406
-
407
- .. TODO::
408
-
409
- Remove dependency on ``modules_with_basis`` methods.
410
-
411
- EXAMPLES::
412
-
413
- sage: Psi = NonCommutativeSymmetricFunctions(QQ).Psi()
414
- sage: Psi[2,2].coproduct_iterated(0)
415
- Psi[2, 2]
416
- sage: Psi[2,2].coproduct_iterated(2)
417
- Psi[] # Psi[] # Psi[2, 2] + 2*Psi[] # Psi[2] # Psi[2] + Psi[] # Psi[2, 2] # Psi[] + 2*Psi[2] # Psi[] # Psi[2] + 2*Psi[2] # Psi[2] # Psi[] + Psi[2, 2] # Psi[] # Psi[]
418
-
419
- TESTS::
420
-
421
- sage: p = SymmetricFunctions(QQ).p()
422
- sage: p[5,2,2].coproduct_iterated()
423
- p[] # p[5, 2, 2] + 2*p[2] # p[5, 2] + p[2, 2] # p[5] + p[5] # p[2, 2] + 2*p[5, 2] # p[2] + p[5, 2, 2] # p[]
424
- sage: p([]).coproduct_iterated(3)
425
- p[] # p[] # p[] # p[]
426
-
427
- ::
428
-
429
- sage: Psi = NonCommutativeSymmetricFunctions(QQ).Psi()
430
- sage: Psi[2,2].coproduct_iterated(0)
431
- Psi[2, 2]
432
- sage: Psi[2,2].coproduct_iterated(3)
433
- Psi[] # Psi[] # Psi[] # Psi[2, 2] + 2*Psi[] # Psi[] # Psi[2] # Psi[2] + Psi[] # Psi[] # Psi[2, 2] # Psi[] + 2*Psi[] # Psi[2] # Psi[] # Psi[2] + 2*Psi[] # Psi[2] # Psi[2] # Psi[] + Psi[] # Psi[2, 2] # Psi[] # Psi[] + 2*Psi[2] # Psi[] # Psi[] # Psi[2] + 2*Psi[2] # Psi[] # Psi[2] # Psi[] + 2*Psi[2] # Psi[2] # Psi[] # Psi[] + Psi[2, 2] # Psi[] # Psi[] # Psi[]
434
-
435
- ::
436
-
437
- sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m()
438
- sage: m[[1,3],[2]].coproduct_iterated(2)
439
- m{} # m{} # m{{1, 3}, {2}} + m{} # m{{1}} # m{{1, 2}} + m{} # m{{1, 2}} # m{{1}} + m{} # m{{1, 3}, {2}} # m{} + m{{1}} # m{} # m{{1, 2}} + m{{1}} # m{{1, 2}} # m{} + m{{1, 2}} # m{} # m{{1}} + m{{1, 2}} # m{{1}} # m{} + m{{1, 3}, {2}} # m{} # m{}
440
- sage: m[[]].coproduct_iterated(3), m[[1,3],[2]].coproduct_iterated(0)
441
- (m{} # m{} # m{} # m{}, m{{1, 3}, {2}})
442
- """
443
- if n < 0 :
444
- raise ValueError ("cannot take fewer than 0 coproduct iterations: %s < 0" % str (n ))
445
- if n == 0 :
446
- return self
447
- elif n == 1 :
448
- return self .coproduct ()
449
- else :
450
- from sage .functions .all import floor , ceil
451
- from sage .rings .all import Integer
406
+ #Apply final map `T_n` to last term, `y`, and multiply.
407
+ return HH .module_morphism (on_basis = lambda (x ,y ): H .term (x )* T [- 1 ](H .term (y )), codomain = H )(out )
452
408
453
- # Use coassociativity of `\Delta` to perform many coproducts simultaneously.
454
- fn = floor (Integer (n - 1 )/ 2 ); cn = ceil (Integer (n - 1 )/ 2 )
455
- def split (a ,b ): return tensor ([a .coproduct_iterated (fn ), b .coproduct_iterated (cn )])
456
- return (self .coproduct ()).apply_multilinear_morphism (split )
0 commit comments