4 | | * implement Language (= set of Word) and its children FactorialLanguage, ProlongableLanguage, etc |
5 | | * consider a word as element of a language and move elsewhere the methods of Word that does not fit to this framework |
6 | | * change Words into FreeMonoid |
7 | | * coercion |
| 4 | * Use EnumeratedSets and GradedEnumeratedSets to build a class Language and use it as a base class for sage.combinat.words.words.Words_over_ordered_alphabet |
| 5 | * move into a derived class the current methods of Word that does not fit to this framework |
| 6 | * Inheritate from Monoid for the language of all words on a given alphabet and see the overlap with the code in sage.monoids.* |
| 7 | * coercion between different languages (on the top is the FreeMonoid) |
| 8 | |
| 9 | To think about: |
| 10 | * what should be in the parent, what should be in the element ? |
| 11 | * what do we keep of the current methods of Word ? |
| 12 | * in general a language is not a monoid... but some of them are (FullShift, the words with the same number of each letter, ...). Find a way to use the Monoid category in these cases. Remark that a language which is also a monoid is completely defined by its irreducible words (the word that can not be built from concatenation of smaller words). |