On Mon, Dec 22, 2008 at 10:23 AM, Robert Bradshaw <rober...@math.washington.edu> wrote: > > On Dec 22, 2008, at 6:20 AM, John Cremona wrote: > > >> You can do K(r.lift()), but it would be nicer if this was handled by > >> coercion magic. > > > This isn't really a coercion issue per se, it's a question of adding > > another case to the _element_constructor_ method of number fields. Do > > we want coercion here, i.e. should someone be able to write r + K.gen > > ()? If so, would it be the most natural to put the result into K or > > the quotient ring?
I am not sure that the result of r + K.gen(), if allowed at all, should end up in K or in R. An alternative interpretation: r is an element of an algebra over Q. We add to it an element of K, which is a base extension of Q. Shouldn't the result end up in the base extension of R by K over Q? An advantage of this interpretation is that it does not depend on R and K being isomorphic (which may be non-trivial to determine. Do R and K have pointers to each other?), so can apply more generally. According to Bradshaw's coercion in towers of extensions, It seems the question should be resolved depending on the names of the generators of K and R, which could be problematic if the generators of R and K have the same name (as in this example), but not the same defining polynomial (not the case in this example). Perhaps a reason to not extend the coercion model to non-free extensions by default, or introduce a clear rule? --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---