Le mardi 4 septembre 2012 10:40:24 UTC+2, sha2nk a écrit :
>
> k=GF(2^11);
> K=GF(2^33)
>
> How to see K as a vector space over filed k ? How to form its basis ? 
> How to construct tower of field extensions ?
>

Hi, Sadly enough non of these three things are implemented in sage yet for 
finite fields. You currently have K.vector_space() which gives K as a 
vectorspace over GF(2) but there is no method to do it over extensions of 
GF(2) .

Towers of field extensions are possible in sage, but only with numberfields 
and function fields.

sage: L=QQ.extension(cyclotomic_polynomial(5),'a')
sage: K=L.extension(cyclotomic_polynomial(3),'b')
sage: K
Number Field in b with defining polynomial x^2 + x + 1 over its base field
sage: K.absolute_degree()
8
sage: M=K.extension(cyclotomic_polynomial(7),'c')
sage: M
Number Field in c with defining polynomial x^6 + x^5 + x^4 + x^3 + x^2 + x 
+ 1 over its base field
sage: M.absolute_degree()
48
sage: M.relative_vector_space()
(Vector space of dimension 6 over Number Field in b with defining 
polynomial x^2 + x + 1 over its base field, Isomorphism map:
  From: Vector space of dimension 6 over Number Field in b with defining 
polynomial x^2 + x + 1 over its base field
  To:   Number Field in c with defining polynomial x^6 + x^5 + x^4 + x^3 + 
x^2 + x + 1 over its base field, Isomorphism map:
  From: Number Field in c with defining polynomial x^6 + x^5 + x^4 + x^3 + 
x^2 + x + 1 over its base field
  To:   Vector space of dimension 6 over Number Field in b with defining 
polynomial x^2 + x + 1 over its base field)

The best thing to do would be to look at the source code in sage that 
creates towers of numberfields and try to adopt some parts of that code so 
it can be used for more general fields. But this would be quite a big 
project requiring you to know something about the inner workings of sage.

Another option is to hack around this missing functionality. Depending on 
what you want to do with these towers and what kind of functionality you 
need this might be relatively easy.

A small example below shows basic aritmethic and converting an element of 
GF(2^33) to a vector over GF(2^11) and back:

sage: K.<b>=GF(2^3)
sage: L.<a>=GF(2^11)
sage: R.<c>=L.extension(b.minpoly())
sage: v=vector(((a*c+a^2)^200).list())
sage: v
(a^10 + a^5 + a^4 + 1, a^10 + a^6 + a^4 + a^3 + a^2 + a + 1, a^10 + a^8 + 
a^7 + a^6 + a^5 + a^3 + a^2)
sage: R(v.list());(a*c+a^2)^200
(a^10 + a^8 + a^7 + a^6 + a^5 + a^3 + a^2)*c^2 + (a^10 + a^6 + a^4 + a^3 + 
a^2 + a + 1)*c + a^10 + a^5 + a^4 + 1
(a^10 + a^8 + a^7 + a^6 + a^5 + a^3 + a^2)*c^2 + (a^10 + a^6 + a^4 + a^3 + 
a^2 + a + 1)*c + a^10 + a^5 + a^4 + 1

So be creative and you will get there. Note that in the above construction 
sage doesn't really know that R is actually a finite field so it has a lot 
less functionality, but again this is stuff you can probably work around 
with using a bit of creativity.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to