- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 688
 
Closed
Description
This is not good:
sage: is_prime(GF(5)(3))
True
sage: is_prime(GF(5)(4))
False
The fix is to totally 100% rewrite is_prime in arith.py so that it first calls x.is_prime() and if that isn't defined, then in some special cases (e.g., python ints) converts to Integer and calls is_prime. Otherwise, it raises a NotImplementedError.
Component: number theory
Author: Kevin Stueve
Reviewer: Sebastian Pancratz
Merged: sage-4.3.1.rc1
Issue created by migration from https://trac.sagemath.org/ticket/5496