Ask Your Question
1

Roots of Polynomials over finite Fields

asked 2018-09-23 20:17:59 +0100

ZacariasSatrustegui gravatar image

updated 2019-08-26 20:58:21 +0100

FrédéricC gravatar image

Hi guys,

How can I define all polynomial as this form -> a*x^2+b*y-1 over QQ where a and b are constants. for examples polynomials as : 2*x^2+3*y-1 or 5*x^2+y-1 , ... I know that I have to create a PolynomialRing, but I don't understand how exactly.

Thank you so much.

edit retag flag offensive close merge delete

Comments

What do you want to do with that set, apart from just "definiing" it ?

tmonteil gravatar imagetmonteil ( 2018-09-24 21:14:30 +0100 )edit

The title of your question says "roots of polynomials over finite fields", while the body of your question asks about creating polynomials over QQ. Could you explain the relationship?

slelievre gravatar imageslelievre ( 2018-09-25 12:15:43 +0100 )edit

I want to do the addition of 2 points of this equations (a point of this equation is a P=[x,y] such that f(P)=0) The addition for example would be -> [x1+x2, y1,y2]

ZacariasSatrustegui gravatar imageZacariasSatrustegui ( 2018-09-25 18:28:07 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-09-25 12:19:41 +0100

slelievre gravatar image

It seems you want to create a function to create polynomials of degree two, in two variables $x$, $y$, of the form $a x^2 + b y - 1$.

The function would take $a$ and $b$ as arguments and return the polynomial above.

You could define the polynomial ring in $x$ and $y$ over $\mathbb{Q}$ as

R = PolynomialRing(QQ, ['x', 'y'])
x, y = R.gens()

and then define a function that takes $a$ and $b$ and outputs $a x^2 + b y - 1$:

def degree_two_polynomial(a, b):
    return a*x^2 + b*y - 1

which you could use as follows:

sage: degree_two_polynomial(2, 3)
2*x^2 + 3*y - 1
sage: degree_two_polynomial(5, 1)
5*x^2 + y - 1
edit flag offensive delete link more

Comments

I think that I understood your answer but, in your case, Why do you define R If you don't use it afterwards? Thank you so much

ZacariasSatrustegui gravatar imageZacariasSatrustegui ( 2018-09-25 18:24:04 +0100 )edit

Sure, you could replace the first two lines by

x, y = PolynomialRing(QQ, ['x', 'y']).gens()
slelievre gravatar imageslelievre ( 2018-09-26 09:33:48 +0100 )edit

I want to do the addition of 2 points of this equations (a point of this equation is a P=[x,y] such that f(P)=0) The addition for example would be -> [x1+x2, y1,y2], do you know how?

ZacariasSatrustegui gravatar imageZacariasSatrustegui ( 2018-09-26 09:47:13 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-09-23 20:17:59 +0100

Seen: 613 times

Last updated: Sep 25 '18