# Input # jbhBase (list of integers) A base for the group in question with relation to the known strong stabilizer chain # jbhDomain (list of integers) The domain on which the group acts, usually just [1..n] # Output # jbhOrder (list of integers) An order, base first and then remaining domain elements jbhCreateOrder := function (jbhBase,jbhDomain) local i, # counter jbhOrder; # (list of integers) jbhOrder:=ShallowCopy(jbhBase); for i in jbhDomain do if i in jbhOrder then else Append(jbhOrder,[i]); fi; od; return jbhOrder; end; # Input # jbhOrder (list of integers) An order as output by jbhCreateOrder # jbhList (list of integers) The list to be ordered with respect to jbhOrder # Output none, the list jbhList is simply re-ordered jbhSortByOrder := function (jbhOrder,jbhList) Sort(jbhList, function (v,w) return PositionProperty(jbhOrder,x->x=v) < PositionProperty(jbhOrder,x->x=w); end ); end; # Input # jbhTransversal (list of group elements) transverals elements with level in tree equal to index # jbhLevel (integer) which level in the tree to start multiplication at, work back to level 1 # Output # jbhProduct (group element) jbhFormProduct := function (jbhTransversal,jbhLevel) local i, jbhProduct; jbhProduct:=(); for i in [1..jbhLevel] do jbhProduct:=jbhProduct*jbhTransversal[jbhLevel-i+1]; od; return jbhProduct; end; jbhBasicBacktrack := function (jbhBase,jbhDomain,jbhChainMulti) local jbhOrder, # (list of integers) order relative to the given base and domain jbhLevel, # (integer) level of the tree -- counts down through the lattice jbhCount, # (list of integers) level inside orbit i -- counts right through the lattice at each orbit jbhListTemp, # (list) jbhTransversal, # (list of group elements) jbhGProduct, # (group element) jbhTransversal[jbhLevel]\cdots jbhTransversal[1] jbhGamma, # (integer) orbit image jbhSortedOrbits; # (list of lists) # create order jbhOrder:=jbhCreateOrder(jbhBase,jbhDomain); # Set initial level to 1 and initial count to 1 jbhLevel:=1; jbhCount:=[]; jbhCount[1]:=1; # sort the initial orbit jbhSortedOrbits:=[]; # initialize list jbhListTemp:=ShallowCopy(jbhChainMulti[2][1]); # copy information about orbit jbhSortByOrder(jbhOrder,jbhListTemp); # sort copied orbit jbhSortedOrbits[1]:=jbhListTemp; # store sorted orbit at level 1 # set initial transversal element jbhTransversal:=[]; jbhTransversal[1]:=(); while true do while jbhLevel < Size(jbhBase) do jbhLevel:=jbhLevel+1; # go down one level in the lattice jbhListTemp:=ShallowCopy(jbhChainMulti[2][jbhLevel]); # get orbit for this level jbhGProduct:=jbhFormProduct(jbhTransversal,jbhLevel-1); # find transversal product up to previous level jbhListTemp:=OnTuples(jbhListTemp,jbhGProduct); # where does jbhGProduct send the orbit elements? jbhSortByOrder(jbhOrder,jbhListTemp); # sort the image of the orbit under jbhGProduct relative to jbhOrder jbhSortedOrbits[jbhLevel]:=jbhListTemp; # store this sorting in jbhSortedOrbits jbhCount[jbhLevel]:=1; # This is the first point at this level (left to right in lattice) jbhGProduct:=Inverse(jbhGProduct); jbhGamma:=OnPoints(jbhSortedOrbits[jbhLevel][jbhCount[jbhLevel]],jbhGProduct); jbhTransversal[jbhLevel]:=jbhSchreierToTransversal(jbhChainMulti[1][jbhLevel],jbhGamma,jbhChainMulti[2][jbhLevel],jbhChainMulti[3][jbhLevel]); od; Print(OnTuples(jbhOrder,jbhFormProduct(jbhTransversal,jbhLevel)),"=",jbhFormProduct(jbhTransversal,jbhLevel),"\n"); while jbhLevel > 0 and jbhCount[jbhLevel]=Size(jbhChainMulti[2][jbhLevel]) do jbhLevel:=jbhLevel-1; od; if jbhLevel = 0 then return; fi; jbhCount[jbhLevel]:=jbhCount[jbhLevel]+1; jbhGProduct:=Inverse(jbhFormProduct(jbhTransversal,jbhLevel-1)); jbhGamma:=OnPoints(jbhSortedOrbits[jbhLevel][jbhCount[jbhLevel]],jbhGProduct); jbhTransversal[jbhLevel]:=jbhSchreierToTransversal(jbhChainMulti[1][jbhLevel],jbhGamma,jbhChainMulti[2][jbhLevel],jbhChainMulti[3][jbhLevel]); od; end; jbhBasicBacktrackFull := function(jbhGenerators,jbhDomain) local bsgs, chain; bsgs:=jbhSchreierSims(jbhGenerators,[]); chain:=jbhStabilizerChainStrong(bsgs[1],bsgs[2]); jbhBasicBacktrack(bsgs[2],jbhDomain,chain); end;