On 2013-07-03, Nicolas M. Thiery <[email protected]> wrote: > On Fri, Jun 28, 2013 at 01:14:48PM +0000, Simon King wrote: >> Weeeeell, you need to construct polynomial rings if you want to >> construct finite fields (non-prime at least). I don't think there's a >> good way to avoid it. > > Sure. But do we -- and do we need to -- construct any finite field at > startup?
I found: - when number_field.all does `from totallyreal import enumerate_totallyreal_fields_prim` in line 16, then a univariate polynomial ring is created. - sage.rings.qqbar creates QQ['x'] in line 1893 and QQ['y'] in line 1895 and PolynomialRing(QQbar, 'x') in line 5623 and PolynomialRing(AA,'x') in line 5624. - rings.polynomial.complex_roots creates CC['x'] in line 355, apparently called when creating a QuadraticField (sage.rings.number_field.number_field line 738), namely `QQbar_I_nf = QuadraticField(-1, 'I', embedding=CC.gen())` in _init_qqbar. This line also results in the creation of CIF['x']. - algebras.all does `from nil_coxeter_algebra import NilCoxeterAlgebra`, which results in `import kfpoly` in combinat.sf.hall_littlewood in line 32, which creates PolynomialRing(ZZ,'t'). If I am not mistaken, during Sage startup, PolynomialRing_general.__init__ is called *only* in the afore-mentioned cases. That's not so often, actually, and thus probably not much of a problem. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.
