Ask Your Question
0

how to run fraction elenment in Multivariate Polynomial Ring in over Finite Field ring

asked 2013-12-12 03:34:24 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2013-12-13 06:54:28 +0100

John Cremona gravatar image

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).

edit flag offensive delete link more
1

answered 2013-12-12 03:48:23 +0100

lftabera gravatar image

Please format your question, it is almost impossible to guess what your question is.

to me, it seems that you have defined the fraction field but have not defined the "variables". You should do

F.<x,y>=Frac(k['x,y'])

or

F=Frac(k['x,y']) x,y=F.gens()

edit flag offensive delete link more
0

answered 2013-12-15 03:24:30 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

thank you very much!I try it!OK!

k=GF(27, 'a');a=k.gen();F=Frac(k['x','y']);x,y = F.gens()

F(y)/F(y^2+3);F(y)/(y^2+3);F(y-x^3)/F(y^2+3+x)

1/y 1/y (-x^3 + y)/(y^2 + x)

edit flag offensive delete link more
0

answered 2013-12-12 06:26:10 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

sorry,I try 3 times to format it ,but still blue,I donot know why,I copy it to save as a .txt file,but copy back still bule......

below "y" cannot run

k. = GF(27);k;k.list();(k.prime_subfield()).list()

F=Frac(k['x,y']);F;F(3x/4);F(7x/2-3);F(y)/F(y^2+3)

NameError: name 'y' is not defined

edit flag offensive delete link more

Comments

1

To format a piece of code, add 4 spaces before each line. Alternatively, select the code and click on the 101/010 button.

tmonteil gravatar imagetmonteil ( 2013-12-12 06:32:31 +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

Stats

Asked: 2013-12-12 03:34:24 +0100

Seen: 525 times

Last updated: Dec 15 '13