
<<cox.m
Print["\n\n             SALEM, DEGREE 10 (4)\n"]

salem = SmallSalems10[[4]]

(*-----------------Salem part (9,1)--------------*)
qs = QEuler[salem]
fs = Mat[salem]

prime=2
ps  = PrimeTwists[qs,fs,prime] 
ps = Select[ps,GluePeriod[QTwist[qs,fs,#],fs]==3&]
p2 = ps[[1]]

prime=13
ps  = PrimeTwists[qs,fs,prime] 
ps = Select[ps,GluePeriod[QTwist[qs,fs,#],fs]==14&]
p13 = ps[[1]]

polys = FixSig[qs,fs,p2 p13]
polys = polys[[1]]
qs = QTwist[qs,fs,polys]


(*-------------------------Cyclotomic-------------------*)
prime=13
charfs = GlueChar[qs,fs,prime]
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]

{qd,fd} = GlueAuto[qs,fs,qc,fc,prime]

(*-------------------------Endgame -------------------*)
qa = {{14}}
fa = {{-1}}

qb = QA[2]
fb = Cox[qb]
qb = 2 qb

{qe,fe} = GlueAuto[qd,fd,qb,fb,2]

{qu,fu} = GlueAuto[qe,fe,qa,fa,7]


qd = {{42}}
fd = {{1}}

{qv,fv} = Glue1[qu,fu,qd,fd,{2,3}]

qx = {{4,1},{1,2}}
fx = Id[qx]

{q,f} = GlueAuto[qv,fv,qx,fx,7]

DiK3[q,f,polys]
