#20250: Sanitizing indexing into iterated power series rings and polynomial
rings
-----------------------+----------------------------
Reporter: roed | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-7.2
Component: algebra | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-----------------------+----------------------------
{{{
sage: f = 1/(1+x+y)
sage: S = PowerSeriesRing(QQ,'x',2)
sage: T = PowerSeriesRing(S,'y',2)
sage: g = T(f)
sage: g
1 - x + O(x^2) + (-1 + 2*x + O(x^2))*y + O(y^2)
sage: g[1][0]
-1
sage: g[1,0]
0
}}}
Moreover:
{{{
sage: S = PolynomialRing(QQ,'x')
sage: T = PolynomialRing(S,'y')
sage: g = T.gen() + S.gen()
sage: g
y + x
sage: g[1][0]
1
sage: g[1,0]
0
}}}
You can even do:
{{{
sage: g[QQ]
0
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/20250>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.