rep.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
-- search representation G(k)---> S(Jn)
--    Kouji  Kodama
-- 2002/12/25 K.Kodama
--  SL2(p) support based on Wada's idea
-- 1998/04/22 K.Kodama
-- Covering Distribution of Yang diagram
--1997/1 kdm
--un-oriented band support
--
--1996/10 kdm
--LINUX version
--
--93/12/31 02:37:04  kdm
--bug fix of checkEq. It failed to check on link.
--Change InitConj.
--
--93/12/30 03:19:52  kdm
--Improve checking conjugate rep.
--checkEqG: When set up first 2 generators,
--	check if it admit representation. 
--
--generating all 5-fold coverings with  80386/12MHz
--knot:k10c121
--old 26sec
--new 8sec
--
--knot:q101a1
--old 33sec
--new 14sec
--
--knot:q111a1
--old 33sec
--new 13sec
--
--
--1990/1  RepM  Manual set.
--1989/9  Theta curve support
--1989/8 	Rep  Auto search. Modula2 version
--1983 
--Manual set. Basic version


class REP_OP

class REP_OP is const noOp, startOp, endOp, setR,setRC,setF,setFY,setY,setFn,setYn, checkY,checkR,checkRC,checkT,checkEq2, testSt; -- for function -- noOp, startOp, endOp -- GenMax+compo : setR,setRC,setF,setFCNJ,setCNJ,setFn,setCNJn, -- checkCNJ, -- Relator.size : checkR,checkRC -- checkT,checkEq2,testSt; -- command sequence to set rep. attr func:CARD; -- function attr num:INT; -- +-stack pointer attr word:ARRAY{INT}; create:SAME is res:SAME:=new; res.func:=noOp; res.num:=0.int; res.word:=#; return res; end; end;

partial class REP_CODE_GEN

