2021-03-14 12:13:49 +0200 received badge ● Notable Question (source) 2021-01-19 01:08:14 +0200 received badge ● Famous Question (source) 2020-08-24 23:01:56 +0200 marked best answer Factoring a polynomial over a finite Field Hello I'm following a 101 algebra course, and for example, I would like to factor a polynomial on a finite field like F_9 (F_9 == ZZ/9ZZ is a field because 9 is a power of a prime number, 3) R = PolynomialRing(GF(9),'x') x = R.gen() f = x^4+x^2-1 f in R f.factor()  i get an error message Traceback (most recent call last): File "", line 1, in File "_sage_input_68.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("UiA9IFBvbHlub21pYWxSaW5nKEdGKDkpLCd4JykKeCA9IFIuZ2VuKCkKZiA9IHheNCt4XjItMQpmIGluIFI="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpYgKq_W/___code___.py", line 3, in R = PolynomialRing(GF(_sage_const_9 ),'x') File "factory.pyx", line 364, in sage.structure.factory.UniqueFactory.__call__ (build/cythonized/sage/structure/factory.c:1244) File "/home/sage/sage-6.3/local/lib/python2.7/site-packages/sage/rings/finite_rings/constructor.py", line 414, in create_key_and_extra_args raise ValueError("parameter 'conway' is required if no name given") ValueError: parameter 'conway' is required if no name given  i'm running sage 6.3 notebook on windows through Oracle VM winbox. I'm a totally new user, and i've looked at the tutorial and the forum but couldn't find any example or reason why this would not work. thank you for your help. 2020-08-24 23:01:53 +0200 received badge ● Nice Question (source) 2020-06-26 05:00:00 +0200 asked a question SageMath: defining class of functions on Elliptic Curves In SageMath, I would like to manipulate rational functions on elliptic curves (defined on finite fields). For example, for $P = (x,y)$ on some curve $E$ $$f = x+y-12$$ $$g = \frac{x+y-3}{(x-3)^2}$$ etc. Is there a natural class? I am looking to make a toy example with pairings, so I need to define stuff like $$P \rightarrow f_P$$ where $$f_P:Q \rightarrow f_P(Q)$$ is a function I can't see how to do that, and I'm able to make computations if I define def f (P,Q): ....  but I can only compute the values taken by the function $f_P$, I cannot "see" the function $f_P$. Basically I'm trying as an exercise to re-write the following Magma code to SageMath: http://www.craigcostello.com.au/pairi... EDIT My question hasn't attracted much interest so let me give a more concrete example. Define the following: # Code related to the example in Costello q = 47 F = GF(q) R. = F[] F4. = F.extension(x^4 - 4*x^2 + 5) a = 21 b = 15 E = EllipticCurve(F4, [a, b]) r = 17 k = 4 (q^4 - 1) % r # r = 17 divides q^4 - 1 = 47^4 - 1 P = E([45, 23]) P.order() h = E.cardinality() / r^2 O = E(0) Q = E([5*u^3 + 37*u + 13, 7*u^3 + 45*u^2 + 10*u + 7]) def fADD_(P, Q, x, y): lamda = (Q[1] - P[1]) / (Q[0] - P[0]) c = P[1] - lamda * P[0] l = (y - (lamda * x + c)) v = (x - (lamda^2 - P[0] - P[1])) return l / v  I would have hoped for fADD_(P, Q, x, y) to return a rational function in x, y. Instead it raises the following error: --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:9946)() 1195 try: -> 1196 action = self._action_maps.get(xp, yp, op) 1197 except KeyError: /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/structure/coerce_dict.pyx in sage.structure.coerce_dict.TripleDict.get (build/cythonized/sage/structure/coerce_dict.c:7917)() 1327 if not valid(cursor.key_id1): -> 1328 raise KeyError((k1, k2, k3)) 1329 value =