def Phi_polys(L, x, j): r""" Return a certain polynomial of degree `L+1` in the indeterminate x over a finite field. The roots of the **modular** polynomial `\Phi(L, x, j)` are the `L`-isogenous supersingular j-invariants of j. INPUT: - ``L`` -- integer - ``x`` -- indeterminate of a univariate polynomial ring defined over a finite field with p^2 elements, where p is a prime number - ``j`` -- supersingular j-invariant over the finite field OUTPUT: - polynomial -- defined over the finite field EXAMPLES: The following code snippet produces the modular polynomial `\Phi_{L}(x,j_{in})`, where `j_{in}` is a supersingular j-invariant defined over the finite field with `7^2` elements:: sage: F = GF(7^2, 'a') sage: X = PolynomialRing(F, 'x').gen() sage: j_in = supersingular_j(F) sage: sage.modular.ssmod.ssmod.Phi_polys(2,X,j_in) x^3 + 3*x^2 + 3*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(3,X,j_in) x^4 + 4*x^3 + 6*x^2 + 4*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(5,X,j_in) x^6 + 6*x^5 + x^4 + 6*x^3 + x^2 + 6*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(7,X,j_in) x^8 + x^7 + x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(11,X,j_in) x^12 + 5*x^11 + 3*x^10 + 3*x^9 + 5*x^8 + x^7 + x^5 + 5*x^4 + 3*x^3 + 3*x^2 + 5*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(13,X,j_in) x^14 + 2*x^7 + 1 """ r = 0 for pol in pari.polmodular(L).Vec(): r = r * x + ZZy(pol)(j) return r
def Phi_polys(L, x, j): r""" This function returns a certain polynomial of degree `L+1` in the indeterminate x over a finite field. The roots of the **modular** polynomial `\Phi(L, x, j)` are the `L`-isogenous supersingular j-invariants of j. INPUT: - ``L`` -- integer - ``x`` -- indeterminate of a univariate polynomial ring defined over a finite field with p^2 elements, where p is a prime number - ``j`` -- supersingular j-invariant over the finite field OUTPUT: - polynomial -- defined over the finite field EXAMPLES: The following code snippet produces the modular polynomial `\Phi_{L}(x,j_{in})`, where `j_{in}` is a supersingular j-invariant defined over the finite field with `7^2` elements:: sage: F = GF(7^2, 'a') sage: X = PolynomialRing(F, 'x').gen() sage: j_in = supersingular_j(F) sage: sage.modular.ssmod.ssmod.Phi_polys(2,X,j_in) x^3 + 3*x^2 + 3*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(3,X,j_in) x^4 + 4*x^3 + 6*x^2 + 4*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(5,X,j_in) x^6 + 6*x^5 + x^4 + 6*x^3 + x^2 + 6*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(7,X,j_in) x^8 + x^7 + x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(11,X,j_in) x^12 + 5*x^11 + 3*x^10 + 3*x^9 + 5*x^8 + x^7 + x^5 + 5*x^4 + 3*x^3 + 3*x^2 + 5*x + 1 sage: sage.modular.ssmod.ssmod.Phi_polys(13,X,j_in) x^14 + 2*x^7 + 1 """ r = 0 for pol in pari.polmodular(L).Vec(): r = r*x + ZZy(pol)(j) return r