2021-04-28 15:32 UTC+2, Ilia:
> On Saturday, April 24, 2021 at 1:33:36 AM UTC+2 slelievre wrote:
> > Could this have to do with one of the following existing tickets?
> >
> > - Sage Trac ticket 22008
> > complex_embedding on relative number fields is inconsistent with the base field
> >
https://trac.sagemath.org/ticket/22008
>
> This is indeed related: it also involves Sage mistaking the extension [L:K]
> for the extension [L:QQ]. But it does not seem to be the exact same
> problem: I am not sure that fixing ticket 17524 would automatically
> fix the problem I am describing here. Well, it *might*; but the only way
> to be sure is to actually pinpoint the problem - and this would involve
> a complex hunt through a lot of different code files that I (being a total
> newbie to Sage development) do not feel like doing right now.
>
> > - Sage Trac ticket 17524
> > polynomial for relative number field elements
> >
https://trac.sagemath.org/ticket/17524
>
> This one, OTOH, seems a bit different: in this one, there is no confusion
> between [L:K] and [L:QQ], but simply a problem of consistency between
> the chosen embedding of K when taken by itself and the chosen
> embedding of K when seen as a subfield of L.
I agree.
> On Saturday, April 24, 2021 at 9:51:27 PM UTC+2 vdelecroix wrote:
>>
>> 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
>
>
> For what it is worth, in my config (version 9.1), this gives
> a "ValueError: relations do not all (canonically) map to 0
> under map determined by images of generators". So, OK,
> presumably this has been fixed in the meanwhile.
You can try Sage 9.2 at SageCell:
https://sagecell.sagemath.org
> But anyway,
> where can I find documentation for the "hom" method?
sage: hom?
sage: hom??
sage: browse_sage_doc(hom)
sage: Hom?
sage: Hom??
sage: browse_sage_doc(Hom)
https://doc.sagemath.org/html/en/reference/categories/sage/categories/homset.html
https://doc.sagemath.org/html/en/reference/categories/sage/categories/homsets.html
> Assuming it works, OK, thank you, it is a good workaround.
> Still, in the meanwhile, I think that something needs to be
> done about NumberFieldEmbedding: it should either be
> fixed, be deprecated, or at least the documentation should
> be updated to signal that it does not work in relative fields.
> So I guess I will now try to open a ticket.
Sounds good. --Samuel