Iterating over finite structures
I am trying to use sage for some algebra computations involving finite rings. Since the structures are finite, I would like to iterate over all the elements of the structure. I know how to iterate in some cases for polynomials in polynomial rings of a certain degree (not necessarily finite):
S.<x> = PolynomialRing(Zmod(9))
Then I could do
for i in S.polynomials(of_degree = 2):
To iterate over all quadratics. What I'd like to do is iterate over all elements of a structure like the finite ring:
R = GroupAlgebra( GL(2, Zmod(2)), Zmod(2))
Is there a way to do this in Sage easily?