Ask Your Question

Revision history [back]

I am not sure to understand your request, but you can try:

sage: index, deg = rankrep(3)
sage: index
['A8(fw[1])', 'A8(fw[8])']
sage: deg
[[2],
 [3, 3],
 [4, 6, 4],
 [5, 10, 10, 5],
 [6, 15, 20, 15, 6],
 [7, 21, 35, 35, 21, 7],
 [8, 28, 56, 70, 56, 28, 8],
 [9, 36, 84, 126, 126, 84, 36, 9],
 [10, 45, 120, 210, 252, 210, 120, 45, 10]]
sage: deg[3]
[5, 10, 10, 5]

I am not sure to understand your request, but you can try:modify your last line by:

return index, deg, L

And then play with it:

sage: index, deg deg, L = rankrep(3)
sage: index
['A8(fw[1])', 'A8(fw[8])']
sage: deg
[[2],
 [3, 3],
 [4, 6, 4],
 [5, 10, 10, 5],
 [6, 15, 20, 15, 6],
 [7, 21, 35, 35, 21, 7],
 [8, 28, 56, 70, 56, 28, 8],
 [9, 36, 84, 126, 126, 84, 36, 9],
 [10, 45, 120, 210, 252, 210, 120, 45, 10]]
sage: deg[3]
[5, 10, 10, 5]
sage: L
[(1, 0, 0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1, 1, 0)]

I am not sure to understand your request, but you can modify your the last line of your function to return L as well by:

return index, deg, L

And then play with it:

sage: index, deg, L = rankrep(3)
sage: index
['A8(fw[1])', 'A8(fw[8])']
sage: deg
[[2],
 [3, 3],
 [4, 6, 4],
 [5, 10, 10, 5],
 [6, 15, 20, 15, 6],
 [7, 21, 35, 35, 21, 7],
 [8, 28, 56, 70, 56, 28, 8],
 [9, 36, 84, 126, 126, 84, 36, 9],
 [10, 45, 120, 210, 252, 210, 120, 45, 10]]
sage: deg[3]
[5, 10, 10, 5]
sage: L
[(1, 0, 0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1, 1, 0)]

I am not sure to understand your request, but you can modify the last line of your function to return L as well by:

return index, deg, L

And then play with it:

sage: index, deg, L = rankrep(3)
sage: index
['A8(fw[1])', 'A8(fw[8])']
sage: deg
[[2],
 [3, 3],
 [4, 6, 4],
 [5, 10, 10, 5],
 [6, 15, 20, 15, 6],
 [7, 21, 35, 35, 21, 7],
 [8, 28, 56, 70, 56, 28, 8],
 [9, 36, 84, 126, 126, 84, 36, 9],
 [10, 45, 120, 210, 252, 210, 120, 45, 10]]
sage: deg[3]
[5, 10, 10, 5]
sage: L
[(1, 0, 0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1, 1, 0)]

To transform the elements of L to a list of vectors, you can:

sage: w = []
sage: for i in L:
....:     w.append(i.to_vector()) 
....:     
sage: w[0]
(1, 0, 0, 0, 0, 0, 0, 0, 0)
sage: w[1]
(1, 1, 1, 1, 1, 1, 1, 1, 0)

I am not sure to understand your request, but you can modify the last line of your function to return L as well by:

return index, deg, L

And then play with it:

sage: index, deg, L = rankrep(3)
sage: index
['A8(fw[1])', 'A8(fw[8])']
sage: deg
[[2],
 [3, 3],
 [4, 6, 4],
 [5, 10, 10, 5],
 [6, 15, 20, 15, 6],
 [7, 21, 35, 35, 21, 7],
 [8, 28, 56, 70, 56, 28, 8],
 [9, 36, 84, 126, 126, 84, 36, 9],
 [10, 45, 120, 210, 252, 210, 120, 45, 10]]
sage: deg[3]
[5, 10, 10, 5]
sage: L
[(1, 0, 0, 0, 0, 0, 0, 0, 0), (1, 1, 1, 1, 1, 1, 1, 1, 0)]

To transform the elements of L to a list of vectors, you can:

sage: w = []
sage: [i.to_vector() for i in L:
....:     w.append(i.to_vector()) 
....:     
L]
sage: w[0]
(1, 0, 0, 0, 0, 0, 0, 0, 0)
sage: w[1]
(1, 1, 1, 1, 1, 1, 1, 1, 0)