Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit e07d789

Browse files
committed
fixed doctests for added methods in hopf_algebras_with_basis.py and bialgebras.py
1 parent a80d67f commit e07d789

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

src/sage/categories/bialgebras.py

+13-11
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ def convolution_product(self, *maplist):
171171
sage: m[[]].convolution_product([]), m[[1,3],[2]].convolution_product([])
172172
(m{}, 0)
173173
174-
sage: x = GroupAlgebra(SymmetricGroup(7),QQ).an_element(); x
175-
() + 3*(1,2) + 3*(1,2,3,4,5,6,7)
174+
sage: QS = SymmetricGroupAlgebra(QQ,5)
175+
sage: x = QS.sum_of_terms(zip(Permutations(5)[3:6],[1,2,3])); x
176+
[1, 2, 4, 5, 3] + 2*[1, 2, 5, 3, 4] + 3*[1, 2, 5, 4, 3]
177+
sage: x.convolution_product([Antipode])
178+
2*[1, 2, 4, 5, 3] + [1, 2, 5, 3, 4] + 3*[1, 2, 5, 4, 3]
176179
sage: x.convolution_product([Id, Antipode, Antipode, Antipode])
177-
4*() + 3*(1,6,4,2,7,5,3)
178-
180+
3*[1, 2, 3, 4, 5] + [1, 2, 4, 5, 3] + 2*[1, 2, 5, 3, 4]
179181
"""
180182
# be flexible on how the maps are entered...
181183
if len(maplist)==1 and isinstance(maplist[0], (list,tuple)):
@@ -223,15 +225,15 @@ def coproduct_iterated(self, n=1):
223225
sage: p([]).coproduct_iterated(3)
224226
p[] # p[] # p[] # p[]
225227
226-
sage: S = NonCommutativeSymmetricFunctions(QQ).S()
227-
sage: S[4].coproduct_iterated(0)
228-
S[4]
229-
sage: S[4].coproduct_iterated(2)
230-
S[] # S[] # S[4] + S[] # S[1] # S[3] + S[] # S[2] # S[2] + S[] # S[3] # S[1] + S[] # S[4] # S[] + S[1] # S[] # S[3] + S[1] # S[1] # S[2] + S[1] # S[2] # S[1] + S[1] # S[3] # S[] + S[2] # S[] # S[2] + S[2] # S[1] # S[1] + S[2] # S[2] # S[] + S[3] # S[] # S[1] + S[3] # S[1] # S[] + S[4] # S[] # S[]
228+
sage: Psi = NonCommutativeSymmetricFunctions(QQ).Psi()
229+
sage: Psi[2,2].coproduct_iterated(0)
230+
Psi[2, 2]
231+
sage: Psi[2,2].coproduct_iterated(3)
232+
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[]
231233
232234
sage: m = SymmetricFunctionsNonCommutingVariables(QQ).m()
233-
sage: m[[1,3],[2]].convolution_product([Antipode,Antipode])
234-
3*m{{1}, {2, 3}} + 3*m{{1, 2}, {3}} + 6*m{{1, 2, 3}} - 2*m{{1, 3}, {2}}
235+
sage: m[[1,3],[2]].coproduct_iterated(2)
236+
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{}
235237
236238
sage: m[[]].coproduct_iterated(3), m[[1,3],[2]].coproduct_iterated(0)
237239
(m{} # m{} # m{} # m{}, m{{1, 3}, {2}})

src/sage/categories/hopf_algebras_with_basis.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,15 @@ def adams_operator(self, n):
309309
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]
310310
311311
312-
sage: x = GroupAlgebra(SymmetricGroup(7),QQ).an_element(); x
313-
() + 2*(6,7) + 3*(5,6) + (1,2,3,4,5,6,7)
312+
sage: QS = SymmetricGroupAlgebra(QQ,5)
313+
sage: x = QS.sum_of_terms(zip(Permutations(5)[3:6],[1,2,3])); x
314+
[1, 2, 4, 5, 3] + 2*[1, 2, 5, 3, 4] + 3*[1, 2, 5, 4, 3]
314315
sage: x.adams_operator(2)
315-
6*() + (1,3,5,7,2,4,6)
316+
3*[1, 2, 3, 4, 5] + 2*[1, 2, 4, 5, 3] + [1, 2, 5, 3, 4]
316317
sage: x.antipode()
317-
() + 2*(6,7) + 3*(5,6) + (1,7,6,5,4,3,2)
318+
2*[1, 2, 4, 5, 3] + [1, 2, 5, 3, 4] + 3*[1, 2, 5, 4, 3]
318319
sage: x.adams_operator(-2)
319-
6*() + (1,6,4,2,7,5,3)
320+
3*[1, 2, 3, 4, 5] + [1, 2, 4, 5, 3] + 2*[1, 2, 5, 3, 4]
320321
321322
TESTS::
322323
@@ -328,12 +329,13 @@ def adams_operator(self, n):
328329
sage: m[[1,3],[2]].adams_operator(-2)
329330
3*m{{1}, {2, 3}} + 3*m{{1, 2}, {3}} + 6*m{{1, 2, 3}} - 2*m{{1, 3}, {2}}
330331
331-
sage: x = GroupAlgebra(SymmetricGroup(7),QQ).an_element(); x
332-
() + 2*(6,7) + 3*(5,6) + (1,2,3,4,5,6,7)
332+
sage: G = AlternatingGroup(5); QG = GroupAlgebra(G,QQ)
333+
sage: x = QG.sum_of_terms(zip(G[3:6],[1,2,3])); x
334+
(3,5,4) + 3*(1,2,4,3,5) + 2*(1,3,5,2,4)
333335
sage: x.adams_operator(-3)
334-
() + 2*(6,7) + 3*(5,6) + (1,5,2,6,3,7,4)
335-
sage: x.adams_operator(0)
336-
7*()
336+
() + 3*(1,4,5,2,3) + 2*(1,5,4,3,2)
337+
sage: x.adams_operator(0), x.adams_operator(10)
338+
(6*(), 5*() + (3,5,4))
337339
"""
338340
if n < 0:
339341
T = lambda x: x.antipode()

0 commit comments

Comments
 (0)