New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poset of Alternating sign matrices #12930
Comments
Changed keywords from alternating sign matrices, posets to alternating sign matrices, posets, days38 |
comment:2
I have implemented the reverse bijection under the name "to_contre_tableau" I have also implemented the lattice, but only for alternating sign matrices, because contre-tableau are not hashable. |
Author: Frédéric Chapoton |
comment:3
Replying to @fchapoton:
Thanks Frederic for implementing this! However, at Sage Days 38 Pierre Cagne pierre.cagne@ens.fr also implemented this bijection and the poset. He got over the problem of nonhashable matrices. I recently contacted him to post his patch, but have not heard since. I added his e-mail to this ticket. Hopefully he will post his patch here as well. Best wishes, Anne |
comment:4
Sorry for the delay, I didn't have the time lately. But as Anne said, I implemented it (with the help of Luis Serrano) and I used the occasion to do some cleaning in the file alternating_sign_matrix.py. To get the lattice, just use the 'lattice' method of your object of type AlternatingSignMatrices or MonotoneTriangles. (I got round the non-hashability of the lists for the monotone triangles by making them tuples.) Regards. EDIT : that's my first patch, do I have to add my name as 'Authors' in the ticket ? |
comment:5
Well, I guess my patch is no longer useful.
|
Changed author from Frédéric Chapoton to Pierre Cagne |
comment:7
Hi Pierre, Thanks for your work on this. I will also put your patch on the sage-combinat server since it will be easier to review it that way. Thanks, Anne |
comment:8
Hi Pierre, Here are some first comments on your patch:
But please reuse all of it in the appropriate places.
So much for now. Impressive work for a first patch! Anne |
Reviewer: Frederic Chapoton, Anne Schilling |
This comment has been minimized.
This comment has been minimized.
comment:10
Thanks for pointing those things out, Anne. The failure you get with 'sage -t' is due to something weird about doctesting (cf #10458, you can't use multi-line tests due to some formattings by the IPython interactive shell). But removing this, I get a ton of others doctest failure : i'm working on it. I notably get some failure about the tests which passed for the implementation with CombinatorialClass because of the inherited methods like first(), last() or random_element(). By dropping out the inheritance in favor of Parent, we loose those kind of methods. However, the implementations of those are naive and do not bring any improvement in comparison with a user's straightforward implementation.
So I'm wondering about the usefulness of the reimplementation of those methods. Maybe can we skip them ?
Remark that some methods assert the use of monotone triangles (like lattice()). I noticed also that EXAMPLES and TESTS are checked by 'sage -t' : is there a real difference between them ? Regards, Pierre |
comment:11
Hi Pierre,
Could you point me to the line in your code? I think if you use
instead of
it should work. I noticed that sometimes you do not repeat a definition (for example of A) from one doctest to the next. Is this the problem when you remove the offending doctest?
Most likely skipping them is ok. Perhaps confirm this with Nicolas.
Don't we want to get rid of the name contre-tableaux at some point? I was thinking of deprecating that name, so that at some point there would only be monotone_triangles.
Yes, both are tested. For myself, I usually use EXAMPLES if these are tests that are also useful for the user to read to understand how the code is used. TESTS is for internal tests like in Best wishes, Anne |
comment:12
Yes, that is the trick explained in #10458. But this is definitely something to fix : we want to be able to copy/paste our tests from the sage shell.
Yes, it was careless mistakes. I fixed it.
I think it is better too. I will contact Nicolas about that.
Well, yes. I was just thinking about compatibility with older code. But I can switch to monotone triangles only (or at least default) and go through a deprecation cycle.
Ok, thanks. I see now. Pierre |
comment:13
Replying to @sagetrac-PierreCagne:
Sure, but the above works and you can use it for now for your patch to get the tests to pass!
Did you post your new patch? When you do, could you please also put the new version on the sage-combinat server (well, if it is too complicated for you, I can do it, but it is easier to review this way for me).
Yes, I think we should start the deprecation cycle. Best wishes, Anne |
comment:14
I am not aware of this sage-combinat server. But I will find out if it is easier for some reviewers to use it. |
comment:15
Replying to @sagetrac-PierreCagne:
See http://wiki.sagemath.org/combinat/MercurialStepByStep Thanks, Anne |
comment:16
I have done some clean-up work on the file. apply only trac_12930-add_mt_lattice-v2 |
This comment has been minimized.
This comment has been minimized.
comment:17
New patch, with clean-up of all whitespaces in the file. |
Changed reviewer from Frederic Chapoton, Anne Schilling to Frédéric Chapoton, Anne Schilling |
This comment has been minimized.
This comment has been minimized.
comment:20
Hi! I just posted a slightly revised patch with some extra doctests and some clean-up in the documentation. Please deprecate the old contre_tableaux methods and classes. Other than that, the patch seems to be finished. Anne |
comment:21
For the bot: apply only trac_12930-add_mt_lattice-as.patch |
This comment has been minimized.
This comment has been minimized.
comment:22
apply only trac_12930-add_mt_lattice-v2.patch I have added deprecations, but I am not sure that I have done it right. Could you please check ? Is it necessary to deprecate every single method in the classes of contre-tableaux ? I have not done that. |
comment:23
Well, it seems that something is going wrong with deprecations. I have no idea what to do. Did I make a mistake ? Is this because I have made the patch with a sage 5.2 ? |
clean-up |
comment:24
Attachment: trac_12930-add_mt_lattice-v2.patch.gz well, I removed some of the deprecations, that were seemingly misplaced. Probably one still has to deprecate every single function on contre tableaux. |
comment:25
apply only trac_12930-add_mt_lattice-v2.patch |
comment:26
Looks good now. I will set a positive review. Anne |
comment:28
Thanks ! |
Merged: sage-5.6.beta0 |
Implementation of the poset of alternating sign matrices
This is best done by implementing a bijection to monotone triangles (or contre tableaux). This was already done in MuPAD
http://mupad-combinat.svn.sourceforge.net/viewvc/mupad-combinat/trunk/MuPAD-Combinat/lib/COMBINAT/alternatingSignMatrices.mu?view=log
One way of the bijection is already implemented::
It remains to implement the reverse bijection, and the ASM lattice from the ContreTableaux lattice.
Apply attachment: trac_12930-add_mt_lattice-v2.patch
CC: @sagetrac-sage-combinat @sagetrac-PierreCagne
Component: combinatorics
Keywords: alternating sign matrices, posets, days38
Author: Pierre Cagne
Reviewer: Frédéric Chapoton, Anne Schilling
Merged: sage-5.6.beta0
Issue created by migration from https://trac.sagemath.org/ticket/12930
The text was updated successfully, but these errors were encountered: