Ask Your Question
1

Relative finite field extension and element computations

asked 2016-11-18 10:19:10 +0100

Johan gravatar image

updated 2019-08-29 18:24:44 +0100

FrédéricC gravatar image

Hallo

I want to perform finite field multiplication in by using operation in one of its sub fields.

f4 = GF(4, 'x')
f16 =  GF(16, 'y')
ff = RelativeFiniteFieldExtension(f16, f4)

Now I am stuck:

  1. How do I map element from ff to a vector over f4
  2. After performing the computation in f4 map the element back in f?

The ideal will be that the mapping to ff just concatenate two element in f4.

edit retag flag offensive close merge delete

Comments

Where does RelativeFiniteFieldExtension comes from ?

tmonteil gravatar imagetmonteil ( 2016-11-18 12:03:31 +0100 )edit

Probably from coding theory.

sage: from sage.coding.relative_finite_field_extension import RelativeFiniteFieldExtension
sage: RelativeFiniteFieldExtension
<class 'sage.coding.relative_finite_field_extension.RelativeFiniteFieldExtension'>
slelievre gravatar imageslelievre ( 2016-11-18 17:02:31 +0100 )edit

@ slelievre, Yes

Johan gravatar imageJohan ( 2016-11-21 20:49:11 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-11-18 17:13:48 +0100

slelievre gravatar image

updated 2016-11-22 09:52:26 +0100

Is this what you are looking for?

Import RelativeFiniteFieldExtension and define the fields and the relative finite field extension.

sage: from sage.coding.relative_finite_field_extension import RelativeFiniteFieldExtension
sage: f4 = GF(4, 'x')
sage: f16 = GF(16, 'y')
sage: ff = RelativeFiniteFieldExtension(f16, f4)
sage: ff.embedding()
Ring morphism:
  From: Finite Field in x of size 2^2
  To:   Finite Field in y of size 2^4
  Defn: x |--> y^2 + y

Apply to a vector.

sage: V = VectorSpace(f4, 2)
sage: v = V.random_element(); v
(x, x + 1)
sage: v.apply_map(ff.embedding())
(y^2 + y, y^2 + y + 1)

Edit: the absolute_field_representation and relative_field_reprensentation methods may be what you are looking for.

They are documented here:

Following and expanding the examples from the documentation and adapting to your notation.

sage: from sage.coding.relative_finite_field_extension import RelativeFiniteFieldExtension
sage: f4.<x> = GF(4)
sage: f16.<y> = GF(16)
sage: ff = RelativeFiniteFieldExtension(f16, f4)
sage: b = y^3 + y^2 + y + 1
sage: bb = ff.relative_field_representation(b)
sage: bb
(1, x + 1)
sage: bb.parent()
Vector space of dimension 2 over Finite Field in x of size 2^2
sage: ff.absolute_field_representation(bb)
y^3 + y^2 + y + 1

sage: V = VectorSpace(f4, 2)
sage: cc = V((x, x+1))
sage: cc
(x, x + 1)
sage: c = ff.absolute_field_representation(cc)
sage: c
y^3
sage: c.parent()
Finite Field in y of size 2^4
sage: ff.relative_field_representation(c)
sage: ff.relative_field_representation(c)
(x, x + 1)

This shows the isomorphism you want, going both ways.

edit flag offensive delete link more

Comments

Almost, v.apply_map(ff.embedding()) give an element in VectorSpace(f16,2). I want an element in f16, an isomorphism from VectorSpace(f4,2) to VectorSpace(f16,2). The purpose will be to verify an implementation of a finite field (f16) using a subfield (f4) for its computations.

Johan gravatar imageJohan ( 2016-11-21 20:53:53 +0100 )edit

I edited my answer with isomorphisms going both ways between VectorSpace(f4, 2) and f16.

slelievre gravatar imageslelievre ( 2016-11-22 09:53:57 +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

1 follower

Stats

Asked: 2016-11-18 10:19:10 +0100

Seen: 855 times

Last updated: Nov 22 '16