Opened 8 years ago
Last modified 8 years ago
#16179 needs_info enhancement
Implement Algebra of Words and some linear operators
Reported by: | virmaux | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | combinatorics | Keywords: | |
Cc: | slabbe, aschilling, nthiery, vdelecroix, tscrim | Merged in: | |
Authors: | virmaux | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/virmaux/16179 (Commits, GitHub, GitLab) | Commit: | 5e4168c49dbe265a7ca6ece31e0a688bc3580b14 |
Dependencies: | Stopgaps: |
Description
Implement the algebra R<A> for a ring R and an alphabet A. We also implement linear operators e, f, sigma and zeta as defined in [Lothaire, M. (2011), Algebraic combinatorics on words, Encyclopedia of Mathematics and Its Applications 90, Cambridge University Press].
Change History (9)
comment:1 Changed 8 years ago by
- Branch set to u/virmaux/16179
- Commit set to 5e4168c49dbe265a7ca6ece31e0a688bc3580b14
comment:2 Changed 8 years ago by
- Status changed from new to needs_review
comment:3 Changed 8 years ago by
- Cc vdelecroix added
comment:4 Changed 8 years ago by
Hi Aladin,
You did good about the tests in the documentation! As I am (as well as many others) not familiar with algebras it would be nice to explain what are the e
, f
, zeta
and sigma
operators in the docstring of the methods. (I like learning math by digging in Sage documentation but hate having to guess what are the specifications of a function)
For the design, most piece of code related to categories (which intend to be generic code) must go inside sage/categories or for some rare case in sage/structure. You decided to implement the category of your object as a subclass of itself... which means that the code is not generic. So I would not put that as category code but directly inside the Element. If you have a strong argument about creating a category for the FreeAlgebra
please explain it on both this ticket and the file where the code belongs to. On the other hand, in his axioms related peregrinations in #10963, Nicolas proposed to have a .Free()
(meaning that I would be able to do Groups().Free()
to choose my category). So your code might move to somewhere more appropriate in the future.
There already is a FreeAlgebra
in sage.algebras.free_algebra
. What I would naturally do is to move your ElementMethods
as methods of FreeAlgebraElement
in sage.algebras.free_algebra_element
. If you are not happy with the current FreeAlgebra
which is rather old, it would be nice to refresh it a bit.
Vincent
comment:5 Changed 8 years ago by
- Status changed from needs_review to needs_info
comment:6 Changed 8 years ago by
- Cc tscrim added
FYI #14848 makes FreeAlgebra
into a subclass of CombinatorialFreeModule
.
I do have a question. Are you considering infinite words as elements of this algebra? If not, then I think you should add methods/functionality directly to FreeAlgebra
(where the arg names
gives the alphabet).
comment:7 Changed 8 years ago by
Thank you for the comments, I will play with FreeAlgebra? and will try to use it.
comment:8 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:9 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
New commits:
beginning of work on words_algebra
refactorization in a category, added operators e, f, sigma, zeta on words algebra
documentation