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

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 close merge delete

1

PolynomialRing does not help (and is the answer)?

( 2017-05-08 22:41:53 +0200 )edit

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

( 2017-05-09 11:38:40 +0200 )edit

Sort by » oldest newest most voted

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?

more

I am trying the following:

R0.<y1,y2,y3>=ZZ[]
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

( 2017-05-09 11:53:03 +0200 )edit

I think I found a workaround:

def yesitis(proof=False):
return True
R2.is_field = yesitis
Rx.<x3> = R2[]

( 2017-05-09 13:11:17 +0200 )edit