The 5-torsion of y^2+xy+y=x^3-x^2-x is regular (curve 17A4)
---------------------------------------------------------------------------------

? E=ellinit([1,-1,1,-1,0]);

? [E.disc, factor(E.j)]
%3= [17, [3, 3; 11, 3; 17, -1]]

%disc(E)=17, and j(E)=3^3.11^3/17

? ellap(E,2)
%3 = -1

%till now we know that the 5-torsion rep. of G_Q is surjective

? ellap(E,5)
%4=-2

%the curve E is ordinary at 5.

%copy the routine elldivpol0(e,n) of Cremona : 
%http://www.warwick.ac.uk/~masgaj/ftp/progs/pari/ell_divpol.gp

? p=elldivpol0(E,5)
%5 = 5*x^12 - 15*x^11 - 22*x^10 + 125*x^9 - 240*x^8 + 240*x^7 - 45*x^6 - 123*x^5 + 100*x^4 - 30*x^3 + 10*x^2 - 5*x + 1

? polredabs(p)[1]
%6 = x^12 - 10*x^10 + 35*x^8 - 60*x^6 + 55*x^4 - 43*x^2 + 5

? factorpadic(%6,5,20)
%shows that %6 = A B in Q_5[X] with A,B irreducible, A of degree 2 and B of degree 10. In particular the image of a decomposition group at 5 has order divisible by 5, hence the regularity at 5. We way also say that the 5-unit root of X^2+2X+5 has a non-trivial square mod 5.

? polcompositum(%6,x^2-5)[1]
%7 = x^24 - 80*x^22 + 2720*x^20 - 51520*x^18 + 597760*x^16 - 4401186*x^14 + 20677830*x^12 - 61581760*x^10 + 115113760*x^8 - 128058880*x^6 + 71606049*x^4 - 24804170*x^2 + 7225

? p2=polredabs(%7)   
%8 = x^24 - 6*x^23 + 7*x^22 + 46*x^21 - 199*x^20 + 214*x^19 + 616*x^18 - 2552*x^17 + 3504*x^16 + 974*x^15 - 11343*x^14 + 15633*x^13 - 826*x^12 - 13998*x^11 - 19908*x^10 + 96956*x^9 - 98316*x^8 - 84323*x^7 + 358836*x^6 - 475339*x^5 + 330616*x^4 - 95401*x^3 - 27923*x^2 + 23211*x - 359

? K=nfinit(p2);

? factor(K.disc)
%10 =  [5 24] [17 16]

?allocatemem
(do it several times)

? L=nfsubfields(K,12);

%this may take about 15 minutes. 

? polredabs(L[1][1])
%11 = x^12 - 4*x^11 - 11*x^10 + 60*x^9 - 25*x^8 - 114*x^7 - 14*x^6 + 509*x^5 - 245*x^4 - 1125*x^3 + 1124*x^2 + 294*x - 549

? polredabs(L[2][1])
%12 = x^12 - 2*x^11 - 11*x^10 + 30*x^9 + 10*x^8 - 49*x^7 - 37*x^6 + 49*x^5 + 10*x^4 - 30*x^3 - 11*x^2 + 2*x + 1

? polredabs(L[3][1])
%13 = x^12 - 10*x^10 + 35*x^8 - 60*x^6 + 55*x^4 - 43*x^2 + 5

? subst(%11,x,y)
%14= y^12 - 4*y^11 - 11*y^10 + 60*y^9 - 25*y^8 - 114*y^7 - 14*y^6 + 509*y^5 - 245*y^4 - 1125*y^3 + 1124*y^2 + 294*y - 549

? factornf(x^2-5,%14)
%something reducible

?F=bnfinit(%12);

?F.clgp
%15 = [1, [], []]

%the class group of F is trivial

? bnfcertify(F)
%16 = 1

%certify that GRH is unnecessary

Other example : the 5-torsion of y^2+y=x^3+x^2+x is regular  (curve 19A3)
----------------------------------------------------------------------------------------------------

