Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

Roots of Polynomials over finite Fields

asked 6 years ago

ZacariasSatrustegui gravatar image

updated 5 years ago

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.

Preview: (hide)

Comments

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

tmonteil gravatar imagetmonteil ( 6 years ago )

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 ( 6 years ago )

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 ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 6 years ago

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 ax2+by1.

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 Q as

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

and then define a function that takes a and b and outputs ax2+by1:

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
Preview: (hide)
link

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 ( 6 years ago )

Sure, you could replace the first two lines by

x, y = PolynomialRing(QQ, ['x', 'y']).gens()
slelievre gravatar imageslelievre ( 6 years ago )

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 ( 6 years ago )

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: 6 years ago

Seen: 654 times

Last updated: Sep 25 '18