subfields in finite fields

Hello! I have another problem with finitefields. I create a field, for example, GF(103^2) and later I use an element from it, which will be also an element of the subfield GF(103), i.e. a=99 is an element of both GF(103) and GF(103^2). But then the program doesn't convert "a" to an element of GF(103)... Do you know a method for this?

edit retag close merge delete

can you update your question with a sample of the code you're using (and what fails to work)?

( 2010-12-06 09:01:57 +0100 )edit

Sort by » oldest newest most voted

Sage does not try to automatically put elements in the smallest subfield that they belong to. You need to do that explicitly. You can use something like the line g = P(f) below which converts an element f from GF(103^2) to an element g of GF(103) :

sage: R.<a> = GF(103^2)
sage: P.<b> = GF(103)
sage: sage: f = R(99); f
99
sage: f.parent()
Finite Field in a of size 103^2
sage: g = P(f); g
99
sage: g.parent()
Finite Field of size 103

more

Stats

Seen: 966 times

Last updated: Dec 06 '10