Ask Your Question
0

Homomorphisms for relative number fields

asked 2014-09-18 03:36:11 +0100

jj gravatar image

updated 2015-01-13 21:48:17 +0100

FrédéricC gravatar image

How can I define a homomorphism from a relative number field K (containing F) to some other field L if I know where to send K.gens()?

Example:

F_pol  = x^2-x-1
F      = NumberField(F_pol, 'lam')
K_pol  = x^2 + 4
K      = F.extension(K_pol, 'e')
L      = QQbar
lam_im = L(F_pol.roots()[1][0])
e_im   = L(K_pol.roots()[1][0])

Wrong result:

K.hom([e_im], QQbar, check=False)

What we want (not working):

K.hom([e_im, lam_im], QQbar, check=False)

A working solution (edit):

K.Hom(L)(e_im, F.hom([lam_im], check=False))

New question/example: What if L is not exact?

x       = PolynomialRing(QQ,'x').gen()
F_pol   = x^3 - x^2 - 2*x + 1
F.<lam> = NumberField(F_pol, 'lam')
D       = 4*lam^2 + 4*lam - 4
K_pol   = x^2 - D
K       = F.extension(K_pol, 'e')
L       = CC
lam_im  = F_pol.roots(L)[2][0]
e_im    = F.hom([lam_im], check=False)(D).sqrt()

K.Hom(L)(e_im, F.hom([lam_im], check=False), check=False)

This gives the error:

TypeError: images do not define a valid homomorphism
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-09-18 13:52:59 +0100

Francis Clarke gravatar image

updated 2014-09-25 12:43:16 +0100

First you need to write

sage: lam_im = F_pol.roots(L)[1][0]
sage: e_im = K_pol.roots(L)[1][0]

Then the following works

sage: HomKL = K.Hom(L)
sage: HomKL(e_im, F.hom([lam_im]))
Relative number field morphism:
  From: Number Field in e with defining polynomial x^2 + 4 over its base field
  To:   Algebraic Field
  Defn: e |--> 0.?e-53 + 2.000000000000000?*I
        lam |--> 1.618033988749895? + 0.?e-53*I

Typing

sage: HomKL.__call__?

explains the syntax. There should be an easier way to do this.

On the second question

This is a bug, the check parameter does not get passed on as it should be. I will raise a ticket to deal with this, but in the meantime you can get the result you want as follows.

sage: K_abs = K.absolute_field('a')
sage: from_abs = K_abs.structure()[0]
sage: a = from_abs(K_abs.gen())
sage: R = L['x']
sage: f = R(map(F.hom([lam_im], check=False), a))
sage: abs_hom = K_abs.hom([f(e_im)], check=False)
sage: from sage.rings.number_field.morphism import RelativeNumberFieldHomomorphism_from_abs
sage: RelativeNumberFieldHomomorphism_from_abs(K.Hom(L), abs_hom)
Relative number field morphism:
  From: Number Field in e with defining polynomial x^2 - 4*lam^2 - 4*lam + 4 over its base field
  To:   Complex Field with 53 bits of precision
  Defn: e |--> 4.02438434522465
        lam |--> 1.80193773580484

This is taken, with some slight modifications, from the code for _from_im in sage/rings/number_field/morphism.py, the key difference being the addition of check=False where abs_hom is defined.

edit flag offensive delete link more

Comments

I get the following error after "lam_im = F_pol.roots(L)[1][0]": TypeError: Algebraic Field is not a valid variable. But with my "lam_im"-way it works. Thanks a lot!

jj gravatar imagejj ( 2014-09-18 16:32:37 +0100 )edit

Now I see. Your F_pol was a symbolic expression, but mine was a polynomial. Unfortunately the root methods for each are not compatible.

Francis Clarke gravatar imageFrancis Clarke ( 2014-09-18 17:49:41 +0100 )edit

Ok, that makes sense. Usually I use polynomial variables as well...

jj gravatar imagejj ( 2014-09-19 10:08:46 +0100 )edit

Hmm, how can I make it work for non-exact fields like CC? I tried to put a check=False flag everwhere but it still seems to fail. :(

jj gravatar imagejj ( 2014-09-19 16:47:07 +0100 )edit

Thanks for the updated answer!

jj gravatar imagejj ( 2014-10-20 19:26:28 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-09-18 03:36:11 +0100

Seen: 479 times

Last updated: Sep 25 '14