Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Source code for "Dimensions of compositions modulo a prime"

34 views
unlisted
ubuntu2204
Kernel: SageMath 10.6
#Compute dimensions of compositions by definition rk = 6 # rk is the rank of the Coxeter group W = CoxeterGroup(["E",rk]) R = [] # R = [ ribbon numbers ] for s in range(2^rk): R.append(0) # initiate each ribbon number to zero for w in W: j = sum(2^(i-1) for i in w.descents()) # index the descent set of w R[j] = R[j] + 1 # add one to the corresponding ribbon number R.sort(); print(R) # list the ribbon numbers increasingly for p in [2,3,5,7,11,13]: c = [] # c is the composition dimension vector for i in range(p): c.append(0) # initiate each component of c to zero for r in R: c[r%p] = c[r%p] + 1 # add one to the component of c corresponding to each ribbon number mod p print(p, gcd(c).factor(), [i/gcd(c) for i in c]) # display the prime p and the composition dimension vector c with gcd(c) factored out
[1, 1, 26, 26, 26, 26, 71, 71, 190, 190, 190, 190, 215, 215, 215, 215, 217, 217, 334, 334, 334, 334, 530, 530, 530, 530, 647, 647, 647, 647, 649, 649, 719, 719, 793, 793, 793, 793, 838, 838, 838, 838, 1106, 1106, 1106, 1106, 1151, 1151, 1225, 1225, 1225, 1225, 1414, 1414, 1414, 1414, 1729, 1729, 2042, 2042, 2042, 2042, 2663, 2663] 2 2^5 [1, 1] 3 2^5 [0, 1, 1] 5 2 [8, 7, 5, 5, 7] 7 2^2 [4, 2, 1, 2, 0, 7, 0] 11 2 [1, 4, 5, 2, 7, 1, 6, 3, 1, 2, 0] 13 2 [5, 5, 0, 2, 1, 0, 3, 3, 2, 3, 6, 1, 1]
k = 4 # Example 3.8 (type A_n, where n is a sum of k distinct nonnegative powers of p) c = [] # c[p] is the composition dimension p-vector divided by 2^(n-2^k+1) Pr = [2,3,5,7,11,13,17,19,21,23] # Pr is a list of primes for p in Pr: # initiate c l = [] for i in range(p): l.append(0) c.append(l) # initiate c[p] BL = posets.BooleanLattice(k) #BL is the Boolean lattice of rank k print(BL.list()); BL.plot() # display BL for T in Set(range(1,2^k-1)).subsets(): # see Cor. 3.5 for the definition of T r = 0 for f in BL.subposet(T).chains(): r = r + (-1)^(len(f)) # see Cor. 3.5 for the definition of r for j in range(len(Pr)): p = Pr[j]; i = r%p if i == 0: c[j][i] = c[j][i] + 1 # add one to the component of c[j] corresponding to i else: c[j][i] = c[j][i] + 1/2 # add half to the component of c[j] corresponding to i c[j][p-i] = c[j][p-i] + 1/2 # add half to the component of c[j] corresponding to -i for i in range(len(Pr)): print(Pr[i], c[i])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] 2 [8960, 7424] 3 [7766, 4309, 4309] 5 [7606, 3636, 753, 753, 3636] 7 [7604, 3630, 673, 87, 87, 673, 3630] 11 [7604, 3630, 672, 81, 6, 1, 1, 6, 81, 672, 3630] 13 [7604, 3630, 672, 81, 6, 1, 0, 0, 1, 6, 81, 672, 3630] 17 [7604, 3630, 672, 81, 6, 1, 0, 0, 0, 0, 0, 0, 1, 6, 81, 672, 3630] 19 [7604, 3630, 672, 81, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 81, 672, 3630] 21 [7604, 3630, 672, 81, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 81, 672, 3630] 23 [7604, 3630, 672, 81, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 81, 672, 3630]