{{{id=3| # replace /home/tom/maths/free_sigma/ with the path to cutjoin.sage on your computer load "/home/tom/maths/free_sigma/cutjoin.sage" load "/home/tom/maths/oneloop/correlator.sage" /// }}} {{{id=1| # find the matrix of the projection to sym(alpha) alpha = Permutation([2,3,4,1]) # set sum=0 for matrix sum = symmetrica.odg([2,2],range(1,5)) - symmetrica.odg([2,2],range(1,5)) for perm in sym_group(alpha): sum += symmetrica.odg([2,2],perm) print sum /// [ 3 -sqrt(3)] [-sqrt(3) 1] }}} {{{id=2| # Collect D^\L_{11}(\sigma) into a list LambdaList; multiply by 2 so we have only integers LambdaList=[] for perm in Permutations(4): print symmetrica.odg([2,2],perm)[1,1] LambdaList.append(Integer(symmetrica.odg([2,2],perm)[1,1]*2)) print LambdaList /// 1 1 -1/2 -1/2 -1/2 -1/2 1 1 -1/2 -1/2 -1/2 -1/2 -1/2 -1/2 -1/2 -1/2 1 1 -1/2 -1/2 -1/2 -1/2 1 1 [2, 2, -1, -1, -1, -1, 2, 2, -1, -1, -1, -1, -1, -1, -1, -1, 2, 2, -1, -1, -1, -1, 2, 2] }}} {{{id=4| ## add up the elements of the trace basis n=4 alpha = Permutation([2,3,4,1]) Lambda = [2,2] fields = ['X','X','Y','Y'] fieldContent = [2,2] array = [] counter = -1 for p in Permutations(n): counter = counter+1 addSAGEArray([[LambdaList[counter],p*alpha*p.inverse()]],array,fieldContent) printSAGEArray(array,fields) /// 2^3 XXYY -1 * 2^3 XYXY }}}