Ask Your Question

Is there a way to create the ring of multi-variable polynomials over a field?

asked 2017-05-08 14:24:23 -0500

Anton Mellit gravatar image

updated 2017-05-09 09:32:08 -0500

Suppose I create a field in SAGE. Maybe it is my own field implemented in some particular way, but I know it is a field and it can do all the operations. Is there any way at all to create a ring of polynomials in several variables over my field? Of course it might be less efficient than SINGULAR implementation, but still some fall back "toy" implementation would be nice, so that I can run the "toy" Groebner basis algorithm on it.

UPDATE: it turns out, the question should have been formulated as "how to make SAGE believe that my field is a field?". Once this is solved, the usual PolynomialRing function works as expected.

edit retag flag offensive close merge delete



PolynomialRing does not help (and is the answer)?

dan_fulea gravatar imagedan_fulea ( 2017-05-08 15:41:53 -0500 )edit

By the way, if you have a nice implementation of some interesting field, please consider contributing it to Sage !

tmonteil gravatar imagetmonteil ( 2017-05-09 04:38:40 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-09 04:12:32 -0500

B r u n o gravatar image

As mentioned, PolynomialRing should work with your field.

Note though that the fact that you know it is a field is not the same as SageMath knows it is a field. And the second case is much more interesting of course, since then SageMath will provide you generic implementations for multivariate polynomial rings over fields (such as the "toy" Groebner basis algorithm).

To learn how to create some algebraic structure (with SageMath knowing its nature), you may begin with the thematic tutorial: How to implement new algebraic structures in Sage?

edit flag offensive delete link more


I am trying the following:

R0F = R0.fraction_field()
Rx.<x1> = R0F[]
R1.<x1> = R0F.extension(x1^2-y1^3-1)
Rx.<x2> = R1[]
R2.<x2> = R1.extension(x2^2-y2^3-1)
Rx.<x3> = R2[]

The last command gives me NotImplementedError

Anton Mellit gravatar imageAnton Mellit ( 2017-05-09 04:53:03 -0500 )edit

I think I found a workaround:

def yesitis(proof=False):
    return True
R2.is_field = yesitis
Rx.<x3> = R2[]
Anton Mellit gravatar imageAnton Mellit ( 2017-05-09 06:11:17 -0500 )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


Asked: 2017-05-08 14:24:23 -0500

Seen: 52 times

Last updated: May 09