On Sun, Apr 19, 2009 at 10:16 AM, Utpal Sarkar <doe...@gmail.com> wrote: > > Hi, > > I found some strange behaviour of the Hilbert class field of a > quadratic number field when the class number is 1, so the Hilbert > class field is equal to the ground field: > sage: K.<w> = QuadraticField(-5); KX.<X> = K[]; H.<h> = > K.hilbert_class_field() > sage: (X + w + 1).base_extend(H) > X + w + 1 > No problem: the Hilbert class field is a proper extension, and the > polynomial remains the same. > > sage: K.<w> = QuadraticField(-1); KX.<X> = K[]; H.<h> = > K.hilbert_class_field() > sage: (X + w + 1).base_extend(H) > X + 1 > In this case the Hilbert class field is equal to K, and the part of > the polynomial that is not in QQ disappears.
You've found a bug in the coercion in the special case of a relative extension of degree 1. Here's some simpler code to illustrate it: sage: K.<w> = QuadraticField(-1) sage: KX.<X> = K[] sage: H.<h> = K.extension(X-1) sage: H(w) 0 The internal function responsible for the bug is: sage: H._NumberField_relative__base_inclusion(w) 0 We are tracking this bug here: http://trac.sagemath.org/sage_trac/ticket/5828 William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---