Ask Your Question
2

bug in minimal polynomials of finite fields

asked 2011-08-15 15:30:28 +0100

finotti gravatar image

In a compiled version of 4.7 (64 bit, Debian Sid), I get:

   ----------------------------------------------------------------------
| Sage Version 4.7, Release Date: 2011-05-23                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: F.<a>=GF(2^64)          
sage: a.minpoly()
_3 = x^64 + x^33 + x^30 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^18 + x^13 + x^12 + x^11 + x^10 + x^7 + x^5 + x^4 + x^2 + x + 1
sage: K.<b>=GF(2^128)
sage: b.minpoly()
_5 = x^128 + x^7 + x^2 + x + 1
sage: a.minpoly()
_6 = x^128 + x^7 + x^2 + x + 1

Is this a bug or am I doing something stupid?

Thanks,

Luis

edit retag flag offensive close merge delete

Comments

This bug is no longer observed in Sage 6.3 (and maybe before). A similar bug was observed, and fixed, in ticket #17094, see http://trac.sagemath.org/ticket/17094, and the fix made its way into Sage 6.4.beta5.

slelievre gravatar imageslelievre ( 2014-11-19 12:53:08 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-08-15 16:04:27 +0100

niles gravatar image

Yes, I think this is a bug. I get consistent behavior from

sage: F = GF(2^64,'a')
sage: K = GF(2^128,'b')
sage: F.gen().minpoly()
x^64 + x^33 + x^30 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^18 + x^13 + x^12 + x^11 + x^10 + x^7 + x^5 + x^4 + x^2 + x + 1
sage: K.gen().minpoly()
x^128 + x^7 + x^2 + x + 1

but it becomes erratic when I start including the generator in global namespace:

sage: a = F.gen()
sage: a.minpoly()
x^64 + x^33 + x^30 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^18 + x^13 + x^12 + x^11 + x^10 + x^7 + x^5 + x^4 + x^2 + x + 1
sage: b = K.gen()
sage: a.minpoly()
x^128 + x^7 + x^2 + x + 1
sage: b.minpoly()
x^128 + x^7 + x^2 + x + 1

sage: F = GF(2^64,'a')
sage: a = F.gen()
sage: b.minpoly()
x^64 + x^33 + x^30 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^18 + x^13 + x^12 + x^11 + x^10 + x^7 + x^5 + x^4 + x^2 + x + 1

On the other hand, the problem seems not to appear for finite fields with different characteristic:

sage: F = GF(2^64,'a')
sage: L = GF(3^64,'c')
sage: c = L.gen()
sage: a = F.gen()
sage: c.minpoly()
x^64 + x^63 + 2*x^60 + x^58 + x^57 + x^56 + x^55 + x^54 + 2*x^52 + x^50 + 2*x^49 + 2*x^48 + x^46 + 2*x^45 + x^44 + x^43 + x^42 + x^41 + 2*x^40 + x^39 + 2*x^37 + 2*x^35 + 2*x^33 + x^31 + 2*x^30 + 2*x^28 + 2*x^27 + x^25 + x^22 + 2*x^20 + x^17 + 2*x^16 + x^15 + x^13 + x^11 + 2*x^10 + 2*x^9 + 2*x^8 + 2*x^7 + 2*x^6 + x^5 + 2*x^4 + x^3 + x^2 + 2*x + 2
sage: a.minpoly()
x^64 + x^33 + x^30 + x^26 + x^25 + x^24 + x^23 + x^22 + x^21 + x^20 + x^18 + x^13 + x^12 + x^11 + x^10 + x^7 + x^5 + x^4 + x^2 + x + 1
edit flag offensive delete link more

Comments

Thanks! (Are you a Sage developer? Should I consider the bug reported?)

finotti gravatar imagefinotti ( 2011-08-15 17:32:38 +0100 )edit

Glad to help; I've done some Sage development, but the bug isn't reported until it's been filed at trac.sagemath.org. I'll post back here when this is done.

niles gravatar imageniles ( 2011-08-16 09:09:59 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-08-15 15:30:28 +0100

Seen: 482 times

Last updated: Aug 15 '11