Opened 8 years ago

# Implement Algebra of Words and some linear operators

Reported by: Owned by: virmaux major sage-6.4 combinatorics slabbe, aschilling, nthiery, vdelecroix, tscrim virmaux N/A u/virmaux/16179 5e4168c49dbe265a7ca6ece31e0a688bc3580b14

### 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].

### comment:1 Changed 8 years ago by virmaux

• Branch set to u/virmaux/16179
• Commit set to 5e4168c49dbe265a7ca6ece31e0a688bc3580b14

New commits:

 ​aea1c8f `beginning of work on words_algebra` ​fc66439 `refactorization in a category, added operators e, f, sigma, zeta on words algebra` ​5e4168c `documentation`

### comment:2 Changed 8 years ago by virmaux

• Status changed from new to needs_review

### comment:4 Changed 8 years ago by vdelecroix

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 vdelecroix

• Status changed from needs_review to needs_info

### comment:6 Changed 8 years ago by tscrim

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 virmaux

Thank you for the comments, I will play with FreeAlgebra? and will try to use it.

### comment:8 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:9 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.