At least on 9.3.rc4 it is fixed by using instead

sage: K.<sqrt2> = QuadraticField(2, embedding=AA(2).sqrt())
sage: L.<s> = K.extension(x^3 + (sqrt2/2 + 1/3)*x^2 + (2*sqrt2/5+3/7)*x - 1)
sage: phi0 = hom(L, QQbar, roots[0])
sage: phi1 = hom(L, QQbar, roots[1])
sage: phi2 = hom(L, QQbar, roots[2])
sage: phi0(sqrt2)
1.414213562373095?
sage: phi1(sqrt2)
1.414213562373095? + 0.?e-17*I
sage: phi2(sqrt2)
1.414213562373095? + 0.?e-17*I

Le 24/04/2021 à 21:43, Vincent Delecroix a écrit :
Hello Ilia,

It is even more broken than that (on 9.3.rc4)

sage: K.<sqrt2> = QuadraticField(2, embedding=1.414)
sage: L.<s> = K.extension(x^3 + (sqrt2/2 + 1/3)*x^2 + (2*sqrt2/5+3/7)*x - 1)
sage: roots = L.relative_polynomial().roots(QQbar, multiplicities=False)

sage: from sage.rings.number_field.number_field_morphisms import NumberFieldEmbedding
sage: phi0 = NumberFieldEmbedding(L, QQbar, roots[0])
sage: phi1 = NumberFieldEmbedding(L, QQbar, roots[1])
sage: phi2 = NumberFieldEmbedding(L, QQbar, roots[2])
sage: phi0(sqrt2)
-0.9806353488506175?
sage: phi1(sqrt2)
-0.9728180790542797? + 0.006537273218425100?*I
sage: phi2(sqrt2)
-0.9728180790542797? - 0.006537273218425100?*I

My guess is that NumberFieldEmbedding was not designed to work with
relative extensions at all.

Best
Vincent

Le 22/03/2021 à 15:08, Ilia a écrit :
Hello,

When defining a NumberFieldEmbedding for a relative number field and then
applying it to the field generator, I get a result which is different from
the specified generator image:

sage: K.<sqrt2> = QuadraticField(2, embedding=1.414)
sage: L.<s> = K.extension(x^3 + (sqrt2/2 + 1/3)*x^2 + (2*sqrt2/5+3/7)*x - 1)
sage: my_embedding = NumberFieldEmbedding(L, QQbar,
L.relative_polynomial().roots(QQbar)[0][0])
sage: my_embedding
Generic morphism:
   From: Number Field in s with defining polynomial x^3 + (1/2*sqrt2 +
1/3)*x^2 + (2/5*sqrt2 + 3/7)*x - 1 over its base field
   To:   Algebraic Field
   Defn: s -> 0.5407496381556470?
sage: my_embedding.gen_image()
0.5407496381556470?
sage: my_embedding(L.gen())
0.01354690080260168?

Of course, I would have expected the last two results to be equal. My
configuration: SageMath version 9.1, running on Ubuntu 18.04.3 LTS (64-bit).

This seems to stem from Sage somehow confusing the relative generator of L
(over K) with the absolute generator of L (over QQ), even though I am not
completely sure.

Should I open a trac ticket for this?


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a77bbc58-3080-f8b2-9767-ca17fb1725f7%40gmail.com.

Reply via email to