Ah, that explains it! I tried
b = FormalSum([(2,'x')],parent=GF(7))
when I should have tried
b = FormalSum([(2,'x')],parent=FormalSums(GF(7)))
The latter gives me
sage: 5*b
3*x
sage: 5*b == 12*b
True
and this is what I wanted.
Thanks a lot,
Christian
John Cremona wrote:
>
Your mistake is to force the parent to be GF(7). The parent is not
the coefficient ring. Try
sage: FormalSum?
Type: type
Base Class:
String Form:
Namespace: Interactive
File: /home/john/sage-3.4.2/local/lib/python2.5/site-packages/sage/
structure/formal_sum.py