#19631: reduced_word breaks for automatic_monoids if not initialised
-------------------------------------+-------------------------------------
       Reporter:  hivert             |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.10
      Component:  combinatorics      |   Resolution:
       Keywords:  submonoids,        |    Merged in:
  reduced word                       |    Reviewers:  Travis Scrimshaw
        Authors:  Florent Hivert     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  2b8592222d38dbc60f2f74280be68c648df1d4e6
  u/hivert/reduced_word_breaks_for_automatic_monoids_if_not_initialised|     
Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by hivert):

 Replying to [comment:5 tscrim]:
 > LGTM (although I would have `from_reduced_word` set the `_reduced_word`
 attribute of the element, but that's for a different ticket).

 This is done by the call to `self.parent().construct(up_to=self)`:
 {{{
 sage: sage: from sage.monoids.automatic_semigroup import
 AutomaticSemigroup
 sage: sage: R = IntegerModRing(101)
 sage: sage: M = AutomaticSemigroup(Family({1: R(3), 2: R(5)}),
 one=R.one())
 sage: sage: e = M.from_reduced_word([1, 1, 1, 2, 2, 2])
 sage: e
 42
 sage: e.__dict__
 {'_reduced_word': None}
 sage: e.reduced_word()
 [1, 1, 1, 2, 2, 2]
 sage: e.__dict__
 {'_cache__transition': {},
  '_reduced_word': [1, 1, 1, 2, 2, 2],
  'transition': Cached version of <function transition at 0x7f91a1a87a28>}
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19631#comment:7>
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