[sage-devel] Re: does PARI know the primes up to 35?
On Sep 23, 2008, at 7:26 PM, Craig Citro wrote: sage: K.a = CyclotomicField(23) sage: K.class_number() ... PariError: not enough precomputed primes, need primelimit ~ (35) Hah, that's pretty hilarious. :) Actually, what it's telling you is that it needs primes up to a primelimit, and then it doesn't actually put in the primelimit. (This is a bug in our processing of Pari's error messages.) It's then saying that this is PariError #35. The effect is awesome, though. [...] And maybe one last good question: David, were you surprised that Pari/Sage couldn't tell you this? Would you have preferred a non-verified answer (along with information that it wasn't provably correct, of course), what you got, or something else entirely? I just wanted to know the class number of that field! (More precisely, I was trying to remember which was the first cyclotomic field with non-trivial class group.) It would have been okay to get a non-verified answer with the information that it was non-verified but then I would have wanted to be able to try again to get the verified answer. david --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: does PARI know the primes up to 35?
On Sep 23, 3:49 pm, David Harvey [EMAIL PROTECTED] wrote: -- | SAGE Version 3.1.2, Release Date: 2008-09-19 | | Type notebook() for the GUI, and license() for information. | -- sage: K.a = CyclotomicField(23) sage: K.class_number() *** Warning: large Minkowski bound: certification will be VERY long. --- PariError Traceback (most recent call last) /home/dmharvey/ipython console in module() /home/was/s/local/lib/python2.5/site-packages/sage/rings/number_field/ number_field.py in class_number(self, proof) 2068 2069 proof = proof_flag(proof) - 2070 return self.class_group(proof).order() 2071 2072 def composite_fields(self, other, names=None): /home/was/s/local/lib/python2.5/site-packages/sage/rings/number_field/ number_field.py in class_group(self, proof, names) 2038 except AttributeError: 2039 self.__class_group = {} - 2040 k = self.pari_bnf(proof) 2041 cycle_structure = eval(str(k.getattr('clgp.cyc'))) 2042 /home/was/s/local/lib/python2.5/site-packages/sage/rings/number_field/ number_field.py in pari_bnf(self, certify, units) 1901 try: 1902 if certify: - 1903 self.pari_bnf_certify() 1904 return self.__pari_bnf 1905 except AttributeError: /home/was/s/local/lib/python2.5/site-packages/sage/rings/number_field/ number_field.py in pari_bnf_certify(self) 1934 raise TypeError, Unable to coerce number field defined by non-integral polynomial to PARI. 1935 if not self.__pari_bnf_certified: - 1936 if self.pari_bnf(certify=False, units=True).bnfcertify() != 1: 1937 raise ValueError, The result is not correct according to bnfcertify 1938 self.__pari_bnf_certified = True /home/dmharvey/gen.pyx in sage.libs.pari.gen._pari_trap (sage/libs/ pari/gen.c:33124)() PariError: not enough precomputed primes, need primelimit ~ (35) :) david IIRC pari to 2.3.4 which has some fixes in that are is out. We ought to check and either way then upgrade to it. Either way I have a list of eight spkgs that I want to upgrade in 3.2 and so far none of them has a trac ticket. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: does PARI know the primes up to 35?
sage: K.a = CyclotomicField(23) sage: K.class_number() ... PariError: not enough precomputed primes, need primelimit ~ (35) Hah, that's pretty hilarious. :) Actually, what it's telling you is that it needs primes up to a primelimit, and then it doesn't actually put in the primelimit. (This is a bug in our processing of Pari's error messages.) It's then saying that this is PariError #35. The effect is awesome, though. The real answer to your question, though, is that Pari can't provably certify its result for the class number of K without using more than the default number of primes. Of course, it's more than happy to just run along without certifying the result: sage: K.class_number(proof=False) 3 I just ran a GP session, and set it going with a much larger primelimit; it's still computing. So this brings up at least two interesting questions: 1) If we try to compute something for the user, with proof, and Pari tells us that it couldn't do it using whatever information it has prerendered, how many times should we add to that info and try again? For instance, we happily add memory and try again until we're out of memory; should we do the same thing in this case? Should we let the user know? Should we bail out and give a non-verified answer, along with telling the user that this is what we did? 2) Should we have better documentation for certain functions (such as this one!) saying, Even in moderately sized cases, certifying this result can be computationally intensive. Consider using proof=False. And maybe one last good question: David, were you surprised that Pari/Sage couldn't tell you this? Would you have preferred a non-verified answer (along with information that it wasn't provably correct, of course), what you got, or something else entirely? -cc --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---