I would like to solve a system of equations for $a_0,a_1,a_2,a_3$ $(a_0,a_1,a_2,a_3)$
in a finite field of prime order prime $p$ (here $p=229$) in the form :
$a_0+a_1\alpha_1+a_2\alpha_1^2+a_3:
$$a_0 + a_1 \alpha_1 + a_2 \alpha_1^2 + a_3 \alpha_1^3 = b_1$,
$a_0+a_1\alpha_2+a_2\alpha_2^2+a_3b_1$$
$$a_0 + a_1 \alpha_2 + a_2 \alpha_2^2 + a_3 \alpha_2^3 = b_2$,
$a_0+a_1\alpha_3+a_2\alpha_3^2+a_3b_2$$
$$a_0 + a_1 \alpha_3 + a_2 \alpha_3^2 + a_3 \alpha_3^3 = b_3$,
$a_0+a_1\alpha_4+a_2\alpha_4^2+a_3\alpha_4^3= b_4$, b_3$$
$$a_0 + a_1 \alpha_4 + a_2 \alpha_4^2 + a_3 \alpha_4^3 = b_4$$
where $\alpha_i,b_i\in F(p), i=1234$.
$\alpha_i$, $b_i\in F(p)$, $i = 1, 2, 3, 4$.
To do this I have tried with the following examples:
pm=229
bp=229
var('x')
pm = 229
bp = 229
F.<x> = GF(pm,impl='givaro')
R.<a0,a1,a2,a3> GF(pm, impl='givaro')
R.<a0, a1, a2, a3> = PolynomialRing(F)
def NP(a):
return F(ZZ(a).digits(bp)) # integer to polynomial
eqns = [a0+a1*NP(2)+a2*NP(2)^2+a3*NP(2)^3 [a0 + a1*NP(2) + a2*NP(2)^2 + a3*NP(2)^3 - NP(78), a0+a1*NP(3)+a2*NP(3)^2+a3*NP(3)^3 NP(78),
a0 + a1*NP(3) + a2*NP(3)^2 + a3*NP(3)^3 - NP(136),a0+a1*NP(4)+a2*NP(4)^2+a3*NP(4)^3 NP(136),
a0 + a1*NP(4) + a2*NP(4)^2 + a3*NP(4)^3 - NP(179),a0+a1*NP(5)+a2*NP(5)^2+a3*NP(5)^3 NP(179),
a0 + a1*NP(5) + a2*NP(5)^2 + a3*NP(5)^3 - NP(166)]
A = matrix(F, [[eqn.coefficient(b) for b in R.gens()] for eqn in eqns])
b = vector(F, [-eqn.constant_coefficient() for eqn in eqns])
X=A.solve_right(b)
print X
X = A.solve_right(b)
print(X)
But it shows erros: erros:
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
/usr/share/sagemath/bin/sage-python: line 2: 7655 Segmentation fault (core dumped) sage -python "$@"
How can I fix this?