#18915: Finite field extension fails if modulus is of type int
----------------------------+----------------------------
   Reporter:  dlucas        |            Owner:
       Type:  defect        |           Status:  new
   Priority:  major         |        Milestone:  sage-6.8
  Component:  finite rings  |         Keywords:
  Merged in:                |          Authors:
  Reviewers:                |  Report Upstream:  N/A
Work issues:                |           Branch:
     Commit:                |     Dependencies:
   Stopgaps:                |
----------------------------+----------------------------
 I noticed the following:


 {{{
 sage: F = GF(2)
 sage: F.extension(int(3), 'a')
 Traceback (most recent call last)
 ...
 UndoundLocalError: local variable 'E' referenced before assignment
 }}}


 and

 {{{
 sage: F = GF(2 ** 4, 'a')
 sage: F.extension(int(3), 'aa')
 Traceback (most recent call last)
 ...
 TypeError: polynomial (=3) must be a polynomial.
 }}}


 while

 {{{
 sage: F.extension(Integer(3), 'aa')
 Finite Field in aa of size 2^12
 }}}


 works fine.

 This is due to the `isinstance` calls which check only if `modulus` is of
 type `Integer` on the dedicated check instead of checking for `int` type
 as well.

--
Ticket URL: <http://trac.sagemath.org/ticket/18915>
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.

Reply via email to