#19619: Simplify words.py
-----------------------------+-----------------------------
   Reporter:  vdelecroix     |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-6.10
  Component:  combinatorics  |         Keywords:
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+-----------------------------
 Currently we have too many parent for words:
  - for finite and infinite words (`Words_all`, `Words_over_alphabet`,
 `Words_over_OrderedAlphabet`)
  - finite words (`FiniteWords_over_OrderedAlphabet`)
  - infinite words (`InfiniteWords_over_OrderedAlphabet`)
  - words of fixed length (`FiniteWords_length_k_over_OrderedAlphabet` and
 `Words_n`)

 This lead to subtle bug like
 {{{
 sage: W = Words([0,1], finite=False, infinite=True)
 sage: u = W.an_element()
 sage: u[2:5].parent()   # a finite word !!
 Infinite Words over {0, 1}
 }}}

 The proposal of this ticket is to have only three classes:
  - `FiniteWords`
  - `Words_n`: words of length `n` (as a slice of the one before)
  - `InfiniteWords` (or `FullShift`)
 The parent `FiniteWords` should hence have a method `.shift()` that return
 the associated shift (e.g `u ** Infinity` will belong there). Similarly,
 the parent `InfiniteWords` should have a method `.factors()` that return
 the set of factors (and finite slices will belong there).

--
Ticket URL: <http://trac.sagemath.org/ticket/19619>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to