Ask Your Question

Revision history [back]

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)
....: