Ask Your Question
0

Apparent bug when factoring over a finite field

asked 2025-01-27 08:18:34 +0200

updated 2025-02-06 10:20:29 +0200

FrédéricC gravatar image

The code below constructs the finite field F of order 7, defines an irreducible polynomial p over F, and then constructs the associated field extension K (the "splitting field of p") before checking that the polynomial in fact splits over K. When I run this code (for instance in a Jupyter notebook or on SageMathCell) I get an extensive error message pertaining to the factor() method. If I modify the code slightly, changing the exponents in both p and f from 2 to 3, the code executes without issue. Could this be a bug, or have I forgotten something about basic field theory that is causing this?

F = Integers(7)
P.<x> = F[]
p = x^2 + 2
K.<c> = F.extension(p)
S.<z> = K[]
f = z^2 + 2
factor(f)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2025-01-27 22:01:51 +0200

Max Alekseyev gravatar image

updated 2025-01-27 22:03:50 +0200

Please update your version of Sage and note that ring Integers(7) as Sage's object technically is not the same as the finite field GF(7).

Check this out: https://sagecell.sagemath.org/?q=wmktnq

edit flag offensive delete link more

Comments

Thanks for the answer; 10.4 is currently the highest version of Sage available on CoCalc, to which I am constrained for institutional reasons. I understand that Integers(7) is not technically the same object, but it has all of the necessary functionality (namely the field operations), and it works for higher degree extensions, so this answer is somewhat unsatisfying (or rather, is there a deeper fundamental reason within Sage that I should be avoiding this isomorphic object?).

tabesbridges gravatar imagetabesbridges ( 2025-01-27 23:20:05 +0200 )edit
1

Sagecell is running version 10.2, and so your 10.4 is good enough. Please note that your code with Integers(7) produces an error at Sagecell as it is not automatically understood as a field. Please just use GF(7) if you want to rely on the field functionality without issues.

Max Alekseyev gravatar imageMax Alekseyev ( 2025-01-27 23:46:19 +0200 )edit

Alternatively, you can define F = Integers(7).field() to make things work.

Max Alekseyev gravatar imageMax Alekseyev ( 2025-01-27 23:54:19 +0200 )edit

Clarification on Sagecell.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2025-01-31 08:05:13 +0200 )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: 2025-01-27 07:10:59 +0200

Seen: 109 times

Last updated: Jan 27