Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Coefficient of polynomial in a Finite field

Consider the following code :-

p=104711
r=101
K=GF(p)
L.<y>=K.extension(cyclotomic_polynomial(r))
for a in range(10000,10000000):
    f=(y+1)^(a)
    L=f.list()
    if L.count(0)>1:
        print "special low support %d" %a
        for i in range(100):
            if L[i]==0:
                print i

I want the list of coefficient of f(y) but when L is a field (which it for the above stated parameters ) it is giving this error.

AttributeError:
'sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffel\
t' object has no attribute 'list'

when L is a ring it is working perfectly. Also when I try to use f.coeff() it basically consider f(y) as a constant.