> Thanks! If you don't mind the overhead, I'd suggest to put your code
> on the Sage-Combinat patch server to ease playing around with it and
> merging/coordinating with related patches on the topic.

I was unable to get a working combinat queue. With sage-4.3.alpha1
I get errors in trac_7420-fix-infinite-coercion-discovery-loop.patch.

I did however make a trac ticket:

http://trac.sagemath.org/sage_trac/attachment/ticket/7751/

There are quite a few changes from yesterday. I took your advice and
made a class for Kazhdan Lusztig polynomials, with methods for the
R and P polynomials. I also added a trace feature, so that you
can follow the function calls. Try

sage: R.<q>=QQ[]
sage: W = WeylGroup("F4", prefix = "s")
sage: [s1,s2,s3,s4]=W.simple_reflections()
sage: KL = KazhdanLusztigPolynomial(W,q,trace=true)
sage: KL.P(s4,s1*s2*s3*s4*s3*s2)

If you omit the cache=true, it takes 50 seconds to compute this
polynomial. (However coxeter3 gives it instantly.) But speed is
much better than yesterday. I found a good speedup by caching
reduced words for Weyl group elements. I think it's 3 or 4
times faster now.

At the moment I don't have it working for anything but
finite Weyl groups.

I added a method to produce the reflections of the Weyl group.
This is implemented for finite Weyl groups only. The reflections
(i.e. conjugates of the simple reflections) are in bijection
witht he positive roots, and sometimes you want to know the
corresponding elements, so this returns a dictionary:

sage: W = WeylGroup("A3", prefix = "s")
sage: W.reflections()

{s1*s2*s3*s2*s1: (1, 0, 0, -1),
 s1*s2*s1: (1, 0, -1, 0),
 s1: (1, -1, 0, 0),
 s2*s3*s2: (0, 1, 0, -1),
 s2: (0, 1, -1, 0),
 s3: (0, 0, 1, -1)}

I added a method to produce the Bruhat graph. This is a
graph structure on the Bruhat interval {t | u <= t <= v}
in which x and y are adjacent if x y^(-1) is a reflection.
(Introduced I think by Carrell and Peterson but inspired by
Deodhar.) So you can:

sage: W = WeylGroup("A3",prefix="s")
sage: [s1,s2,s3] = W.simple_reflections()
sage: W.bruhat_graph(s1*s3,s2*s1*s2*s3*s2).plot()
sage: W.bruhat_graph(s1*s3,s2*s1*s2*s3*s2*s1).plot()

> > (1) The algorithms should be moved to coxeter_groups.py.
> > They are applicable to arbitrary coxeter groups.
> > I put them in weyl_groups.py because I'm more familiar
> > with that file and wanted to get a fast prototype.
> 
> Ok. I can't promise to work on this shortly, so I'd suggest you give
> it a shot yourself. It's mostly a question of putting the methods for
> the parent in ParentMethods, and the methods for the elements in
> ElementMethods in the CoxeterGroups class (leaving for the moment the
> option handling to the constructor of WeylGroup).

I will try to do this but it may not be until after Christmas.

Dan

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to