> This is interesting; we should profile this. Can you give a precise
> description of how you constructed the algebra, and a typical
> calculation you wanted to run?
>
> Permutations are written in Cython, and should be rather fast. On the
> other hand, Weyl group elements could be slow (their action on the
> root lattice, which is used for computing descents, could well be the
> bottleneck). Polynomials are supposed to be fast, but I am not sure
> about fraction fields.
OK, it looks like permutations might be innocent and the real culprit
might be e rational functions as suggested by Dima. I've discovered
that there is a %profile command but I didn't work out how to use it.
I had a lot of trouble defining the coefficient ring that I was using.
My first few attempts led to my using symbolic rings in which the
rational functions were never simplified. Eventually I used
FractionField(PolynomialRing(ZZ,'x'));
which may not be optimal either. I wanted to do calculations with
primitive idempotents inside the Iwahori-Hecke algebra. These are
indexed by standard tableaux and can be computed as (is this how you
insert code?)
[code]
F_t = \prod_{k=1}^n \prod_{c\ne c_k(t)} \frac{ L_k-c }
{ c_k(t) - c }
[/code]
where c_k(t) is the content of k in the tableau t and L_k is a Jucys-
Murphy element. Inside sage you can do this as follows:
[code]
sage: R=FractionField(PolynomialRing(ZZ,'x')); x=R.gen()
sage: H=IwahoriHeckeAlgebraT("A3",x,R)
sage: L=[H.one()]; # define Jucys-Murphy elements
sage: for k in xrange(1,4): L.append(H._q1**-1*H.algebra_generators()
[k]*L[k-1]*H.algebra_generators()[k])
sage: content=[0,1,-1,0] # content vector for Tableau([[1,2],[3,4]])
sage: Ft = prod( (L[k]-x**c)/(x**content[k]-x**c) for k in
xrange(len(content)) for c in xrange(-k,k+1) if c<>content[k])
[/code]
This was actually the first step in the calculations that I wanted to
do, which involved taking certain sums of these idempotents reducing
the coefficients modulo an ideal and seeing what happened to them. To
do this I wanted to look the Hecke over the field of fractions of Z[x,
\xi], where \xi is a primitive root of unity.
Andrew
--
You received this message because you are subscribed to the Google Groups
"sage-combinat-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-combinat-devel?hl=en.