#14848: Inconsistencies with FreeAlgebra
-----------------------+----------------------------------------------------
Reporter: ppurka | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone: sage-5.12
Component: algebra | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-----------------------+----------------------------------------------------
This ticket is "inspired" by [http://ask.sagemath.org/question/2760
/products-in-a-free-algebra this ask.sagemath question].
1. First, there should be an easy way to get the variables out of an
expression in FreeAlgebra. Compare with the output of polynomial ring.
{{{
sage: F.<x,y>=FreeAlgebra(ZZ)
sage: g=4+3*x^7*y^10*x^13
sage: g.variables() # <------------ Need this
sage: h=g._FreeAlgebraElement__monomial_coefficients # This is what we
need to do currently
sage: h.items()[1][0]._element_list # and do more post processing on
the output.
[(0, 7), (1, 10), (0, 13)]
# Compare with polynomial ring
sage: F.<x,y> = PolynomialRing(ZZ)
sage: g=4+3*x^7*y^10*x^13
sage: g.variables()
(x, y)
sage: g=4+3*x^7
sage: g.variables()
(x,)
}}}
2. The element `x^7*y^10*x^13` does not belong to the `FreeAlgebra` class
once it is extracted from the expression. It belongs to `FreeMonoid`. I
think the parent of it should be the same even after we extract it.
{{{
sage: F.<x,y>=FreeAlgebra(ZZ)
sage: g=4+3*x^7*y^10*x^13
sage: h=g._FreeAlgebraElement__monomial_coefficients
sage: h
{1: 4, x^7*y^10*x^13: 3}
sage: hh = h.items()[1][0]; hh
x^7*y^10*x^13
sage: hh.parent()
Free monoid on 2 generators (x, y)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14848>
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/groups/opt_out.