Hi John! On 25 Nov., 10:30, John Cremona <john.crem...@gmail.com> wrote: > Surely a number field + embedding is a richer structure than an > abstract number field, so the coercion should go from the former to > the latter as a forgetful functor.
To the contrary, it seems to me that a coercion should go from the poorer structure to the richer structure, if there is a canonical way to do so. Example: A field is richer than a ring - and we have sage: GF(5).has_coerce_map_from(Integers(5)) True sage: Integers(5).has_coerce_map_from(GF(5)) False For number fields, we *do* have a canonical choice, namely (provided that the defining polynomials match) sending the generator to the generator. Of course, mapping generator to generator would work in both directions. However, if there is a way to preserve structure (here: embedding) then one should by all means do so. > Are you going to similarly come up with the question of coercion > between two number fields which are the same abstract field and with > mathematically the same embedding, but with one of higher precision > than the other? Let K be a number field and R be some ring. I think there should be coercion from R to K if * R coerces into the base ring of K (which might be another number field) or * R is a number field and + R.base_ring() coerces into K.base_ring() (again covering stacks of number fields) + R.relative_polynomial() == K.relative_polynomial() and + either R has no given embedding or - R.coerce_embedding()(R.gen())==K.coerce_embedding()(K.gen()) and - R.coerce_embedding()(R.gen()).parent() coerces into K.coerce_embedding()(K.gen()).parent() The last line means that it goes from higher to lower precision, since we have sage: RealField(4).has_coerce_map_from(RealField(50)) True > PS What's wrong with sage-nt?! I thought this was a question on coercion (of number fields), not on number fields as such. But I guess the simple reason is that I don't usually read sage-nt. 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