partial class REP_CODE_GEN is ---------- stack ----------- attr base:CARD; --area for generators attr yangPtr:CARD; -- area for conjugate class/Yang diagrams attr longPtr:CARD; -- area for longitudes attr merPtr:CARD; -- area for meridian attr orbitpPtr:CARD; -- area for compo~.number attr orbitmPtr:CARD; -- area for br.index attr windLon:CARD; --winding of longitude~ attr Rback:CARD; -- area for equivalence check of rep. attr Work:CARD; attr WorkTop,Bottom:CARD; --------- search codes -------- attr setG:ARRAY{REP_OP}; -- [0..2*REPmaxC] attr sPtr:CARD; -- code pointer attr YangList:ARRAY{INT}; -- for covering distribution_(yang) attr checkTra:ARRAY{INT}; -- [1..REPmaxC] -- list of gen. to check if the rep. is transitive. -- List it in the order of used by setF,setCNJ. -- Be careful about the order, -- because it is used to update representation table.
attr Relator:ARRAY{WORD}; attr GenMax:CARD; attr sg_set:ARRAY{BOOL}; -- gen. number --> condition of the gen. attr sg_compo:ARRAY{CARD}; -- gen. number --> component attr sg_freq :ARRAY{CARD}; -- How many occur in words attr freq0,freq1,freq3:CARD; attr sr:ARRAY{BOOL}; -- rel. number-->true if used attr sl:ARRAY{CARD}; -- compo--> non-zero if settled. attr g0,g1,g3:CARD; attr set0,set1,set3:BOOL; printD_gen(i:INT, str:STR) is #OUT+str+", x"+setG[i].num.str; end; printD_compo(str:STR, num:INT) is #OUT+str+", compo"+(num-yangPtr).str; end; printD_F(i:INT) is #OUT+i.str+" func: "; case setG[i].func when REP_OP::testSt then #OUT+"testSt"; when REP_OP::startOp then #OUT+"start"; when REP_OP::endOp then #OUT+"end"; when REP_OP::noOp then #OUT+"no"; -- when REP_OP::checkR then #OUT+"checkR, r"+setG[i].num.str; when REP_OP::checkRC then #OUT+"checkRC, r"+setG[i].num.str; when REP_OP::checkY then printD_compo("checkY",setG[i].num); when REP_OP::checkT then #OUT+"checkT"; -- when REP_OP::setR then printD_gen(i,"setR"); when REP_OP::setRC then printD_gen(i,"setRC"); when REP_OP::setFY then printD_gen(i,"setFY"); when REP_OP::setY then printD_compo("setY",setG[i].num); -- when REP_OP::setFn then printD_gen(i,"setFn"); when REP_OP::setYn then printD_compo("setYn",setG[i].num); -- when REP_OP::setF then printD_gen(i,"setF"); printD_compo(" with",setG[i].word[0]); else #OUT+"un-defined func!"; end; end; printD_G is f:INT; -- function #OUT+"\n"+"setG[*]\n"; gn:INT:=0; loop i::=setG.ind!; f:=setG[i].func.int; if (f=REP_OP::setFY.int)or(f=REP_OP::setF.int)or(f=REP_OP::setFn.int) then gn:=gn+1; end; printD_F(i.int); i:=i+1; #OUT+"\n"; end; #OUT+"#Gen.="+gn.str+"\n"; #OUT+(#IN.get_str); end; InitVar(TCode:TCODE) is GenMax:=TCode.number_gen; setG:=#; --setG:=#(GenMax+Relator.size+7); --loop i::=setG.ind!; setG[i]:=#; end; sr:=#(Relator.size); loop i::=sr.ind!; sr[i]:=false; end; sg_set:=#(GenMax+1); sg_set.to_val(false); sl:=#(GenMax+1); sl.to_val(0); sg_freq:=#(GenMax+1); sg_freq.to_val(0); loop i::=Relator.ind!; sg_freq[Relator[i][0].card]:=sg_freq[Relator[i][0].card]+1; end; --sg_compo:=#(GenMax+1); -- loop i::=0.upto!(TCode.length-1); sg_compo[TCode[i].gen]:=TCode[i].compo; end; checkTra:=#; YangList:=#; ---------- for stack ------- base:=1; --area for generators yangPtr:=base+GenMax+1; -- area for Yang diagrams longPtr:=yangPtr+GenMax+1; -- area for longitudes merPtr:=longPtr+GenMax+1; -- area for meridian orbitpPtr:=merPtr+GenMax+1; -- area for compo~.number orbitmPtr:=orbitpPtr+GenMax+1; -- area for br.index windLon:=orbitmPtr+GenMax+1; --winding of longitude~ Rback:=windLon+GenMax+1; -- area for equivalence check of rep. Work:=Rback+GenMax+1; WorkTop:=Work+2; end; --------------------init--------------- setRelG(rn:CARD) is -- rn: relator number -- Assume the relation be the form of -- crossing: (a b a~ c~) or -- theta: (a b c~) or -- un-ori.band: a b g0:=Relator[rn][0].card; g1:=Relator[rn][1].card; if Relator[rn].w.has_ind(3) then g3:=(-Relator[rn][3]).card; -- crossing elsif Relator[rn].w.has_ind(2) then g3:=(-Relator[rn][2]).card; -- Theta else g3:=g0; -- un-ori. band end; set0:=sg_set[g0]; set1:=sg_set[g1]; set3:=sg_set[g3]; freq0:=sg_freq[g0]; freq1:=sg_freq[g1]; freq3:=sg_freq[g3]; end; Hom is loop rn::=Relator.ind!; setRelG(rn); if (~ sr[rn]) and set0 and set1 and set3 then sr[rn]:=true; sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); --WITH setG[sPtr] ; if Relator[rn].w.has_ind(3) then setG[sPtr].func:=REP_OP::checkRC; -- crossing elsif Relator[rn].w.has_ind(2) then setG[sPtr].func:=REP_OP::checkR; --Theta else setG[sPtr].func:=REP_OP::checkR; -- un-ori. band end; setG[sPtr].num:=rn.int; setG[sPtr].word:=Relator[rn].w.copy; -- loop i::=0.upto!(3); word[i]:=Relator[rn].r[i]; end; --end; -- INC(sPtr); setG[sPtr].func:=testSt; end; end; --- test sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::testSt; -- end; SetYang(g:CARD) is l:CARD; sg_set[g]:=true; l:=sg_compo[g]; checkTra:=checkTra.append(|g.int|); sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].num:=g.int; if sl[l]>0 then setG[sPtr].func:=REP_OP::setF; setG[sPtr].word:=|(l+yangPtr).int|; sl[l]:=sl[l]+1; -- INC(sPtr); setG[sPtr].func:=checkY; setG[sPtr].num:=l; elsif sPtr=1 then setG[sPtr].func:=REP_OP::setFY; sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::setY; setG[sPtr].num:=(l+yangPtr).int; sl[l]:=1; YangList:=YangList.append(|(l+yangPtr).int|); else setG[sPtr].num:=0.int; setG[sPtr].func:=REP_OP::setFY; sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::setY; setG[sPtr].num:=(l+yangPtr).int; sl[l]:=1; sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].num:=g.int; setG[sPtr].func:=REP_OP::setF; setG[sPtr].word:=|(l+yangPtr).int|; YangList:=YangList.append(|(l+yangPtr).int|); -- setG[sPtr].func:=setFn; -- sPtr:=sPtr+1; -- setG[sPtr].func:=setYn; setG[sPtr].num:=l+yangPtr; -- sl[l]:=1; end; --- test sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::testSt; -- end; FsNewG(inout g,inout cn, g1, cn1:CARD) is cn1:=cn1+sl[sg_compo[g1]]; if (cn1>cn)or((cn1=cn)and(g1<g)) then g:=g1; cn:=cn1; end; end; Fs1(inout g,inout cn:CARD):BOOL is --set g g:=GenMax+1; cn:=0; loop rn::=Relator.ind!; setRelG(rn); if (~ set0) and set1 and set3 then FsNewG(inout g,inout cn,g0,freq0); end; end; return (g<=GenMax); end; Fs2(inout g,inout cn:CARD):BOOL is -- set g g:=GenMax+1; cn:=0; loop rn::=Relator.ind!; setRelG(rn); if (~set0)and(~set1)and(set3) then -- Fs2 FsNewG(inout g,inout cn,g0,freq0+freq1); elsif (~set0)and(set1)and(~set3) then --Fs2c FsNewG(inout g,inout cn,g0,freq0+freq3); elsif (set0)and(~set1)and(~set3) then -- Fs3,Fs3c FsNewG(inout g,inout cn,g3,freq1+freq3); FsNewG(inout g,inout cn,g1,freq1+freq3); end; end; return (g<=GenMax); end; Fs4(inout g,inout cn:CARD):BOOL is -- set g g:=GenMax+1; cn:=0; loop rn::=Relator.ind!; setRelG(rn); if ~(set0 or set1 or set3) then FsNewG(inout g,inout cn,g0,freq0); end; end; return (g<=GenMax); end; Fs5(inout g,inout cn:CARD):BOOL is -- set g g:=1; loop while!((g<=GenMax) and (sg_set[g])); g:=g+1; end; return (g<=GenMax); end; Free is g:CARD; cn:CARD; if Fs1(inout g,inout cn) or Fs2(inout g,inout cn) or Fs4(inout g,inout cn) or Fs5(inout g,inout cn) then SetYang(g); -- and setG[sPtr].func:=setF/setFY Hom; end; end; RelSr(inout rn:CARD, gc:CARD, p0,p1,p2:INT) is -- gc:= p0 p1 p2 sr[rn]:=true; sg_set[ gc ]:=true; sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); --WITH setG[sPtr] ; if p2.is_zero.not then setG[sPtr].func:=REP_OP::setRC; setG[sPtr].word:=|p0,p1,p2|; elsif p1.is_zero.not then setG[sPtr].func:=REP_OP::setR; -- Theta setG[sPtr].word:=|p0,p1|; else setG[sPtr].func:=REP_OP::setR; -- un-ori. band setG[sPtr].word:=|p0|; end; setG[sPtr].num:=gc.int; --- test sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::testSt; -- --end; Hom; rn:=0; end; Rel is rn::=0; loop while!(rn<Relator.size); setRelG(rn); if Relator[rn].w.has_ind(3) then if set0 and (~ set1) and set3 then RelSr(inout rn,g1,-g0.int,g3.int,g0.int); elsif set0 and set1 and (~ set3) then RelSr(inout rn,g3,g0.int,g1.int,-g0.int); else rn:=rn+1; end; elsif Relator[rn].w.has_ind(2) then -- Theta if ~(set0) and set1 and set3 then RelSr(inout rn,g0,g3.int,-g1.int,0.int); elsif set0 and ~(set1) and set3 then RelSr(inout rn,g1,-g0.int,g3.int,0.int); elsif set0 and set1 and ~(set3) then RelSr(inout rn,g3,g0.int,g1.int,0.int); else rn:=rn+1; end; else -- un-ori. band if ~(set0) and set1 then RelSr(inout rn,g0,-g1.int,0.int,0.int); elsif set0 and ~(set1) then RelSr(inout rn,g1,-g0.int,0.int,0.int); else rn:=rn+1; end; end; end; end; Tra is -- check transitive g:CARD:=1; -- Check if all generators is arleady setup. loop while!( (g<=GenMax) and sg_set[g]); g:=g+1; end; if g>GenMax then sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::checkT; setG[sPtr].num:=checkTra.size.int; --- test sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::testSt; -- sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::endOp; setG[sPtr].num:=0.int; elsif checkTra.size=2 then sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::checkEq2; setG[sPtr].num:=checkTra.size.int; if setG[2].func/=REP_OP::setY then raise "setY needed in setG[2].func.\n"; end; --- test sPtr:=sPtr+1; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::testSt; -- When first 2 geberators is steup, -- check if they admit new representation in the sense of conjugate. end; end; InitCodeGen(TCode:TCODE) is KNOT_GROUP::get_Relator(TCode,out Relator,out sg_compo); InitVar(TCode); sPtr:=0; setG:=setG.append(|#REP_OP|); setG[sPtr].func:=REP_OP::startOp; setG[sPtr].num:=0.int; loop while!(setG[sPtr].func /= REP_OP::endOp) ; Free; -- free set & Yang,hom Rel; -- set with relation & hom Tra; -- transitive & end end; -- printD_G; end; end;

