2024-05-02 14:25:57 +0200 received badge ● Popular Question (source) 2023-12-03 16:40:57 +0200 received badge ● Famous Question (source) 2022-12-08 23:17:25 +0200 marked best answer Find the minimal polynomial of an element over a finite field Let GF(q) be a finite field over GF(p), p prime. I want to find a primitive element gamma of G(q) and then find the minimal polynomial of gamma^j over GF(p), j an integer. Is there a default way to do this? 2022-12-08 20:02:38 +0200 asked a question Find the minimal polynomial of an element over a finite field Find the minimal polynomial of an element over a finite field Let GF(q) be a finite field over GF(p), p prime. I want to 2022-08-30 11:38:40 +0200 received badge ● Popular Question (source) 2022-05-18 14:53:46 +0200 received badge ● Notable Question (source) 2022-05-18 14:53:46 +0200 received badge ● Popular Question (source) 2022-04-16 02:22:58 +0200 received badge ● Notable Question (source) 2021-06-03 12:01:12 +0200 received badge ● Popular Question (source) 2021-05-18 20:55:13 +0200 received badge ● Notable Question (source) 2020-12-14 12:50:57 +0200 received badge ● Popular Question (source) 2020-05-27 23:21:45 +0200 asked a question How to make objects execute their operations in a specific field/ring? Providing some context: i want to create a class to operate on isogeny graphs of elliptic curves. So it should have the $j$-invariants (integers modulo $p$) as nodes and the existence of $l$-isogenies as edges. To compute the edges i need to do some calculations on GF(p) and some others on the ring PolynomialRing(GF(p), ['X', 'Y']). How do i make sure the operations happen on their specific rings and don't change the field outside of the class? 2020-05-26 23:51:36 +0200 received badge ● Supporter (source) 2020-05-26 18:35:20 +0200 received badge ● Student (source) 2020-05-26 18:23:29 +0200 asked a question How do i solve a 2 variable polynomial over 1 variable So i have a polynomial over 2 variables: R. = GF(8009)[] Phi = -X^2*Y^2 + X^3 + 1488*X^2*Y + 1488*X*Y^2 + Y^3 \ - 162000*X^2 + 40773375*X*Y - 162000*Y^2 \ + 8748000000*X + 8748000000*Y - 157464000000000  I want to know for what Y values the polynomial has a solution with X = 33. I've tried using the solve method: Phi(33, Y).roots(Y)  But this yields the error AttributeError: 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular' object has no attribute 'roots'  I also tried the following: Phi(33).roots()  It yields the error TypeError: number of arguments does not match number of variables in parent  So what is the correct way to do this? 2020-02-12 01:11:26 +0200 received badge ● Scholar (source) 2020-02-12 00:00:22 +0200 asked a question How to rewrite multivariate polynomial as polynomial on one variable? Suppose i have declared many varibles and a polynomial using them x, y, z = var("x y z") poly = x^3*y*z + x^2*y^2 + 3*x^3 + 2*x^2 + x*y + x*z + 1  How can i simplify the expression is such a way that it is written as a polynomial over x? I mean something like (...)*x^3 + (...)*x^2 + (...)*x +...  2020-02-03 01:30:21 +0200 asked a question Apply relation on function/polynomial So i have the following functions: a,b,c,x,y,p,q,r,s = var("a b c x y p q r s") g(x,y) = a*x^2 + b*x*y + c*y^2 f(x,y) = f(x,y) = g(p*x + q*y, r*x + s*y) #p * s - q * r = 1  I calculated the discriminant of the binary form f valueA, valueC = f(1,0),f(0,1) valueB = f(1,1) - valueA - valueC D = valueB^2 - 4 * valueA * valueC  I obtain a lengthy expression: D = b^2*q^2*r^2 - 4*a*c*q^2*r^2 - 2*b^2*p*q*r*s + 8*a*c*p*q*r*s + b^2*p^2*s^2 - 4*a*c*p^2*s^2  If i apply the relation p * s - q * r = 1 i should obtain D = ( p * s - q * r )^2 * (b^2 - 4 * a *c). The thing is, i don't know how to apply it in a way that makes it simplify like that. I tried calling simplify and full_simplify on D/(p * s - q * r - 1) but it didn't simplify this neatly. Also using substitute ({p : (1 + q * r) /s}) isn't enough. 2020-01-22 00:26:08 +0200 asked a question How to better plot elliptic curves over finite fields? I'm trying to get an elliptic curve plot, but the points are too thick and the resolution too low. This makes the points stick together in a mess. The following code E = EllipticCurve(GF(next_prime(20000)),[0,1]) E.plot()  results in this image(https:// imgur.com/a/aMFpFXN). How can i make the points less thick/the resolution bigger? 2019-10-15 02:29:08 +0200 commented answer Converting expression into a number and evaluating function Thanks, it works. 2019-10-12 04:18:44 +0200 asked a question Converting expression into a number and evaluating function I was trying to use a lagrange multiplier to find the local maxima of a simple function over the circle: x,y,c = var('x y c') f(x,y) = x**2 + y**2 - 1 g(x,y) = x+y F = diff(f) G = diff(g) polys = [f] for i in range(len(F)): p = F[i] - c * G[i] polys.append(p) list_solutions = solve(polys,x,y,c) for solution in list_solutions: print solution print f({x : solution[0] , y : solution[1]}) print '\n'  At 'print solution' i get the first extremum: [x == 1/2*sqrt(2), y == 1/2*sqrt(2), c == sqrt(2)]  But at the 'print f({x : solution[0] , y : solution[1]})' line the following error occurs: TypeError: no canonical coercion from to Callable function ring with arguments (x, y)  So i guess x == 1/2*sqrt(2) and the like can't be seem as numbers. I would like to be able to evaluate f(x,y) at the point, so what can i do? Also, the lagrange multiplier algorithm must be on Sage already, but Google gives me nothing. If you can show its command that would be a plus. 2019-10-11 00:53:12 +0200 received badge ● Editor (source) 2019-10-10 22:17:50 +0200 asked a question Inverse of the transition map on a Manifold doesn't hold I was trying to represent S³ as a three dimensional manifold, with coordinates (x,y,z,w) in R⁴, and make the transition map from the upper cap w > 0 to the lateral cap z<0, with the charts being the graphs of the caps as functions. I came up with the following code: M = Manifold(3, 'S^3') N = M.open_subset('N') projN. = N.chart() E = M.open_subset('E') projE. = E.chart() ProjNE = projN.transition_map(projE, [x,y, sqrt(1-x^2-y^2-z^2)], intersection_name='D', restrictions1= z < 0, restrictions2= w>0)  It sounds reasonable, but calling ProjNE.inverse()  failed. No problem, i tried using ProjNE.set_inverse(x,y, -sqrt(1-x^2-y^2-w^2))  but i got the following warning: Check of the inverse coordinate transformation: x == x *passed* y == y *passed* z == -abs(z) **failed** x == x *passed* y == y *passed* w == abs(w) **failed** NB: a failed report can reflect a mere lack of simplification.  i don't know why the test is failing. The math sounds ok, where did it go wrong?