Hi Luis! On 25 Nov., 10:34, luisfe <lftab...@yahoo.es> wrote: > Suppose the following: > > 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: K.has_coerce_map_from(L1) > True > sage: K.has_coerce_map_from(L2) > True > sage: L3.<a> = NumberField(x^2-2) > > If there where coercions from non-embedded fields to embedding field, > there would be an embedding from L3 to L1 and L3 to L2. So, the > coercion model would discover two possible coercions from L3 to K. How > can we make them compatible?
Excellent argument! I was not aware that there already is a coercion from L1 and L2 to K. Then, indeed, it is not possible to extend everything consistently in a structure preserving way, and I have to withdraw the answer that I just gave to John. > By the way, is there a problem with coercions? > With the first set of fields I encounter the following error: > > sage: r4+r2_1 > r4^2 + r4 > sage: r4+r2_2 > -r4^2 + r4 > sage: r2_1+r2_2 > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (1077, 0)) That seems fine to me. You can add r4 with r2_1 or r2_2, because there is coercion from L1 or L2 to K. But I guess there is no way to construct a canonical parent into which both L1 and L2 coerce (K is certainly not canonical, or is it?). So, the coercion system would not find a parent structure in which to perform the sum of r2_1 and r2_2. Cheers, 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