sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.33k stars 453 forks source link

Implementation of the SubwordComplex as defined by Knutson and Miller #11010

Closed stumpc5 closed 8 years ago

stumpc5 commented 13 years ago

This patch provides an implementation of the subword complex:

Fix a Coxeter system (W,S). Let Q = be a finite word in S and pi in W.

The subword complex Delta(Q,pi) is then defined to be the simplicial complex with vertices being {0,...,n-1}, (n = len(Q), one vertex for each letter in Q) and with facets given by all (indices of) subwords Q' of Q for which Q\Q' is a reduced expression for pi.

    sage: W = CoxeterGroup(['A',2],index_set=[1,2])
    sage: w = W.from_reduced_word([1,2,1])
    sage: C = SubwordComplex([2,1,2,1,2],w); C
    Subword complex of type ['A', 2] for Q = [2, 1, 2, 1, 2] and pi = 121
    sage: C.facets()
    {(1, 2), (3, 4), (0, 4), (2, 3), (0, 1)}

Component: combinatorics

Keywords: subword complex, simplicial complex

Author: Christian Stump

Branch/Commit: 17518c1

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/11010

stumpc5 commented 13 years ago

Author: Christian Stump

stumpc5 commented 13 years ago

Description changed:

--- 
+++ 
@@ -13,6 +13,4 @@
     {(1, 2), (3, 4), (0, 4), (2, 3), (0, 1)}

-depends on Ticket #8359.

-I will upload the patch as soon as the patch on Coxeter groups is ready. +Depends on Tickets #8359 and #11122.

stumpc5 commented 13 years ago

Changed keywords from none to subword complex, simplicial complex

stumpc5 commented 13 years ago

Description changed:

--- 
+++ 
@@ -5,12 +5,10 @@
 The subword complex Delta(Q,pi) is then defined to be the simplicial complex with vertices being {0,...,n-1}, (n = len(Q), one vertex for each letter in Q) and with facets given by all (indices of) subwords Q' of Q for which Q\Q' is a reduced expression for pi.
stumpc5 commented 13 years ago

Dependencies: 11187, 11122

stumpc5 commented 13 years ago

Changed dependencies from 11187, 11122 to #11187, #11122

stumpc5 commented 12 years ago

Changed dependencies from #11187, #11122 to #11122

fchapoton commented 11 years ago

Changed dependencies from #11122 to #12774

stumpc5 commented 11 years ago
comment:7

Replying to @fchapoton:

Okay, I must confess that I tend to not finish implementations once the patch does what I want it to do...

The dependencies of this patch must (unfortunately) inherit as well the dependencies of #11122. This is to say that this patch actually relies on many things implemented in #11187.

I would be very, very glad if anyone would finally start reviewing the universal cyclotomic field, #8327 on which #11187 depends (I would first need to rebase it, and make sure that the trac version is updated to the newest version on the combinat queue).

Cheers, Christian

stumpc5 commented 11 years ago

Changed dependencies from #12774 to #11187, #12774

stumpc5 commented 11 years ago

Attachment: trac_11010-subword_complex-cs.patch.gz

fchapoton commented 10 years ago

Branch: u/chapoton/11010

fchapoton commented 10 years ago
comment:10

I have made a git branch. It does not work: runs into an infinite recursion because of #15456.


New commits:

3b8df81trac_11010-subword_complex-cs.patch
a525fdctrac #11010 code clean-up
fchapoton commented 10 years ago

Commit: a525fdc

fchapoton commented 10 years ago
comment:11

The code needs to be 100% doctested. Some empty methods should be removed.

fchapoton commented 10 years ago

Work Issues: coverage

fchapoton commented 10 years ago

Changed dependencies from #11187, #12774 to #11187, #12774, #15456

fchapoton commented 10 years ago
comment:12

Hello Christian, do you really think that this ticket depends on #11187 ?

I am tempted to ressurect this one, without waiting for the famous category-and-axiom ticket.

With not so much work, I managed to get a branch with only 19 failures.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from a525fdc to 76afdca

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

4f3945dtrac_11010-subword_complex-cs.patch
e77f24dtrac #11010 code clean-up
0599a0atrac #11010 has_descent is better
76afdcatrac #11010 more corrections, and rebased
fchapoton commented 10 years ago
comment:14

Here is a better branch.

I am removing the dependencies to #11187, #15456 as I think they are not really needed.

There are still 16 failing doctests. Work in progress.

fchapoton commented 10 years ago

Changed dependencies from #11187, #12774, #15456 to #12774

stumpc5 commented 10 years ago
comment:15

Dear Frederic,

Thanks for your work on that -- I am super busy with other stuff, hopefully this will get better in about 4 weeks from now.

I am not sure if I/we should keep the construction for positive genus:

I should be able to quickly look at your branch during the weekend to clean things up a bit. Or do you prefer to work things out yourself?

Cheers, Christian

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

8864315trac #11010 one more doctest passing
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 76afdca to 8864315

fchapoton commented 10 years ago
comment:17

Hello Christian,

I would be happy to see you come back here. The code is not very easy to understand by me alone.

The remaining issues (15 doctests) seem to be related to a strange use of roots, where Weyl group elements seem to be supposed to act on the indices of roots in the list of roots. And they do not, of course.

I will not do anything more on the ticket until next week.

stumpc5 commented 10 years ago
comment:18

Replying to @fchapoton:

Hi,

I would be happy to see you come back here. The code is not very easy to understand by me alone.

I spend some time today trying to get Sage working properly again, but I failed so far. I guess I need someone helping me to work properly with git...

I don't know how to resolve that now (and I also don't know if I tried to upgrade to the newest development version or the latest stable version).

The remaining issues (15 doctests) seem to be related to a strange use of roots, where Weyl group elements seem to be supposed to act on the indices of roots in the list of roots. And they do not, of course.

I use the CHEVIE implementation of finite reflection groups which are implemented as permutation groups on indices of roots. This speed things drastically, but it is not reall mathematically clean. Moreover, I just looked at the code, and

stumpc5 commented 10 years ago
comment:19

Hello Frederic,

I now spent some time playing with the patch.

My main concern is: I can re-implement things to work with any implementation of Coxeter groups (i.e., with the current implementations of Weyl groups and Coxeter groups). BUT: this will slow down things drastically!

So we either leave this ticket open and wait for my CHEVIE version of Coxeter groups,

11187 (I am not too positive that these will make it into Sage this year though), or we get rid of the speedy implementations and have a slow version to play in very low ranks that can be used soon.

Cheers, Christian

stumpc5 commented 10 years ago

Changed branch from u/chapoton/11010 to u/stumpc5/ticket/11010

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 8864315 to ab914f5

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

014fec2got the doctests of complex reflection group category pass
d3198f9fixing a few bugs on coxeter number and fundamental invariants
e2736f6added another doctest
8db1deefirst version of adding functionality to coxeter group categories
425ca38first version of coxeter groups from chevie with all tests passing!
c0a036bAvoid creation of _reduced_word during iteration
405b26cturned well-generated into an axiom
0639665fixed a but with Word(reduced_word) we worked on yesterday
28f8abdadded a test for well generated
ab914f5first version of the subword complexes as of 2015
93808305-b40a-4e51-9e5e-87b8badd3758 commented 9 years ago

Changed branch from u/stumpc5/ticket/11010 to u/vpilaud/ticket/11010

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from ab914f5 to bd4f2ad

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

bd4f2adimprove the subword complex, first version of plot in type B
stumpc5 commented 9 years ago
comment:26

Vincent, please remove the c and the html file again from the branch since they are not supposed to be going into sage.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from bd4f2ad to f165d54

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

f165d54pseudoline representation of facets of type B subword complexes, more documentation
fchapoton commented 9 years ago
comment:28

does not apply, needs to be rebased

fchapoton commented 9 years ago

Changed dependencies from #12774 to #12774, #11187

fchapoton commented 8 years ago
comment:30

I have made a new branch, by disentangling u/vpilaud/ticket/11010 from #11187 (but sadly still depending on #11187).

It seems that all my previous work on this ticket was lost. I do not appreciate.


New commits:

bbff606first version of the subword complexes as of 2015
0aa6989trac #11010 full pep8 and pyflakes
fchapoton commented 8 years ago

Changed branch from u/vpilaud/ticket/11010 to u/chapoton/11010

fchapoton commented 8 years ago

Changed commit from f165d54 to 0aa6989

stumpc5 commented 8 years ago
comment:31

It seems that all my previous work on this ticket was lost. I do not appreciate.

I don't understand. How can work be lost on a ticket?

fchapoton commented 8 years ago
comment:32

Sorry for having been a little rude. I was tired and angry yesterday evening.

It remains that I have done twice the same clean-up work. I think it was because the branch by Vincent was not based on my previous branch.

I would really like if this ticket would no longer depend on #11187, which has no hope to enter sage as long as it depends on gap3.

You said once that it could be possible, but with a high speed penalty. Maybe this is nevertheless the way to go.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 0aa6989 to 32da9d2

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

9dccaa7Merge branch 'u/chapoton/11010' into 6.10.b4
32da9d2trac #11010 newstyle doctest continuation
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 32da9d2 to 0468798

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0468798trac #11010 make sure that doc builds
tscrim commented 8 years ago
comment:36

As far as I can see, just one thing is needed:

We can construct this easily enough by conjugation of simple reflections:

sage: W = CoxeterGroup(['A',2])
sage: S = W.simple_reflections()
sage: I = W.index_set()
sage: R = RecursivelyEnumeratedSet(S, lambda x: [S[i]*x*S[i] for i in I if not x.has_descent(i)], structure="graded")
sage: list(R)
[
[-1  1]  [ 1  0]  [ 0 -1]
[ 0  1], [ 1 -1], [-1  0]
]
sage: all(x.absolute_length() for x in R)
True

The apply_simple_reflection is already a part of Sage for Coxeter groups.

Aside - This probably deserves to be in the category of finite Coxeter groups, but there is some slight conflict with this

sage: W = WeylGroup(['A',2], prefix='s')
sage: W.reflections()
Finite family {s1*s2*s1: (1, 0, -1), s1: (1, -1, 0), s2: (0, 1, -1)}

(Trying to do this on the Weyl group on the root system seems to run forever and ctrl-C out results in a nasty error message.)

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

2d84a4btrac #11010 little more doc