partial class CODE_EXEC_ALG

partial class CODE_EXEC_ALG is T1 is #OUT+"sPtr,setG,Dir,stack:"+ sPtr.str+" "; printD_F(sPtr.int); if Dir then #OUT+" Dir,"; else #OUT+" -Dir,"; end; #OUT+(stack.pt-stack.bottom).str+"\n"; end; WriteRep(TCode:TCODE, eff:BOOL) is if LOGOUT::is_enabled then LOGOUT::LogEnd; WriteRepLog(TCode,eff); LOGOUT::LogBegin; else WriteRepLog(TCode,eff); end; end; checkStack is T1; --wait; WriteLn; --return; if Dir or (setG[sPtr].func=REP_OP::setF)or (setG[sPtr].func=REP_OP::setFY)or (setG[sPtr].func=REP_OP::setFn)or (setG[sPtr].func=REP_OP::startOp) then printD_F(sPtr.int); end; if setG[sPtr].func=REP_OP::testSt then if setG[sPtr].num.is_zero then setG[sPtr].num:=stack.pt.int; elsif setG[sPtr].num/=stack.pt.int then printD_G; #OUT+"error on Group stack sPtr:"+sPtr.str +" pt0:"+setG[sPtr].num.str +" pt:"+stack.pt.str; if Dir then #OUT+" Dir"; else #OUT+" -Dir"; end; #OUT+"\n"; raise ""; end; end; end; end;

