ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 08 Nov 2017 04:31:34 -0600User defined Embeddinghttps://ask.sagemath.org/question/39440/user-defined-embedding/I have 2 isomorphic number fields L.<a> and M.<b>, and I would like to define an embedding from L to M sending a to b. Is this possible without using the command L.embeddings(M)? Wed, 08 Nov 2017 00:30:00 -0600https://ask.sagemath.org/question/39440/user-defined-embedding/Comment by tmonteil for <p>I have 2 isomorphic number fields L.and M., and I would like to define an embedding from L to M sending a to b. Is this possible without using the command L.embeddings(M)?</p>https://ask.sagemath.org/question/39440/user-defined-embedding/?comment=39446#post-id-39446Could you please provide a concrete example of `L` and `M` ? If you want an adapted answer, it is really important to provide a concrete example of L and M you want to deal with, so that we can test on them and show explicit behaviors.Wed, 08 Nov 2017 04:15:45 -0600https://ask.sagemath.org/question/39440/user-defined-embedding/?comment=39446#post-id-39446Answer by tmonteil for <p>I have 2 isomorphic number fields L.and M., and I would like to define an embedding from L to M sending a to b. Is this possible without using the command L.embeddings(M)?</p> https://ask.sagemath.org/question/39440/user-defined-embedding/?answer=39448#post-id-39448Here is a possible way (guessing that `a` is a generator of `L` and `b` is a generator of `M`):
sage: L.hom([b], M)
Note that the Python variable `b` should be the name of the generator `b` of `M`. If it is not already the case, you can obtain it by doing first:
sage: M.inject_variables()
or
sage: b = M.gen()Wed, 08 Nov 2017 04:31:34 -0600https://ask.sagemath.org/question/39440/user-defined-embedding/?answer=39448#post-id-39448