#!/usr/bin/env python # coding: utf-8 # In[1]: def x(i): return SR.var('x_{}'.format(i)) # In[2]: def vcoding(lam,g,t): ''' this function returns the V_{g,t} coding of a partition lam is the partition g is the value of the parameter depending on the type of Lie algebra considered t is the rank of the Lie algebra ''' l=lam.length() tmp=[lam[i]-i-1 for i in range(l)] res = [abs(tmp[i]%g) for i in range(l)] #print(tmp) #print(set(res)) #setres =set(res) cnt = 1 while len(set(res))A)} sgn=1 #sgn_diag encodes the value of (-1)^{number of hook lengths A) that are on the main diagonal} sgn_diag=1 #P is the product of hook lengths on the left-hand side of Theorems from Section 4.2 P=1 Q=1 P_hookdiag=1 for i in range(l): for j in range(lam[i]): h=lam.hook_length(i,j) #apart from the type A case, the products on the left-hand side of the theorems in Section 4.2 depend on the position #of a box with respect to the main diagonal if ty=='a': P=P*(x(h))/(x(h+g))*(x(h+2*g))/(x(h+g)) if hj: P=P*(x(h+2*g))/(x(h+g)) vg=vcoding(lam,g,t) '''this part fills Q to be the right-hand side of Theorems from Section 4.2. Since all of variables must be of positive index, the indices are shifted by g. Recall also that range(n) goes from 0 to n-1 which explains the (i+1) and the (j+1) ''' for i in range(len(vg)): if ty=='c': Q=Q*x(vg[i]+g/2)/x(i+1+g) elif ty=='bv': Q=Q*x(vg[i]+g/2+1)/x(i+1+g) elif ty=='d': if x(vg[i]+g/2+1)==0: #here we just handle the exception r_i=0, then tau(2r_i)/tau(r_i)=1 in order to call #hook_functionty for the applications to the q Nekrasov-Okounkov formula Q=Q else: Q=Q*x(2*vg[i]+2)/x(vg[i]+g/2+1) if i