class SL2P_CODE_EXEC

class SL2P_CODE_EXEC is include REP_CODE_GEN; include CODE_EXEC_ALG; -- not implemented attr rep_tbl:REP_TABLE{SL2P_STACK,SL2P_STACK_GT}; attr rep_tbl2:REP_TABLE{SL2P_STACK,SL2P_STACK_GT}; attr stack:SL2P_STACK; attr RepCount:CARD; -- #of finded representation attr Dir:BOOL; InitCodeExec(n:INT) is RepCount:=0; Dir:=true; sPtr:=1; rep_tbl:=#; rep_tbl2:=#; SL2P::set_base(base.int); stack:=#(n); loop WorkTop.times!; stack.Pu; end; Bottom:=stack.pt; -- Bottom..Top: area for stack stack.bottom:=Bottom; stack.Unit; stack.Fetch(0); end; create(TCode:TCODE,n:INT):SAME is res:SAME:=new; res.InitCodeGen(TCode); res.InitCodeExec(n); return res; end; create:SAME is res:SAME:=new; return res; end; WriteRepLog(TCode:TCODE,eff:BOOL) is -- if true then write the result, -- else write the state of manual set. maxG::=TCode.number_gen; LOGOUT::Title("Rep.",RepCount.str); #LOGOUT+"Representation: G(K)-->SL2(" +stack.p.str+")\n"; loop i::=1.upto!(maxG); if ~ eff then if setG[i].func=REP_OP::setF then #OUT+"*"; else #OUT+" "; end; end; #LOGOUT+WORD::gstr(i.int,0.int); if (sg_set[i]) then #LOGOUT+"-->"; stack.Fetch(i); stack.WriteStackLog; else #OUT+" is not defined."; end; #LOGOUT+"\n"; end; end; ----------------Set Rep------------------------ SetRep is flg:BOOL; loop -- checkStack; if Dir then case setG[sPtr].func when REP_OP::setRC then -- set "num"-th generator from birtinger relation. stack.Conjugate(setG[sPtr].word[1],setG[sPtr].word[0]); stack.Store(setG[sPtr].num); sPtr:=sPtr+1; -- stack.Dup; stack.WriteStackLog; -- check when REP_OP::setR then stack.CMul(setG[sPtr].word); stack.Store(setG[sPtr].num); stack.Dup; stack.WriteStackLog; -- check sPtr:=sPtr+1; when REP_OP::setF then -- Second generator or afterward of each component are -- generated according to Yang-diagram from 1st generator. stack.InitGenY(setG[sPtr].word[0].card); stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; -- stack.Dup; stack.WriteStackLog; -- check when REP_OP::checkRC then -- Check relation word of Wirtinger-type. -- Use for crossing relation. stack.Conjugate(-setG[sPtr].word[3],-setG[sPtr].word[0]); stack.Fetch(setG[sPtr].word[1]); if stack.Eq then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkR then -- Check relation word in generic form. --Use for vertex relation of Theta curve. stack.CMul(setG[sPtr].word); if stack.Eq1 then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkEq2 then -- For 1st or 2nd generator, -- check if they admit new representation. -- Use checkEqG whem num=2. if rep_tbl2.checkEqTbl(inout stack,checkTra,setG[sPtr].num,setG[2].num,Rback) then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkT then -- check (1)transitive and (2) new. -- Check if representation is transitive. checkTra[] is a table of generators --loop i::=checkTra.ind!; stack.Fetch(checkTra[i]); end; --stack.OrbitC(setG[sPtr].num); Dir:=(stack.st[stack.pt][0]=1); stack.Pd; -- Check if the representation is new. if (Dir and rep_tbl.checkEqTbl(inout stack,checkTra,setG[sPtr].num,setG[2].num,Rback) ) then sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; Dir:=false; end; when REP_OP::setFn then stack.InitGen; flg:=stack.Gen; stack.Store(setG[sPtr].num); stack.Pu; --stack.Dup; stack.WriteStackLog; -- check sPtr:=sPtr+1; when REP_OP::setYn then -- For first generator on components of -- 2-ndary or afterword, freely generate and -- register the Yang-diagram to table of component number. stack.Yang; stack.Store(setG[sPtr].num); sPtr:=sPtr+1; rep_tbl:=#; rep_tbl2:=#; when REP_OP::setFY then -- The FIRST generator. -- Generate Yang diagram and an element. stack.InitYang; stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; when REP_OP::setY then -- Yang diagram is correspond to conjugacy class of S(n) -- by 1-to-1. And is the same on a link component. --For each component, register Yang diagram. --Use "setY" and "setFY" as a pair. stack.Over; stack.Store(setG[sPtr].num); --stack.Dup; stack.WriteStackLog; -- check sPtr:=sPtr+1; rep_tbl:=#; rep_tbl2:=#; when REP_OP::endOp then break!; when REP_OP::startOp then sPtr:=sPtr+1; else sPtr:=sPtr+1; end; else; case setG[sPtr].func when REP_OP::setF then if stack.GenY then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::setFY then if stack.GenYang then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::setFn then if stack.Gen then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::startOp then break!; else sPtr:=sPtr-1; end; end; end; end; end; -- SL2P_CODE_EXEC

