# Revision history [back]

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8-1} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

Regards

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8-1} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

If sage cannot do it does there exist another program which can?

Regards

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8-1} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

If sage cannot do it does there exist another program which can?

Below is my question updated:

For the function I have a partial solution but I cannot mix it with an element of an finite field


import sympy
f = sympy.Function('f')
y = var('y')
sympy.expand((f(y)+f(y)), modulus=2)
 

When I want to add an element of a finite field


import sympy
f = sympy.Function('f')
x = GF(2^8,'x').gen()
f(x)
f(x) + x
 

the statement $f(x) +x$ give me an error that makes sense ... TypeError: unsupported operand parent(s) for '+': 'f' and 'Finite Field in g of size 2^8'

To create a variable in a finite field I decided to use a Polynomial ring


import sympy
f = sympy.Function('f')
R.< x > = PolynomialRing(GF(2))
f(x)
f(x) + x
 

both $f(x)$ and $f(x) + x$ fails with a very long Trace message.

Regards

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8-1} {2^8} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

If sage cannot do it does there exist another program which can?

Below is my question updated:

For the function I have a partial solution but I cannot mix it with an element of an finite field


import sympy
f = sympy.Function('f')
y = var('y')
sympy.expand((f(y)+f(y)), modulus=2)
 

When I want to add an element of a finite field


import sympy
f = sympy.Function('f')
x = GF(2^8,'x').gen()
f(x)
f(x) + x
 

the statement $f(x) +x$ give me an error that makes sense ... TypeError: unsupported operand parent(s) for '+': 'f' and 'Finite Field in g of size 2^8'

To create a variable in a finite field I decided to use a Polynomial ring


import sympy
f = sympy.Function('f')
R.< x > = PolynomialRing(GF(2))
f(x)
f(x) + x
 

both $f(x)$ and $f(x) + x$ fails with a very long Trace message.

Regards

 5 None FrédéricC 2604 ●3 ●29 ●54

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

If sage cannot do it does there exist another program which can?

Below is my question updated:

For the function I have a partial solution but I cannot mix it with an element of an finite field


import sympy
f = sympy.Function('f')
y = var('y')
sympy.expand((f(y)+f(y)), modulus=2)
 

When I want to add an element of a finite field


import sympy
f = sympy.Function('f')
x = GF(2^8,'x').gen()
f(x)
f(x) + x
 

the statement $f(x) +x$ give me an error that makes sense ... TypeError: unsupported operand parent(s) for '+': 'f' and 'Finite Field in g of size 2^8'

To create a variable in a finite field I decided to use a Polynomial ring


import sympy
f = sympy.Function('f')
R.< x > = PolynomialRing(GF(2))
f(x)
f(x) + x
 

both $f(x)$ and $f(x) + x$ fails with a very long Trace message.

Regards

 6 None FrédéricC 2604 ●3 ●29 ●54

### Symbolic computions in a finite field

Hallo

I am interested in symbolic computations in a file field. Working in the field $GF(2^8)$ with $x$ as a generator and a variable $y$, also there is a function $f:GF(2^8)\rightarrow GF(2^8)$ of which the exact definition is not given. Can sage do the following:

$(x + y) ^ {2^8} \mapsto x + y$

$(x + y) ^ {2^6} \mapsto x ^ {2^6} + y ^ {2^6}$

$f(y) + f(y) \mapsto 0\cdot x$

If sage cannot do it does there exist another program which can?

Below is my question updated:

For the function I have a partial solution but I cannot mix it with an element of an finite field


import sympy
f = sympy.Function('f')
y = var('y')
sympy.expand((f(y)+f(y)), modulus=2)
 

When I want to add an element of a finite field


import sympy
f = sympy.Function('f')
x = GF(2^8,'x').gen()
f(x)
f(x) + x
 

the statement $f(x) +x$ give me an error that makes sense ... TypeError: unsupported operand parent(s) for '+': 'f' and 'Finite Field in g of size 2^8'

To create a variable in a finite field I decided to use a Polynomial ring


import sympy
f = sympy.Function('f')
R.< x > = PolynomialRing(GF(2))
f(x)
f(x) + x
 

both $f(x)$ and $f(x) + x$ fails with a very long Trace message.

Regards