#18787: Bug with products of symbolic variables with modular integers
-----------------------------+------------------------
Reporter: tmonteil | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.8
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+------------------------
Comment (by nbruin):
A different issue, but it might be related:
{{{
sage: F=sum((i+1)*x^i for i in [0..20])
sage: G=sum(Zmod(7)(i+1)*x^i for i in [0..20])
sage: F*Zmod(7)(1) - G
x^19 + 2*x^18 + 0*x^13 + 0*x^6
sage: G*Zmod(7)(1) - G
0
}}}
so there seems to be something fishy with symbolic multiplication
involving integers and elements of Z/n in general. It's not just a zero-
divisor problem.
It's not just powers either:
{{{
sage: V=[SR.var("x%s"%i) for i in [0..20]]
sage: F=sum((i+1)*V[i] for i in [0..20])
sage: G=sum(Zmod(7)(i+1)*V[i] for i in [0..20])
sage: sage: F*Zmod(7)(1)-G
-x0 + 0*x13 + 6*x14 + 0*x20 + 3*x3 + 0*x6
sage: F-G
14*x13 + 21*x20 + 7*x6
}}}
The last one is correct, since the terms with x6, x20 and x13 are really
missing from G. This illustrates why mixing characteristics in SR is
always going to be a mess (even if non-zero characteristic works properly
otherwise).
--
Ticket URL: <http://trac.sagemath.org/ticket/18787#comment:6>
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.