class REP_CODE_EXEC

class REP_CODE_EXEC is include REP_CODE_GEN; include CODE_EXEC_ALG; attr rep_tbl:REP_TABLE{REP_STACK,ARRAY{CARD}}; attr rep_tbl2:REP_TABLE{REP_STACK,ARRAY{CARD}}; attr stack:REP_STACK; attr RepCount:CARD; -- #of finded representation attr Dir:BOOL; InitCodeExec(n:CARD) is #OUT+"InitCodeExec\n"; RepCount:=0; Dir:=true; sPtr:=1; rep_tbl:=#; rep_tbl2:=#; stack:=#(n); loop WorkTop.times!; stack.Pu; end; Bottom:=stack.pt; -- Bottom..Top: area for stack stack.bottom:=Bottom; stack.Unit; stack.Fetch(0); end; create(TCode:TCODE,n:CARD):SAME is res:SAME:=new; res.InitCodeGen(TCode); res.InitCodeExec(n); return res; end; create:SAME is res:SAME:=new; return res; end; WriteRepLog(TCode:TCODE,eff:BOOL) is -- if true then write the result, -- else write the state of manual set. maxG::=TCode.number_gen; LOGOUT::Title("Rep.",RepCount.str); #LOGOUT+"Representation: G(K)-->S(" +stack.Jn.str+")\n"; loop i::=1.upto!(maxG); if ~ eff then if setG[i].func=REP_OP::setF then #OUT+"*"; else #OUT+" "; end; end; #LOGOUT+WORD::gstr(i.int,0.int); if (sg_set[i]) then #LOGOUT+"-->"; stack.Fetch(i.int); stack.WriteStackLog; else #OUT+" is not defined."; end; #LOGOUT+"\n"; end; end; SetRep is flg:BOOL; loop -- checkStack; if Dir then case setG[sPtr].func when REP_OP::setRC then stack.Conjugate(setG[sPtr].word[1],setG[sPtr].word[0]); stack.Store(setG[sPtr].num); sPtr:=sPtr+1; -- set "num"-th generator from birtinger relation. when REP_OP::setR then stack.CMul(setG[sPtr].word); stack.Store(setG[sPtr].num); sPtr:=sPtr+1; when REP_OP::setF then stack.InitGenY(setG[sPtr].word[0].card); stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; -- Second generator or afterward of each component are -- generated according to Yang-diagram from 1st generator. when REP_OP::checkRC then -- Check relation word of Wirtinger-type. -- Use for crossing relation. stack.Conjugate(-setG[sPtr].word[3],-setG[sPtr].word[0]); stack.Fetch(setG[sPtr].word[1]); if stack.Eq then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkR then -- Check relation word in generic form. --Use for vertex relation of Theta curve. stack.CMul(setG[sPtr].word); if stack.Eq1 then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkEq2 then -- For 1st or 2nd generator, -- check if they admit new representation. -- Use checkEqG whem num=2. if rep_tbl2.checkEqTbl(inout stack, checkTra,setG[sPtr].num,setG[2].num,Rback) then sPtr:=sPtr+1; else Dir:=false; sPtr:=sPtr-1; end; when REP_OP::checkT then --Check if representation is transitive --checkTra[] is a table of generators loop i::=checkTra.ind!; stack.Fetch(checkTra[i]); end; stack.OrbitC(setG[sPtr].num.card); Dir:=(stack.st[stack.pt][0]=1); stack.Pd; if (Dir and rep_tbl.checkEqTbl(inout stack,checkTra,setG[sPtr].num,setG[2].num,Rback)) then sPtr:=sPtr+1; Dir:=true; -- Check if the representation is new. else sPtr:=sPtr-1; Dir:=false; end; when REP_OP::setFn then stack.InitGen; flg:=stack.Gen; stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; when REP_OP::setYn then stack.Yang; stack.Store(setG[sPtr].num); sPtr:=sPtr+1; rep_tbl:=#; rep_tbl2:=#; -- For first generator on components of -- 2-ndary or afterword, freely generate and -- register the Yang-diagram to table of component number. when REP_OP::setFY then -- The FIRST generator. -- Generate Yang diagram and an element. stack.InitYang; -- pass by trivial element. This can be deleted. -- if TCode[TCode.length-1].comp=1 then flg:= stack.GenYang; end; stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; when REP_OP::setY then stack.Over; stack.Store(setG[sPtr].num); sPtr:=sPtr+1; rep_tbl:=#; rep_tbl2:=#; -- Yang diagram is correspond to conjugacy class of S(n) -- by 1-to-1. And is the same on a link component. --For each component, register Yang diagram. --Use "setY" and "setFY" as a pair. when REP_OP::endOp then break!; when REP_OP::startOp then sPtr:=sPtr+1; else sPtr:=sPtr+1; end; else; case setG[sPtr].func when REP_OP::setF then if stack.GenY then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::setFY then if stack.GenYang then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::setFn then if stack.Gen then stack.Store(setG[sPtr].num); stack.Pu; sPtr:=sPtr+1; Dir:=true; else sPtr:=sPtr-1; end; when REP_OP::startOp then break!; else sPtr:=sPtr-1; end; end; end; end; end;

