Karim Belabas on Fri, 29 Dec 2006 02:27:47 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug?

* Ariel Pacetti [2006-12-29 00:35]:
> I guess that the name should suggest the right answer. The help for the 
> isprime routine gives:
> isprime(x,{flag=0}): true(1) if x is a (proven) prime number, false(0) if 
> not.
> If flag is 0 or omitted, use a combination of algorithms. If flag is 1, 
> the
> primality is certified by the Pocklington-Lehmer Test. If flag is 2, the
> primality is certified using the APRCL test.
> Hence the documentation should be changed and should say "is a (proven) 
> positive prime number". By deffinition -3 is a prime number (I don't 
> agree with the definition that prime numbers are positive, this has no 
> generalization to number fields).

I have improved the documentation. 

Can you produce an example of a number theory book defining prime
numbers as possibly negative ? I don't know any.

You end up with silly problems in elementary number theory if you allow
negative primes. E.g. unique factorization, products and summations
where p "runs over primes", \pi(x) := number of primes less than x
(ooops), etc. It's simpler to specify that prime numbers are positive.

Agreed, prime and irreducible elements, and prime ideals are useful
concepts in general rings. But so is "prime number", which is a
convenient basic notion among the natural numbers (not a ring!) with
IMHO a well established definition.


Karim Belabas                  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]