1 | initial version |
First, the way you define Cyclotomic Fields leads to errors, since the parameter should be an integer, not a polynomial. You can read the documentation about Cyclotomic Fields by typing:
sage: CyclotomicField?
Then, here is how you can check that NumberField(x^5 + x^4 + x^3 + x^2 + 1)
and $\mathbb{Q}[\zeta_7+\zeta_7^{-1}]$ are not equal.
sage: LL = CyclotomicField(7) ; LL
Cyclotomic Field of order 7 and degree 6
Note that the generator zeta7
was injected into the namespace:
sage: zeta7^6
-zeta7^5 - zeta7^4 - zeta7^3 - zeta7^2 - zeta7 - 1
sage: zeta7^7
1
sage: KKK.<s> = NumberField(x^5 + x^4 + x^3 + x^2 + 1); KKK
Number Field in s with defining polynomial x^5 + x^4 + x^3 + x^2 + 1
sage: MM = QQ[zeta7+zeta7^-1] ; MM
Number Field in a with defining polynomial x^3 + x^2 - 2*x - 1
You can check that MM and KKK are not equal since they do not have the same dimension over $\mathbb{Q}$ (which corresponds to the degree of the irreducible polynomial defining them):
sage: KKK.degree()
5
sage: MM.degree()
3
As a WARNING, you should notice that:
sage: KKK == MM
False
is not safe, since the equality also considers the name of the variable:
sage: KK.<t> = NumberField(x^5 + x^4 + x^3 + x^2 + 1); KK
Number Field in t with defining polynomial x^5 + x^4 + x^3 + x^2 + 1
sage: KKK.<s> = NumberField(x^5 + x^4 + x^3 + x^2 + 1); KKK
Number Field in s with defining polynomial x^5 + x^4 + x^3 + x^2 + 1
sage: KK == KKK
False