change_ring for DirichletGroup: some initialisation is required for ComplexIntervalField?

asked 2020-08-01 17:12:42 -0500

updated 2020-08-02 08:09:17 -0500

Dear all,

A code will better explain my predicament:

myCIF = ComplexIntervalField( 200 )                                                                   
myD = DirichletGroup(5)                                                                               
myDCIF = myD.change_ring(myCIF)                                                                           
[e.values() for e in myDCIF] 
--> NotImplementedError followed by lots of shouting involving in particular 'cachefunc.pyx'

Then do it a second time:

[e.values() for e in myDCIF] 
--> Good result!

The mystery gets more mysterious if one tries it with 'ComplexField' rather than with 'ComplexIntervalField': everything goes smoothly. Here is thus my way out:

myCF =  ComplexField( 200 + 1)
myCIF = ComplexIntervalField( 200 )                                                                   
myD = DirichletGroup(5)                                                                               
myDCF = myD.change_ring(myCF)                                                                           
[[myCIF(v) for v in e.values()] for e in myDCF]

Maybe there is something simple I didn't get that would avoid the above manipulation?

Many thanks in advance! Olivier

edit retag flag offensive close merge delete

Comments

This looks like a bug. Maybe use directly sage: DirichletGroup(5, myCIF)

FrédéricC gravatar imageFrédéricC ( 2020-08-14 01:15:39 -0500 )edit

but this has the same issue. This comes from caching the order of the root of unity in the coefficient field.

FrédéricC gravatar imageFrédéricC ( 2020-08-14 02:17:35 -0500 )edit