class REP

class REP is create:SAME is res:SAME:=new; return res; end; -------------------Representation main----------------------- shared rcode:REP_CODE_EXEC; -- covering distributions shared cdYang:COVERING_DIST_YANG; shared cdBranch:COVERING_DIST_BR; shared cdLink:COVERING_DIST_LK; shared cdH1Br:COVERING_DIST_H1; shared cdH1Unbr:COVERING_DIST_H1; Invariants(TCode:TCODE, h1B,h1U,hT,brI,cvL, twAlex,cdY,cdBr,cdLk,cdH1B,cdH1U:BOOL) is rcode.WriteRepLog(TCode, true); if brI then COVERING_LINKAGE::BrIndex(TCode); end; if cvL then COVERING_LINKAGE::CoveringLinkage(TCode); end; if h1B then HOMOLOGY::H1Cov(TCode,true, cdH1B); end; if h1U then HOMOLOGY::H1Cov(TCode,false,cdH1U); end; if hT then HOMOTOPY::CovHomotopy(TCode); end; if cdY then cdYang.IncCDYang; end; if twAlex then TWIST_ALEX_COV::twist_alex(TCode,rcode.stack); end; LOGOUT::flush; end; RepSearch(TCode:TCODE,n,form,branchind,covlk,h1b,h1u,knotgrp,twistAlex,covDistY,covDistBr,covDistLk,covDistH1B,covDistH1U:CARD) pre (2<=n)and(1<=form)and(form<=2) is -- covering distribution cdY::=(covDistY>0); cdBr::=(covDistBr>0); cdLk::=(covDistLk>0); cdH1B::=(covDistH1B>0); cdH1U::=(covDistH1U>0); -- invariants cvL::=(covlk>0)or(cdLk); brI::=((branchind>0)or cdBr)and(~ cvL); h1B::=(h1b>0)or(cdH1B); h1U::=(h1u>0)or(cdH1U); hT::=(knotgrp>0); twAlex::=(twistAlex>0); if TCode.number_gen.is_pos then rcode:=#(TCode, n.card); rcode.stack.presentationType:=form.card; cdYang:=#; cdBranch:=#; cdLink:=#; cdH1Br:=#; cdH1Unbr:=#; loop if rcode.Dir then #OUT+"\nSearch.\n"; end; rcode.SetRep; if ~ rcode.Dir then break!; end; rcode.Dir:=false; rcode.RepCount:=rcode.RepCount+1; Invariants(TCode, h1B,h1U,hT,brI,cvL,twAlex,cdY,cdBr,cdLk,cdH1B,cdH1U); end; if cdY then cdYang.WriteCDYangLog; end; if cdBr then cdBranch.WriteCDBranchindexLog; end; if cdLk then cdLink.WriteCDLinkingLog; end; if cdH1B then cdH1Br.WriteCDH1Log("b"); end; if cdH1U then cdH1Unbr.WriteCDH1Log("u"); end; #OUT+"\nNumber_of_coverings: "+rcode.RepCount.str+"\n"; cdYang:=#; cdBranch:=#; cdLink:=#; cdH1Br:=#; cdH1Unbr:=#; rcode:=#; else #OUT+"Trivial\n"; end; LOGOUT::flush; end; end;

class REP_SL2P

class REP_SL2P is shared rcode:SL2P_CODE_EXEC; create:SAME is res:SAME:=new; return res; end; Invariants(TCode:TCODE, twAlex:BOOL) is rcode.WriteRepLog(TCode, true); if twAlex then TWIST_ALEX_SL2P::twist_alex(TCode,rcode.stack); end; LOGOUT::flush; end; RepSearch(TCode:TCODE,n:INT, form,twistAlex:CARD) is -- representation to SL2(n), n:prime if (n<=0.int)or(INT_EXT::is_prime(n).not) then #OUT+n.str+" is not prime.\n"; return; end; twAlex::=(twistAlex>0); POLYS_FP::init(n); if TCode.number_gen.is_pos then rcode:=#(TCode, n); rcode.stack.presentationType:=form; loop if rcode.Dir then #OUT+"\nSearch.\n"; end; rcode.SetRep; if ~ rcode.Dir then break!; end; rcode.Dir:=false; rcode.RepCount:=rcode.RepCount+1; Invariants(TCode, twAlex); end; #OUT+"\nNumber_of_SL2(p)_representations: "+rcode.RepCount.str+"\n"; rcode:=#; else #OUT+"Trivial\n"; end; LOGOUT::flush; end; end;