# basis of hyperplane

Hallo

I am new to sage and have this problem.

Given a hyperplane $H_u \subset GF(2^{n+1})$ define by $x |-> a^8 +a$

How do I determine the basis of $H_u$ over $GF(2)$?

Regards

edit retag close merge delete

Sort by » oldest newest most voted

I do not understand how the constant map $x\mapsto a^8+a$ defines a hyperplane, but if you want to find a basis of the orthogonal hyperplane of the vector $a^8+a$, where $a$ is "the" generator of $K = GF(2^{n+1})$ viewed as a vector space over $F = GF(2)$, you can:

sage: n = 6
sage: K = GF(2^(n+1),'a') ; K
Finite Field in a of size 2^7
sage: a = K.gen()
sage: F = K.base() ; F
Finite Field of size 2
sage: V = K.vector_space() ; V
Vector space of dimension 7 over Finite Field of size 2
sage: v = V(a^8 + a) ; v
(0, 0, 1, 0, 0, 0, 0)
sage: m = matrix(v) ; m
[0 0 1 0 0 0 0]
sage: m.right_kernel().basis()
[
(1, 0, 0, 0, 0, 0, 0),
(0, 1, 0, 0, 0, 0, 0),
(0, 0, 0, 1, 0, 0, 0),
(0, 0, 0, 0, 1, 0, 0),
(0, 0, 0, 0, 0, 1, 0),
(0, 0, 0, 0, 0, 0, 1)
]

more

@tmonteil, thanx the map was suppose to be $x\mapsto x\cdot a^8 + x^8 \cdot a$. By adding the code f = lambda x: x * a^8 + a * x^8 S = V.subspace([f(x) for x in K]) S.basis() I got a solution. What will the most effective method to create a map (isomorphism) from $S$ to $GF(2^n)$?

( 2013-07-21 18:26:43 +0200 )edit

Well, S.basis_matrix().transpose() defines an isomorphism between $GF(2^n)$ to $S$, so you can start from this an make compositions with other matrices.

( 2013-07-22 18:17:51 +0200 )edit