-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Poincaré-Birkhoff-Witt and dual bases #14898
Comments
Attachment: trac_18484_PBW_basis.patch.gz |
Attachment: pbw.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:3
Attachment: 14898.patch.gz What exactly is the Poincaré-Birkhoff-Witt basis of a free algebra? Free algebras have exponential growth, and PBW bases have polynomial growth, so I don't see how a free algebra can have a PBW basis. I may very well be missing something, but I think you need to explain what this term means in this context, and probably provide a reference. |
comment:4
The reference which I would cite is Reutenauer, Free Lie algebra. |
comment:5
Maybe instead of putting this into |
comment:6
Following Reutenauer, chapter 5, it might be a better idea to call the basis I implemented the Lyndon basis of the free algebra. |
Attachment: Lyndon_dual_bases.patch.gz |
comment:7
Right now I'm working on an initial version of Lie algebra's on #14901 (of which, I have a good amount of work done on the combinat queue and can post the [incomplete] patch on trac if desired), and it sounds like we should make sure to say in sync to not duplicate code and to have these play together. Currently #14901 depends on #10963, so I think we're better of finishing the part on the free algebra first and making #14901 depend on this ticket. A few things from glancing over the patches:
Hope everything is going well. Thanks, Travis |
comment:8
Make sure all methods you add have docstrings and doctests.
Could you fold all of the patches into a single patch? This makes it easier to review.
Set it to "needs_review" when you're ready for someone to do the review. (which I volunteer)
Did you work on this during Sage Days 49? If so, could you add "days49" to the keywords.
|
comment:9
Hey Matthieu, Sorry for falling behind on this. So to fold a patch, start at "base.patch", then run
(also for the record, if you want to rename your patch, you can run Once that is done and the new version is uploaded, I'll continue the review. One other thing, if you keep the same name, please check the "replace previous file" box in the uploads. Thanks, Travis |
comment:10
Thank you for your answer. I got lost somewhere: the different patches I uploaded are on the trac server but I don't know where they actually are on my computer (and I deleted the file produced by the method of Frédéric cited above). Should I download the different patches attached to this ticket, fold them and upload the result? |
comment:11
Replying to @sagetrac-deneufchatel:
They should be in
You can if you've removed them from your queue (or installed a new version of Sage); just make sure to run
Because nothing has changed, there is no need for a new patch, which just records the differences.
Not a problem. Hope this helps. Best, Travis |
comment:12
Ok, the different patches are in /devel/sage-test/.hg/patches, thus I should be able to fold them in one file. |
comment:13
It seems like you are in the right folder, but just to make sure could you tell me what folder were you in? Also the patch you want to fold everything into should be the top patch. EXAMPLE: You have the patches Hope that makes sense and helps. |
comment:14
sage -hg qtop returns "no patches applied"! |
comment:15
Are you also doing |
comment:16
You are right, I was not in the same folder since in /devel/sage-test/.hg/patches, when I run sage -hg qtop, it returns trac_14898_r.patch which is the last patch I created. |
comment:17
And what do I have to do about this? |
comment:18
Run |
comment:19
The patch I want to use is called trac_14898_r.patch. I pushed it on top of the queue (but sage said that it was empty) if I am right: But it does not want to fold the patch trac_14898_PBW.patch Sorry for the delay, I do not have a reliable internet connection. |
comment:20
From your series file,
where So what you should do is the following (the
Hope that helps, Travis |
comment:21
Thank you for your help. I followed the steps above (in the $SAGE_ROOT/devel/sage/sage folder), but when I ran $ sage -hg qfold trac_14898_PBW.patch trac_14898.patch trac_14898_r.patch I still got this abort: qfold cannot fold already applied patch trac_14898_PBW.patch |
comment:22
What's the output when you run |
comment:39
Since you're getting those rejects in |
comment:40
So I compiled sage-5.11 and tried to apply your patch but I still have a problem: [matthieu@localhost sage-5.11]$ ./sage -hg qimport /home/matthieu/Téléchargements/trac_14898-pbw_folded-ts.patch adding trac_14898-pbw_folded-ts.patch to series file [matthieu@localhost sage-5.11]$ sage11 -hg qpush trac_14898-pbw_folded-ts.patch applying trac_14898-pbw_folded-ts.patch patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh trac_14898-pbw_folded-ts.patch Is there a "log file"? |
comment:41
Finally, I think it works but I get lost: the actual branch I work with is sage-test [matthieu@localhost sage-main]$ sage11 -branch test but the files modified by the application of the patch are the file of the main branch [matthieu@localhost sage-main]$ cat sage/algebras/free_algebra.py Tests# Check that expansion \circ to_pbw is the identity # #PBW = PBWBasisOfFreeAlgebra(QQ,2) #to_pbw(expansion(PBW.basis()[PBW._mon.1 * PBW._mon.0]))==PBW.basis()[PBW._mon.1 * PBW._mon.0] #sage: M.<x0,x1>=FreeMonoid(2) #sage: PBW=PBWBasisOfFreeAlgebra(QQ,2) #sage: L=[] #sage: for i in range(6): #....: for j in Words(M.gens(),i).list(): #....: L.append(to_monoid_element(j)) #....: #sage: for i in L: #....: to_pbw(expansion(PBW.basis()[i]))==PBW.basis()[i] #....: [matthieu@localhost sage-main]$ less sage/algebras/free_algebra.py whereas I would expect the files in sage-test to have been changed... |
comment:42
Does this patch require the patches of Sage Combinat to be installed? When I (successfully) apply the patch, I get an error when I rebuild the library: File "/home/matthieu/sage-5.11/local/lib/python2.7/site-packages/sage/combinat/permutation.py", line 211, in from sage.combinat.composition import Composition ImportError: cannot import name Composition |
This comment has been minimized.
This comment has been minimized.
comment:43
As for why the files in Hmmm....strange. I'm guessing my import statements are causing a circular dependency without #14772? (I did some reworking of the import statements and I recall they were very fickle.) Try moving the added import statements into the functions where we actually call the imported object(s). If that doesn't work, perhaps it is worthwhile (IMO, it is even if the above does work) to install sage-combinat by doing the following:
Best, Travis PS - Sorry for the delay |
comment:44
It works. Thanks. |
comment:45
Great! However here's a new version of the patch which now has the multiplication agreeing between the monomials and the PBW basis. If you're happy with the patch after my changes, you can go ahead and set this to positive review. Best, Travis |
comment:46
I don't agree with your implementation of the multiplication. If u and v are two words, P_u P_v = P_{uv} iff the Lyndon factorization of uv is (u,v); if this is not the case, you have to look at the Lyndon factorization of uv and it is not so straightforward and this is why I did not add it so far. Am I right? |
comment:47
The statement in my last comment is false. But in most cases, P_u P_v \neq P_{uv} (it is true if v is a Lyndon word such that \ell_n \geq v where \ell_n is the last factor of the Lyndon factorization of u). |
comment:48
Because it was driving me slightly nuts (because the basis is a free mult. basis indexed by Lyndon words), I've changed the output of For patchbot: Apply: trac_14898-pbw_folded-ts.patch |
comment:49
I also marked one of the tests in For patchbot: Apply: trac_14898-pbw_folded-ts.patch |
comment:50
I think that your last modification addresses the problem of the product that I was talking about; you did not make any other "theoretical" modification if I am right. In that case, I think I am ok. Matthieu |
comment:51
Yep, no changes except the output format. Then I'll give you the honor of setting this to a positive review. Best, Travis |
comment:53
There is a doctest failure:
|
Attachment: trac_14898-pbw_folded-ts.patch.gz |
comment:54
Fixed. For patchbot: Apply: trac_14898-pbw_folded-ts.patch |
Merged: sage-5.13.beta0 |
Implements:
Also puts
FreeAlgebra
in the category ofAlgebrasWithBases
.Apply: attachment: trac_14898-pbw_folded-ts.patch
CC: @darijgr
Component: combinatorics
Author: Matthieu Deneufchâtel
Reviewer: Travis Scrimshaw
Merged: sage-5.13.beta0
Issue created by migration from https://trac.sagemath.org/ticket/14898
The text was updated successfully, but these errors were encountered: