Symbolic computations in a finite field
Hallo
I am interested in symbolic computations in a file field. Working in the field GF(28) with x as a generator and a variable y, also there is a function f:GF(28)→GF(28) of which the exact definition is not given. Can sage do the following:
(x+y)28↦x+y
(x+y)26↦x26+y26
f(y)+f(y)↦0⋅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