# Revision history [back]

### Create Morphism's between Finite Fields and VectorSpaces

Hallo,

I am interested in creating morphims between $GF(2^{n+1}) \stackrel{h_1}{\longrightarrow} H_u \stackrel{h_2}\longrightarrow GF(2^n)$ where $H_u={x^{2^i} + x : x \in GF(2^{n+1})}$ where $gcd(i,n+1) =1$. I am interested in constructing $h_1$ and $h_2$,

My attempt to create $h_1$ is:


n = 4
i = 1
f = lambda x : x^(2^i) + x
Kn_1 = GF(2^(n+1),'x')
H_u = map(f, Kn_1)
hs = Hom(Kn_1,H_u)
pi = SetMorphism(Hom(Kn_1,Kn), lambda y : y^(2^i) + y)
pi(Kn_1.random_element()) in Kn
 

now $hs$ is a set of morphism and $h_1 \in hs$. Can I get a (the) specific $h_1$ from $hs$? My attempt is $pi$ but 'pi(Kn_1.random_element()) in Kn' fails.

To construct $h_2$ I have more success.


n = 4
i = 2
f = lambda x: x^(2^i) + x

Kn_1 = GF(2^(n+1),'x1')
Vn_1 = Kn_1.vector_space()
Sn_1 = Vn_1.subspace([Vn_1(f(u)) for u in Kn_1])

Kn = GF(2^n,'x')
Vn = Kn.vector_space()

h_a = Sn_1.basis_matrix().transpose()
 

Now $h_a : Vn\rightarrow Sn_1$ where $Vn$ and $Sn_1$ is vector space representation of $GF(2^n)$ and $H_u$. To get from $GF(2^n)$ to $Vn$ and back I am good with But to create $h_2$ I have no luck. My attempts to use


MatrixMorphism(Hom(Vn,Sn_1), Sn_1.basis_matrix().transpose())
 

but get errors with regards to the dimensions of the matrix.

Regards