
Print["\n\n             SALEM, DEGREE 10 (9)\n"]

<<cox.m
salem = SmallSalems10[[9]]  
prime=67

(*-----------------Salem part (9,1)--------------*)
qs = QEuler[salem]
fs = Mat[salem]
ps = PrimeTwists[qs,fs,prime,1] 
ps = Select[ps,AbGp[QTwist[qs,fs,#],prime]=={prime,prime}&] 
polys = ps[[1]]
qs = QTwist[qs,fs,polys]
charfs = GlueChar[qs,fs,prime]

(*-----------------Cyclotomic part --------------*)
per = GluePeriod[qs,fs,prime]
cyclo = Cyclotomic[per,x]
qc = QEuler[cyclo]
fc = Mat[cyclo]
ps = PrimeTwists[qc,fc,prime,2] 
ps = Select[ps,GlueChar[QTwist[qc,fc,#],fc,prime]==charfs&]
polyc = ps[[1]]
qc = QTwist[qc,fc,polyc]

(*-----------------Glue --------------*)
{qd,fd} = GlueAuto[qs,fs,qc,fc,prime]

q1 = {{22}}
f1 = {{-1}}
q2 = {{2}}
f2 = {{1}}

{qx,fx}=GlueAuto[q1,f1,q2,f2,2]

{q,f} = GlueAuto[qd,fd,qx,fx,11]

DiK3[q,f,polys]
