Ticket #15767: ell.gp.patch
File ell.gp.patch, 1.5 KB (added by , 6 years ago) 


ell.gp
old new 840 840 } 841 841 {nflocallysoluble( nf, pol, r=0,a=1,b=1) = 842 842 \\ Test whether Y^2 = pol is Everywhere Locally Soluble 843 local(pol0,plist,add,ff,p,Delta, vecpol,vecpolr,Sturmr);843 local(pol0,plist,add,ff,p,Delta,c,s,t); 844 844 845 845 if( DEBUGLEVEL_ell >= 4, print(" starting nflocallysoluble ",[pol,r,a,b])); 846 846 pol0 = pol; … … 875 875 \\ places reelles 876 876 877 877 if( nf.r1, 878 Delta = poldisc(pol); vecpol = Vec(pol); 878 c = pollead(pol); 879 pol /= c; 880 pol = subst(pol, 'x, 'x  polcoeff(pol, 3)/4); 881 s = polcoeff(pol, 2); 882 t = 2*s^3  8*s*polcoeff(pol, 0) + 9*polcoeff(pol, 1)^2; 883 Delta = poldisc(pol); 879 884 for( i = 1, nf.r1, 880 if( nfrealsign(nf,pollead(pol),i) > 0, next); 881 if( nfrealsign(nf,polcoeff(pol,0),i) > 0, next); 885 if( nfrealsign(nf,c,i) > 0, next); 882 886 if( nfrealsign(nf,Delta,i) < 0, next); 883 vecpolr = vector(#vecpol,j,mysubst(vecpol[j],nf.roots[i])); 884 Sturmr = polsturm(Pol(vecpolr)); 885 if( Sturmr == 0, 887 \\ Sturm => 4 roots if s < 0 and t < 0, otherwise 0 roots 888 if( nfrealsign(nf,s,i) < 0 && nfrealsign(nf,t,i) < 0, next); 886 889 if( DEBUGLEVEL_ell >= 2, print(" not ELS at infinity")); 887 890 if( DEBUGLEVEL_ell >= 4, print(" end of nflocallysoluble")); 888 return(0));891 return(0); 889 892 )); 890 893 if( DEBUGLEVEL_ell >= 2, print(" quartic ELS ")); 891 894 if( DEBUGLEVEL_ell >= 4, print(" end of nflocallysoluble"));