That would be a very good thing for someone to implement. As you can see from the code (which I partly wrote), hilbert_class_polynomial(D) computes numeraically all the h(D) j-invariants, i.e. it uses the co-called complex method. For your use that it not optimal!
There is also access to the equivalent pari function: sage: hilbert_class_polynomial(-23) x^3 + 3491750*x^2 - 5151296875*x + 12771880859375 sage: pari(-23).quadhilbert() x^3 - x^2 + 1 where you will observe that pari has given a simpler polynomial defining the same field. But I don't think that quadhilbert has a mod-p version. FInally, in case it is useful there is a function super_singular_j_polynomial(), not by default in the global namespace: sage: from sage.schemes.elliptic_curves.ell_finite_field import supersingular_j_polynomial sage: supersingular_j_polynomial? Definition: supersingular_j_polynomial(p) Docstring: Return a polynomial whose roots are the supersingular j-invariants in characteristic p, other than 0, 1728. INPUT: * p (integer) -- a prime number. ALGORITHM: First compute H(X) whose roots are the Legendre lambda-invariants of supersingular curves (Silverman V.4.1(b)) in charactersitic p. Then, using a resultant computation with the polynomial relating lambda and j (Silverman III.1.7(b)), we recover the polynomial (in variable ``j``) whose roots are the j-invariants. Factors of j and j-1728 are removed if present. sage: supersingular_j_polynomial(next_prime(1000)) j^84 + 60*j^83 + 429*j^82 + j^81 + 381*j^80 + 669*j^79 + 311*j^78 + 586*j^77 + 419*j^76 + 348*j^75 + 898*j^74 + 994*j^73 + 683*j^72 + 150*j^71 + 354*j^70 + 233*j^69 + 729*j^68 + 520*j^67 + 511*j^66 + 216*j^65 + 635*j^64 + 807*j^63 + 815*j^62 + 402*j^61 + 197*j^60 + 644*j^59 + 234*j^58 + 521*j^57 + 752*j^56 + 954*j^55 + 331*j^54 + 457*j^53 + 66*j^52 + 957*j^51 + 708*j^50 + 140*j^49 + 393*j^48 + 792*j^47 + 252*j^46 + 687*j^45 + 643*j^44 + 23*j^43 + 379*j^42 + 232*j^41 + 159*j^40 + 631*j^39 + 46*j^38 + 692*j^37 + 837*j^36 + 605*j^35 + 546*j^34 + 696*j^33 + 802*j^32 + 834*j^31 + 394*j^30 + 172*j^29 + 191*j^28 + 730*j^27 + 373*j^26 + 118*j^25 + 622*j^24 + 727*j^23 + 345*j^22 + 830*j^21 + 807*j^20 + 530*j^19 + 2*j^18 + 956*j^17 + 739*j^16 + 838*j^15 + 435*j^14 + 355*j^13 + 763*j^12 + 350*j^11 + 848*j^10 + 46*j^9 + 411*j^8 + 122*j^7 + 11*j^6 + 429*j^5 + 382*j^4 + 223*j^3 + 282*j^2 + 894*j + 43 John Cremona PS I CC'd sage-nt which is perhaps a better forum for more discussion on this. On Wed, Nov 3, 2010 at 2:48 PM, G Hahn <gh...@cantab.net> wrote: > Hi, > > in order to get a root of the hilbert class polynomial mod p (p prime, > D a fundamental discriminant), I am currently using the code lines > > S = hilbert_class_polynomial(D); > j = S.roots(GF(p))[0][0]; > > Is there a (fast) way to compute the hilbert class polynomial directly > mod p in SAGE (thus avoiding the large coefficients computed by > hilbert_class_polynomial(D); ) ? > Thanks, > Georg > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org