Gapplet

Given a prime p and a polynomial d in Z/pZ[X], we can work in the residue class ring S Z/pZ[X]/(d). When given f, a polynomial in Z/pZ[X], we compute its inverse in S.

Input a prime number p 
</COMMENT>
Input d
e.g., X^5-3*X-1
</COMMENT>
Input f
e.g., 3*X^2-1
</COMMENT>
 
 
Find the inverse of f in S 
</COMMENT>
 
</COMMENT>