Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You're correct. In your example you end up executing:

sage: sage.rings.morphism.RingHomomorphism_im_gens(K.Hom(K), [2*pi+pi^2], check=true)
NotImplementedError: Verification of correctness of homomorphisms from Eisenstein Extension of 5-adic Field with capped relative precision 20 in pi defined by (1 + O(5^20))*x^4 + (5 + O(5^20))*x^3 + (2*5 + O(5^20))*x^2 + (2*5 + O(5^20))*x + (5 + O(5^20)) not yet implemented.

but then this error gets caught in wrapping code and recast as a less informative error. (rant: this is a general problem in Python: people think they make code robust by putting try/except statements in but in reality they just reduce the ability of the code to properly report the problem)

Once you know the problem, the workaround is easy:

sage: tau = K.hom([2*pi+pi^2],check=false)
sage: tau
Ring endomorphism of Eisenstein Extension of 5-adic Field with capped relative precision 20 in pi defined by (1 + O(5^20))*x^4 + (5 + O(5^20))*x^3 + (2*5 + O(5^20))*x^2 + (2*5 + O(5^20))*x + (5 + O(5^20))
  Defn: pi + O(pi^77) |--> 2*pi + pi^2 + O(pi^77)