? E=ellinit([0,1,1,1,0]);

? [E.disc, factor(E.j)]
%2 = [-19, [2, 15; 19, -1]]

? ellap(E,2)
%3 = 0

%till now we know that the 5-torsion rep. of G_Q is surjective

? ellap(E,5)
%4=3

%the curve E is ordinary at 5.

%copy the routine elldivpol0(e,n) of Cremona : 
%http://www.warwick.ac.uk/~masgaj/ftp/progs/pari/ell_divpol.gp

? p=elldivpol0(E,5)
%5 = 5*x^12 + 20*x^11 + 78*x^10 + 175*x^9 + 180*x^8 + 60*x^7 - 135*x^6 - 236*x^5 - 200*x^4 - 105*x^3 - 40*x^2 - 10*x - 1

? polredabs(p)[1]
%6 = x^12 - 2*x^11 - 4*x^10 + 25*x^9 + 30*x^8 - 36*x^7 - 33*x^6 + 104*x^5 + 120*x^4 - 55*x^3 - 128*x^2 - 64*x - 13

? factorpadic(%6,5,20)
%shows that %6 = A B in Q_5[X] with A,B irreducible, A of degree 2 and B of degree 10. In particular the image of a decomposition group at 5 has order divisible by 5, hence the regularity at 5.

? polcompositum(%6,x^2-5)[1]
%7 = x^24 + 4*x^23 - 64*x^22 - 286*x^21 + 1766*x^20 + 8192*x^19 - 25937*x^18 - 124798*x^17 + 199648*x^16 + 1079512*x^15 - 460980*x^14 - 4999540*x^13 - 4783895*x^12 + 7770240*x^11 + 44338280*x^10 + 33758984*x^9 - 167934764*x^8 - 197727276*x^7 + 399824571*x^6 + 495099594*x^5 - 690266296*x^4 - 941382214*x^3 + 374828734*x^2 + 722941556*x + 149276929

? p2=polredabs(%7)   
%8 = x^24 - 2*x^23 + x^21 - 66*x^20 + 236*x^19 - 542*x^18 + 1095*x^17 - 1684*x^16 + 1524*x^15 - 84*x^14 - 2667*x^13 + 10545*x^12 - 18214*x^11 + 30209*x^10 - 39894*x^9 + 55168*x^8 - 4525*x^7 - 39524*x^6 + 15574*x^5 - 65859*x^4 + 147343*x^3 - 249315*x^2 + 93921*x - 3641

? K=nfinit(p2);

? factor(K.disc)
%9 =  [5 24] [19 16]

?allocatemem
(do it several times)

? L=nfsubfields(K,12);
%this may take about 15 minutes. 

? polredabs(L[1][1])
%10 = x^12 - 2*x^11 - 9*x^10 + 50*x^8 - 34*x^7 + 43*x^6 + 16*x^5 + 375*x^4 - 700*x^3 + 964*x^2 - 1328*x + 304

? polredabs(L[2][1])
%11 = x^12 - 6*x^11 + 11*x^10 - 30*x^9 + 120*x^8 - 304*x^7 + 454*x^6 - 364*x^5 + 55*x^4 + 200*x^3 - 216*x^2 + 96*x - 16

? polredabs(L[3][1])
%12 = x^12 - 2*x^11 - 4*x^10 + 25*x^9 + 30*x^8 - 36*x^7 - 33*x^6 + 104*x^5 + 120*x^4 - 55*x^3 - 128*x^2 - 64*x - 13

? subst(%10,x,y)
%13 = y^12 - 2*y^11 - 9*y^10 + 50*y^8 - 34*y^7 + 43*y^6 + 16*y^5 + 375*y^4 - 700*y^3 + 964*y^2 - 1328*y + 304

? factornf(x^2-5,%13)
%something reducible

?F=bnfinit(%11);

?F.clgp
%14 = [1, [], []]

%the class group of F is trivial

? bnfcertify(F)
%15 = 1

%certify that GRH is unnecessary