Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Primality Proving Package >

PrimeQCertificateCheck

PrimeQCertificateCheck[cert, n]
gives True if cert is a valid certificate for the primality or compositeness of n, and False otherwise.
  • PrimeQCertificateCheck recognizes whether cert is a primality or compositeness certification, and then uses the certificate to verify the assertion.
  • The certificate cert should match the integer n.
A certificate of primality:
Check:
A certificate of compositeness:
Check:
A certificate need not come from PrimeQCertificate. Here is the certificate generated by PrimeQCertificate for 3837523:
A different certificate asserting that 3837523 is composite:
Check:
Needs["PrimalityProving`"]
A certificate of primality:
In[2]:=
Click for copyable input
Out[2]=
Check:
In[3]:=
Click for copyable input
Out[3]=
 
Needs["PrimalityProving`"]
A certificate of compositeness:
In[2]:=
Click for copyable input
Out[2]=
Check:
In[3]:=
Click for copyable input
Out[3]=
 
Needs["PrimalityProving`"]
A certificate need not come from PrimeQCertificate. Here is the certificate generated by PrimeQCertificate for 3837523:
In[2]:=
Click for copyable input
Out[2]=
A different certificate asserting that 3837523 is composite:
In[3]:=
Click for copyable input
Out[3]=
Check:
In[4]:=
Click for copyable input
Out[4]=
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team