Ask Your Question
0

Iterating over a finite group ring

asked 2023-10-27 16:00:32 +0100

anonymous user

Anonymous

updated 2024-11-20 08:23:44 +0100

FrédéricC gravatar image

I'd like to iterate over a group ring $kG$ for small finite $|k|$ and $|G|$ or make a list of its elements so I can run my algorithm on them. (Say A = GroupAlgebra(DihedralGroup(3), GF(2)).) However, attempting to use for i in A or list(A) throws ValueError: variable name '0' does not start with a letter.

How can one circumvent this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-10-27 18:33:44 +0100

You can use A.from_vector(...) to convert from vectors to elements of A, and then iterate over the corresponding vector space. For example, since DihedralGroup(3) has 6 elements:

sage: [A.from_vector(v) for v in GF(2)**6]
[0,
 (),
 (1,3,2),
 () + (1,3,2),
 ...

Or without creating the full list of all of the elements:

sage: (A.from_vector(v) for v in GF(2)**6)
<generator object <genexpr> at 0x1567274c0>
sage: for a in (A.from_vector(v) for v in GF(2)**6):
....:     print(a)
....:
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-10-27 16:00:32 +0100

Seen: 122 times

Last updated: Oct 27 '23