\\ --------------- GP code --------------------------------------- \\ \\ Time-stamp: \\ Description: Compute list of primes where a given conic over \Q \\ does not have points locally \\ \\ File: /home/villegas/.public_html/cnt/conic.gp \\ \\ Original Author: Fernando Rodriguez-Villegas \\ villegas@math.utexas.edu \\ University of Texas at Austin \\ \\ Created: Tue Oct 3 2000 \\ \\----------------------------------------------------------------- \\---------------------------------------------------------------------- \\ Given a non-degenerate 3 by 3 symmetric matrix with rational \\ entries compute the list of primes for which the corresponding \\ conic does not have a rational point locally (including 0 as the \\ infinite prime). The length of the answer should be even. hilbertlist(m)= {local(u,a,b,p,pl,fdis); if(matdet(m), m=qfgaussred(m);u=[]; a=-m[2,2]/m[1,1]; b=-m[3,3]/m[1,1]; pl=[0,2]; fdis=factor(abs(a*b)/gcd(a,b)); for(k=1,length(fdis~), if(fdis[k,2]%2&&fdis[k,1]>2,pl=concat(pl,fdis[k,1]))); for(k=1,length(pl), if(hilbert(a,b,pl[k])==-1,u=concat(u,pl[k]),)); u, error("matrix is singular")) } addhelp(kilbertlist,"Given a non-degenerate 3 by 3 symmetric matrix with rational entries compute the list of primes for which the corresponding conic does not have a rational point locally (including 0 as the infinite prime). The length of the answer should be even.")