#14848: Inconsistencies with FreeAlgebra
-------------------------------------+-------------------------------------
       Reporter:  ppurka             |        Owner:  AlexGhitza
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  algebra            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/algebras/fix_free_algebras-14848|  
0de106a5831e0a06e9f8f050f35b15d2d3494981
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Travis Scrimshaw', 'oldvalue': ''}):

 * status:  needs_work => needs_review
 * author:   => Travis Scrimshaw
 * cc: nthiery (added)
 * branch:   => public/algebras/fix_free_algebras-14848
 * milestone:   => sage-6.2
 * commit:   => 0de106a5831e0a06e9f8f050f35b15d2d3494981


Comment:

 I've made `FreeAlgebra` inherit from `CombinatorialFreeModule`; it was
 close enough to it to begin with and is something Nicolas and I have
 wanted to do. I've had to hack together a combination of
 `CombinatorialFreeModuleElement` and `AlgebraElement` to pass a doctest in
 `matrix0.pyx` where `FreeAlgebra` is used as a base ring (this inspired
 #15947). So iterating through an element of `FreeAlgera` gives
 `index,coeff` now (finally consistency! this had bugged me a few times).
 I've also added a `variables` method as I don't think it does much harm to
 have it and `support` returns the monomials that occur.

 Regarding point 2, you can now use the `monomial_coefficients()` to
 iterate over pairs (monomial in free algebra, coefficient)] (well...TBH
 actually it's a `dict`, so you need an additional `items()`). Also I agree
 with Nils' opinion.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=771ac4cfefe832d4db2f24e5d5ee74b75b7447a8
 771ac4c]||{{{Converted FreeAlgebra to inherit from
 CombinatrialFreeModule.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=a2d1f8df3751dc79eeab62ad65dbaf5f36c546a6
 a2d1f8d]||{{{Fixes for coercion maps.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=5045cc5ffff734b87c76fe980ccbb8ec23e937a4
 5045cc5]||{{{pyflakes cleanup of free_algebra.py.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=b52e779d8a15c4ff277abc39bdc4e15e2f658f74
 b52e779]||{{{Merge branch 'develop' into
 public/algebras/fix_free_algebras-14848}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=c25070237ed2ae8360999bc8b4c1f6aea1fe33c5
 c250702]||{{{(Hack) Fix for making FreeAlgebraElement work as a base ring
 for matrices.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=0de106a5831e0a06e9f8f050f35b15d2d3494981
 0de106a]||{{{Added variables() method to free module elements.}}}||

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