Power series in characteristic 2

21 views
Skip to first unread message

switzel

unread,
Jun 10, 2015, 9:45:32 AM6/10/15
to sage-s...@googlegroups.com
I noticed the following:

F = GF(7)
L.<t> = PowerSeriesRing(F,'t')
R.<x,y> = PolynomialRing(L,'x,y')
vector(R.gens())

gives

(x, y)

But


F = GF(2)
L.<t> = PowerSeriesRing(F,'t')
R.<x,y> = PolynomialRing(L,'x,y')
vector(R.gens())

gives

Traceback (most recent call last):
  [...]
  File "sage/modules/free_module_element.pyx", line 499, in sage.modules.free_module_element.vector (build/cythonized/sage/modules/free_module_element.c:5257)
  File "sage/modules/free_module_element.pyx", line 596, in sage.modules.free_module_element.prepare (build/cythonized/sage/modules/free_module_element.c:5781)
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/structure/sequence.py", line 293, in Sequence
    return PolynomialSequence(x, universe, immutable=immutable, cr=cr, cr_str=cr_str)
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_sequence.py", line 338, in PolynomialSequence
    elif K.degree() == 1:
  File "sage/structure/parent.pyx", line 840, in sage.structure.parent.Parent.__getattr__ (build/cythonized/sage/structure/parent.c:7907)
  File "sage/structure/misc.pyx", line 251, in sage.structure.misc.getattr_from_other_class (build/cythonized/sage/structure/misc.c:1684)
AttributeError: 'PowerSeriesRing_over_field_with_category' object has no attribute 'degree'

I assume this is because power series over GF(2) are implemented specially (and more efficiently) than over arbitrary finite ground field. Still I would like to get the code to run in the second setting. Does anybody know how to do it? (This is really two questions: "does anybody know how to fix the implementation of PowerSeriesRing(GF(2))?" And "does anybody know a quick workaround?")

switzel

unread,
Jun 11, 2015, 4:13:12 AM6/11/15
to sage-s...@googlegroups.com
I traced the problem back and it reduces to this

F = GF(2)
L.<t> = PowerSeriesRing(F,'t')
R.<x,y> = PolynomialRing(L,'x,y')
PolynomialSequence([], R)

failing. The problem is that the constructor of PolynomialSequence distinguishes implicitly between fields of characteristic != 2 and finite fields of characteristic 2 (and L is neither).

I think [1] should fix the problem, but I don't have a workaround at the moment.

[1] https://github.com/sagemath/sage/pull/41


Reply all
Reply to author
Forward
0 new messages