![]() | 1 | initial version |
Getting the denominator takes sage...
# rootType = 'B2'
# weight = (2,2)
rootType = 'B3'
weight = (3,3,3)
# the rootType is e.g. 'B2', or ['B', 2], or RootSystem('B2')
# The weight is a corresponding dominant weight...
B = WeylCharacterRing( rootType )
b = WeightRing( B )
bpr = b.positive_roots()
Weyl = B( weight )
W = Weyl.weight_multiplicities()
r = B.rank()
print "%s :: rank=%s weight=%s" % (rootType, r, weight)
R = range(r)
names = [ 'z%s' % k for k in R ] + [ 'u', ]
ring = PolynomialRing( QQ, names=names )
gens = ring.gens()
z = gens[:-1]
u = gens[-1]
def denomPart( z, u, w ):
"""z, v should be a vectors of length r..."""
return ( prod( [ z[k]^( - w[k] ) for k in R if w[k] < 0 ] )
- u * prod( [ z[k]^ w[k] for k in R if w[k] > 0 ] ) )
def nomPart( z, u, w ):
"""z, v should be a vectors of length r..."""
return ( prod( [ z[k]^( - w[k] ) for k in R if w[k] < 0 ] ) )
MolienDenom = Factorization( [ ( denomPart( z, u, -w ), W[w] ) for w in W ], cr=True )
MolienNom = Factorization( [ ( nomPart( z, u, -w ), W[w] ) for w in W ], cr=True )
WeylDenom = Factorization( [ ( denomPart( z, 1, -w ), W[w] ) for w in bpr ], cr=True )
WeylNom = Factorization( [ ( nomPart( z, 1, -w ), W[w] ) for w in bpr ], cr=True )
DEN = MolienDenom \
* WeylDenom \
* ( MolienNom * WeylNom / prod( z ) ).value().denominator().factor()
# print DEN # this is not humanly readable
print "DEN has the following factors:"
for f in DEN:
print f
...not too much time, if we isolate and use the factorization we have.
Note: The main improvement is to not expand, than (re)factor.
(Since there are too many terms to be recollected after expansion.)
This is obtained by explicitly using the Factorization
constructor. The code was carefully typed, hope that the denominator contribution from the original post were correctly collected. The code was typed so that it is easy to isolate a function getDen( rootType, weight )
.
The DEN
may have no contribution from the third factor (which is a monomial in the z
components.)
Since the complexity of DEN
grows with the one of W
, the results are omitted.