Ask Your Question

barbules's profile - activity

2013-07-02 21:41:11 -0500 received badge  Supporter (source)
2013-06-17 09:37:43 -0500 received badge  Necromancer (source)
2013-06-17 08:48:18 -0500 received badge  Teacher (source)
2013-06-17 05:58:09 -0500 answered a question Functionality for elliptic curves over number fields

I reported it on sage trac.

this is trac ticket #14758

2013-06-17 05:18:48 -0500 answered a question why this algorithm does not work?

The problem is change_ring(). You must give the new ring of the coefficients instead of the new ring of f. The code below works.

def roots(f, q): # return list of roots of f in finite field of q elements K = GF(q) r = [ ] g = f.change_ring(K) for a in K: if g(a) == 0: r.append(a) return r

"""EXAMPLE R.<x>=QQ['x'] roots(2*x+1,7) """