Hi Simon, On 25 nov, 13:53, Simon King <simon.k...@uni-jena.de> wrote: > Now I'm puzzled where the ERROR comes from.
I might be wrong, since coercion still looks "magic" like me. But it seems that before trying pushout of the objects, Sage tries L1.coerce_map_from(L2) Now, it seems that, whenever BOTH fields have an embedding defined, it tries to obtain numeric appoximations somewhere. Maybe it assumes that embedding means real/complex embedding? sage: L1.<r2_1>=NumberField(x^2-2, embedding=1) sage: L2.<r2_2>=NumberField(x^2-2, embedding=-1) sage: r2_1+r2_2 # Cool! 0 sage: _.parent() is L1 True sage: L1.coerce_map_from(L2) Generic morphism: From: Number Field in r2_2 with defining polynomial x^2 - 2 To: Number Field in r2_1 with defining polynomial x^2 - 2 Defn: r2_2 -> -r2_1 To construct this morphism I guess that some kind of numerics is involved sage: CC(r2_2) -1.41421356237309 sage: L3.<r2_3>=NumberField(x^2-2) sage: CC(r2_3) ... RuntimeError: maximum recursion depth exceeded The infinite bucle looks related with caches recursion error appears is the same as trying L1.coerce_map_from(L2). I guess that, when trying r2_1 + r2_2 encounters the previous error but something nasty happens with the error message... But all this needs further research. But this only happens if both fields have embeddings defined to another number field sage: L1.<r2_1>=NumberField(x^2-2, embedding=r4**2) sage: L2.<r2_2>=NumberField(x^2-2, embedding=-r4**2) sage: L3.<r4_3>=NumberField(x^2-2) sage: L4.<r4_2>=NumberField(x^2-2) sage: L5.<r5_2>=NumberField(x^2-2, embedding=1) sage: L4.coerce_map_from(L3) #returns None, none field have embedding defined sage: L1.coerce_map_from(L3) #returns None, L1 has embedding defined sage: L4.coerce_map_from(L1) #returns None sage: L1.coerce_map_from(L2) Boom sage: L1.coerce_map_from(L5) #returns None sage: L5.coerce_map_from(L1) #returns None -- 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