ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 19 Jul 2017 13:12:25 +0200iterating over quotient ring and polynomial ringhttps://ask.sagemath.org/question/38324/iterating-over-quotient-ring-and-polynomial-ring/Hello
I have been studied some finite algebraic structure as follows:
P.<v> = PolynomialRing(GF(2))
R.<v> = P.quotient((v^2-v))
T.<x> = PolynomialRing(R)
R is a quotient ring with elements : 0,1,v,1+v.
I want to list all of the polynomials with degree 2. So I write:
for r in T.polynomials(of_degree=2): r
but the error is "object does not support iteration".
And also the same problem arises when I want to list the elements of R.
Is there any solution to this problem?
How can I iterate over this structure?
thank youtugbaWed, 19 Jul 2017 13:12:25 +0200https://ask.sagemath.org/question/38324/Iterating over finite structureshttps://ask.sagemath.org/question/37903/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?Jason PolakSat, 10 Jun 2017 09:33:41 +0200https://ask.sagemath.org/question/37903/