""" This script reads a file which contains on each line a cyclic cubic field and, for a given list of primes p, tries to certify that the p-adic regulator is not divisible by p. It is Algorithm 3. """ # DATA ####################################################################### E1=1 # we treat all cyclic cubic fields with conductor E2=10000 # in the interval [E1,E2] ell=3 # the script can be easily modified to deal with r=1 # other abelian Galois groups # so we specify ell=3 for "cubic" # r=1 for Galois group = (Z/3^Z)^r ps=[5,7,11,13,17,19] # list of primes for which we certify that # p doesn't divide the p-adic regulator input_file="cubic-"+str(E1)+"-"+str(E2)+"-"+str(ell)+"-"+str(r)+".txt" # the list of cyclic cubic fields is read from file input_file, created by # the script ListCyclicCubic.sage result_file="pRegulator-"+str(E1)+"-"+str(E2)+"-"+str(ell)+"-"+str(r)+"-"+str(ps)+".txt" fd=open(input_file,"r") gd=open(result_file,"ab+") # TOOL SCRIPTS ############################################################# load algorithm2.sage load Schirokauer.sage # END OF TOOLS ############################################################# # Main enumeration. Qx.=QQ['x'] line=fd.readline() # line = next line of file fd cond=0 # cond = conductor of previous field while line != "": # until end f file if not line[0] == "x": # skip comment lines cond=int(line) else: f=Qx(line.strip()) # f = polynomial read in file K.=NumberField(f) # K=Q(a) is the number field of f OK=K.ring_of_integers() # ring of integers m = K.disc().sqrt() # since K is cyclic cubic, m=cond(K) if m < cond: # skip f if its conductor is smaller line=fd.readline() # thanprevious conductor because continue # it has been already treated for p in ps: bool = criterium_p_not_divides_pRegulator(f,p) if bool == "True": bools = bools + ",False" else: bools = bools + ",Maybe" gd.write(str(f)+":"+bools+"\n") gd.flush() line=fd.readline()