Hi Santanu,
I am sorry that your question was unanswered for so long.
Here, Singular (or libsingular) can help. Singular provides the method
"lift". You are working in ZZ/8[x], which is a quotient of ZZ[x]. Hence,
your relation ideal has the two generators 1+x+x^2+2x^3 and 8.
A slight complication: The default implementation of ZZ[x] does not use
Singular. Hence, below I implicitly force using singular by defining a
*multivariate* polynomial ring over ZZ:
sage: R.<x,y> = ZZ[]
sage: I = [1+x+x^2+2*x^3, 8]*R
And then you can check containment in a straight forward way:
sage: 6*x^2 + 6*x + 2 in I
True
sage: x+4 in I
False
So, it should be possible to express 6*x^2+6*x+2 in terms of 8 and
1+x+x^2+2*x^3. Indeed, using Singular's lift, we obtain this:
sage: from sage.libs.singular.function import singular_function
sage: lift = singular_function('lift')
sage: L = lift(I, 6*x^2 + 6*x + 2); L
[24*x^2 - 12*x - 6]
[ -6*x^5 + 3*x + 1]
sage: L[0]*I.0+L[1]*I.1
(6*x^2 + 6*x + 2)
sage: lift(I, x+4)
Traceback (most recent call last):
...
RuntimeError: error in Singular function call 'lift':
2nd module does not lie in the first
Best regards,
Simon