ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 23 Dec 2014 10:01:47 +0100embeddings in NumberFieldTower?https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/I'm trying to do my calculations in a number field tower (or some equivalent), then get the results in real form (or anything that the graphics functions will take). I'm extending the rationals twice.
I've tried constructing the first with NumberField, then using extension, but apparently embedding isn't implemented in extension.
I've tried using NumberFieldTower, but I can't find an equivalent to embedding.
I've tried using NumberField(poly_1, poly_2) or QQ[poly_1, poly_1], but can't figure out how to assign an embedding or something equivalent.
I've considered trying to construct a field homomorphism from the field to the reals, but I don't know sage well enough to figure out if this is possible.
Is there some equivalent way of getting the values that I want?
Thanks!Sun, 21 Dec 2014 05:37:28 +0100https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/Answer by FrédéricC for <p>I'm trying to do my calculations in a number field tower (or some equivalent), then get the results in real form (or anything that the graphics functions will take). I'm extending the rationals twice.</p>
<p>I've tried constructing the first with NumberField, then using extension, but apparently embedding isn't implemented in extension.</p>
<p>I've tried using NumberFieldTower, but I can't find an equivalent to embedding.</p>
<p>I've tried using NumberField(poly_1, poly_2) or QQ[poly_1, poly_1], but can't figure out how to assign an embedding or something equivalent.</p>
<p>I've considered trying to construct a field homomorphism from the field to the reals, but I don't know sage well enough to figure out if this is possible.</p>
<p>Is there some equivalent way of getting the values that I want?</p>
<p>Thanks!</p>
https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?answer=25313#post-id-25313You can define an iterated extension using a list:
K.<a,b,c> = NumberField([x^2 + 2, x^3 + 3, x^3 + 2])
Note that the last polynomial is used for the first extension, and so on.
Then you can get the list of embeddings and choose one using for instance
embs = K.embeddings(ComplexField(59)); embs
my_emb = embs[0]
my_emb(a**3+b+c)
But the following does not work so far:
K.<a,b,c> = NumberField([x^2 + 2, x^3 - 3, x^3 - 2], embedding=[sqrt(2)*CDF(I),3**(1/3),2**(1/3)])Sun, 21 Dec 2014 12:21:33 +0100https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?answer=25313#post-id-25313Comment by apeirogon for <p>You can define an iterated extension using a list:</p>
<pre><code>K.<a,b,c> = NumberField([x^2 + 2, x^3 + 3, x^3 + 2])
</code></pre>
<p>Note that the last polynomial is used for the first extension, and so on.</p>
<p>Then you can get the list of embeddings and choose one using for instance</p>
<pre><code>embs = K.embeddings(ComplexField(59)); embs
my_emb = embs[0]
my_emb(a**3+b+c)
</code></pre>
<p>But the following does not work so far:</p>
<pre><code> K.<a,b,c> = NumberField([x^2 + 2, x^3 - 3, x^3 - 2], embedding=[sqrt(2)*CDF(I),3**(1/3),2**(1/3)])
</code></pre>
https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?comment=25320#post-id-25320Thanks! Seems to work.Mon, 22 Dec 2014 05:03:39 +0100https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?comment=25320#post-id-25320Comment by FrédéricC for <p>You can define an iterated extension using a list:</p>
<pre><code>K.<a,b,c> = NumberField([x^2 + 2, x^3 + 3, x^3 + 2])
</code></pre>
<p>Note that the last polynomial is used for the first extension, and so on.</p>
<p>Then you can get the list of embeddings and choose one using for instance</p>
<pre><code>embs = K.embeddings(ComplexField(59)); embs
my_emb = embs[0]
my_emb(a**3+b+c)
</code></pre>
<p>But the following does not work so far:</p>
<pre><code> K.<a,b,c> = NumberField([x^2 + 2, x^3 - 3, x^3 - 2], embedding=[sqrt(2)*CDF(I),3**(1/3),2**(1/3)])
</code></pre>
https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?comment=25330#post-id-25330Could you please upvate and accept my answer (on the left of it) ?Tue, 23 Dec 2014 10:01:47 +0100https://ask.sagemath.org/question/25312/embeddings-in-numberfieldtower/?comment=25330#post-id-25330