On 25 Nov., 17:04, Simon King <simon.k...@uni-jena.de> wrote:
> Well, let's see what debugging reveals.

Got it!

In NumberField_absolute._coerce_map_from_, an
EmbeddedNumberFieldMorphism is constructed. The optional argument
(namely the ambient field) is constructed, but it was forgotten to
pass it as an optional argument to the init method of
EmbeddedNumberFieldMorphism. Hence, EmbeddedNumberFieldMorphism tries
to locate both number fields L1 and L2 in CDF, rather than in K as it
should.

With the other changes proposed in this thread (merging of
construction functors), I finally obtain

sage: K.<r4> = NumberField(x^4-2)
sage: L1.<r2_1> = NumberField(x^2-2, embedding = r4**2)
sage: L2.<r2_2> = NumberField(x^2-2, embedding = -r4**2)
sage: r2_1+r2_2
0

Thanks for all your input on coercion!
Simon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to