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, 19 Oct 2010 14:49:26 +0200Characters and number fieldshttps://ask.sagemath.org/question/7734/characters-and-number-fields/Hello!
I have again a question. Could you help me? I defined the Q(6th primitive unity) by
A=DirichletGroup(7)
K.<a>=NumberField(cyclotomic_polynomial(6))
R=K.maximal_order()
Then I take a character, namely
character=A[1]
print character(3)
This character(3) is zeta6, so I would think that the following should be true:
character(3) in R.fractional_ideal(a)
But it is false, I think because we defined Q(6th primitive unity) without using zeta6.
Mathemathically this is true, so could you help me to persuade the computer to recognize
such a relation? Thank you! :-)Tue, 19 Oct 2010 11:22:52 +0200https://ask.sagemath.org/question/7734/characters-and-number-fields/Answer by niles for <p>Hello! </p>
<p>I have again a question. Could you help me? I defined the Q(6th primitive unity) by </p>
<pre><code>A=DirichletGroup(7)
K.<a>=NumberField(cyclotomic_polynomial(6))
R=K.maximal_order()
</code></pre>
<p>Then I take a character, namely </p>
<pre><code>character=A[1]
print character(3)
</code></pre>
<p>This character(3) is zeta6, so I would think that the following should be true:</p>
<pre><code> character(3) in R.fractional_ideal(a)
</code></pre>
<p>But it is false, I think because we defined Q(6th primitive unity) without using zeta6.
Mathemathically this is true, so could you help me to persuade the computer to recognize
such a relation? Thank you! :-)</p>
https://ask.sagemath.org/question/7734/characters-and-number-fields/?answer=11745#post-id-11745Checking the documentation for [`NumberField`][1] (you can use "`NumberField?`" to print the documentation from within sage), I found an optional argument `embedding` which specifies the embedding into another field -- so you have to specify *which* `zeta6` you mean:
Here are the roots over `CC`:
sage: cyclotomic_polynomial(6).base_extend(CC).roots()
[(0.500000000000000 - 0.866025403784439*I, 1), (0.500000000000000 + 0.866025403784439*I, 1)]
Here we use the first root for our embedding:
sage: K.<a>=NumberField(cyclotomic_polynomial(6), embedding=cyclotomic_polynomial(6).base_extend(CC).roots()[0][0])
sage: R=K.maximal_order()
sage: A=DirichletGroup(7)
sage: character=A[1]
sage: character(3) in R.fractional_ideal(a)
True
Coercing to `CC` shows what embedding we're using:
sage: CC(a)
0.500000000000000 - 0.866025403784439*I
You can also use the other root of the cyclotomic polynomial for your embedding:
sage: K.<a>=NumberField(cyclotomic_polynomial(6), embedding=cyclotomic_polynomial(6).base_extend(CC).roots()[1][0])
sage: CC(a)
0.500000000000000 + 0.866025403784439*I
You may also be interested in [`CyclotomicField`][2], which I came across while I was looking at the documentation for `NumberField` -- it seems to construct the `nth` cyclotomic field with canonical embedding to `CC` automatically...
[1]: http://www.sagemath.org/doc/reference/sage/rings/number_field/number_field.html#sage.rings.number_field.number_field.NumberField
[2]: http://www.sagemath.org/doc/reference/sage/rings/number_field/number_field.html#sage.rings.number_field.number_field.CyclotomicFieldTue, 19 Oct 2010 14:31:12 +0200https://ask.sagemath.org/question/7734/characters-and-number-fields/?answer=11745#post-id-11745Comment by Katika for <p>Checking the documentation for <a href="http://www.sagemath.org/doc/reference/sage/rings/number_field/number_field.html#sage.rings.number_field.number_field.NumberField"><code>NumberField</code></a> (you can use "<code>NumberField?</code>" to print the documentation from within sage), I found an optional argument <code>embedding</code> which specifies the embedding into another field -- so you have to specify <em>which</em> <code>zeta6</code> you mean:</p>
<p>Here are the roots over <code>CC</code>:</p>
<pre><code>sage: cyclotomic_polynomial(6).base_extend(CC).roots()
[(0.500000000000000 - 0.866025403784439*I, 1), (0.500000000000000 + 0.866025403784439*I, 1)]
</code></pre>
<p>Here we use the first root for our embedding:</p>
<pre><code>sage: K.<a>=NumberField(cyclotomic_polynomial(6), embedding=cyclotomic_polynomial(6).base_extend(CC).roots()[0][0])
sage: R=K.maximal_order()
sage: A=DirichletGroup(7)
sage: character=A[1]
sage: character(3) in R.fractional_ideal(a)
True
</code></pre>
<p>Coercing to <code>CC</code> shows what embedding we're using:</p>
<pre><code>sage: CC(a)
0.500000000000000 - 0.866025403784439*I
</code></pre>
<p>You can also use the other root of the cyclotomic polynomial for your embedding:</p>
<pre><code>sage: K.<a>=NumberField(cyclotomic_polynomial(6), embedding=cyclotomic_polynomial(6).base_extend(CC).roots()[1][0])
sage: CC(a)
0.500000000000000 + 0.866025403784439*I
</code></pre>
<p>You may also be interested in <a href="http://www.sagemath.org/doc/reference/sage/rings/number_field/number_field.html#sage.rings.number_field.number_field.CyclotomicField"><code>CyclotomicField</code></a>, which I came across while I was looking at the documentation for <code>NumberField</code> -- it seems to construct the <code>nth</code> cyclotomic field with canonical embedding to <code>CC</code> automatically...</p>
https://ask.sagemath.org/question/7734/characters-and-number-fields/?comment=11746#post-id-11746Hello Niles!
Thank you for your answer! Tomorrow I will read it more carefully, and think the whole business once again, now I am very tired... :-) With my colleague we worked on this very hard and just now we found another solution. But now I am a bit confused, whether it was a good solution or not? Here what we did:
K.<a>=CyclotomicField(6)
R=K.maximal_order()
A=DirichletGroup(7,K)
character=A[1]
print character(3)
character(3) in R
Here, in A=DirichletGroup(7,K) means that the Dirichlet character must take their value from the integral domain K, and then everything works perfectly... I really hope we didn't make a fault, by not specifying the value of zeta! (I think not, but I will think it over tomorrow...)
Thanks again! :-)
Tue, 19 Oct 2010 14:49:26 +0200https://ask.sagemath.org/question/7734/characters-and-number-fields/?comment=11746#post-id-11746