Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Let's take this one step at a time. If you put lots of commands on one line then it is hard to see which one gives the error. The was to define GF(27) is

sage: k=GF(27, 'a')
sage: a=k.gen()

or more concisely

sage: k.<a>=GF(27)

Since it is not a prime field, Sage needs to know what name to give its generator, and also you need to define a variable whose value is that generator. Now

sage: F=Frac(k['xy'])
sage: F
Fraction Field of Univariate Polynomial Ring in xy over Finite Field in a of size 3^3

shows that you have defined a function field in one variable called 'xy', not in two variables. I think you meant this:

sage: F=Frac(k['x','y'])
sage: F
Fraction Field of Multivariate Polynomial Ring in x, y over Finite Field in a of size 3^3

Now for the rest of your input to work, you still need to define variables called x and y ( so far you have only told Sage to use 'x' and 'y' to output elements of F):

sage: x,y = F.gens()

Now the rest works ok -- but x/y is an element of F, there is no need to write F(x/y).