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.Sat, 10 Mar 2018 07:24:19 +0100Relative Vector spaceshttps://ask.sagemath.org/question/41462/relative-vector-spaces/Consider a field L containing a subfield F. I would like to look at L as a F vector space without using the command relativise. Is there any way to obtain this.
For example :
Let L.<a>=CyclotomicField(53*52), and F.<b>=CyclotomicField(53).
I would like to construct a $F$ linear isomorphism $\phi : L \mapsto F^{24}$.AbhishekSat, 10 Mar 2018 07:24:19 +0100https://ask.sagemath.org/question/41462/Extension field adjoining two rootshttps://ask.sagemath.org/question/40389/extension-field-adjoining-two-roots/I'm trying to construct given an irreducible polynomial $f \in \mathbb{Q}[X]$ an extension field that adjoins two of its roots $\alpha_1,\alpha_2$. I'm trying to follow the approach suggested in [this question](https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/)
. However, with the following code:
P.<x> = QQ[]
f = x^3+2*x+5 # f = P([5,2,0,0,1]) if you want
f_roots = f.roots(QQbar, multiplicities=False)
print f_roots
alpha = f_roots[0]
beta = f_roots[1]
K = QQ[alpha,beta]
K['x'](f).is_irreducible()
But this gives the error:
ValueError: defining polynomial (x^3 + 2*x + 5) must be irreducible
Although, the polynomial is clearly irreducible over $\mathbb{Q}$. Doing it as:
P.<x> = QQ[]
f = x^3+2*x+5
f_roots = f.roots(QQbar, multiplicities=False)
alpha = f_roots[0]
K.<a> = QQ[alpha]
beta = f_roots[1]
K1.<b> = K[beta]
Gives error:
ValueError: base field and extension cannot have the same name 'a'
What is going wrong? Is this the right way to construct the extension field with two roots?
**Edit**
Let me emphasize that I'm looking for a method that works for an arbitrary degree not just for degree 3. My actual problem goes on a degree four polynomial. So take as an example:
f = x^4+2*x+5
instead of the previous one.Rodrigo RayaSun, 31 Dec 2017 02:49:21 +0100https://ask.sagemath.org/question/40389/Is K = QQ[polynomial_root] the same as K.<a> = QQ.extension(polynomial)?https://ask.sagemath.org/question/40400/is-k-qqpolynomial_root-the-same-as-ka-qqextensionpolynomial/I have tested it in a few cases and it seems to be the same, however the following piece of code shows they are not equal :
sage: f
x^3 + 2*x + 5
sage: f.roots(QQbar)
[(-1.328268855668609?, 1),
(0.664134427834305? - 1.822971095411114?*I, 1),
(0.664134427834305? + 1.822971095411114?*I, 1)]
sage: alpha = f.roots(QQbar, multiplicities=False)[0]
sage: K = QQ[alpha]
sage: K
Number Field in a with defining polynomial x^3 + 2*x + 5
sage: H.<a> = QQ.extension(f)
sage: H
Number Field in a with defining polynomial x^3 + 2*x + 5
sage: K['x'](f).factor()
(x - a) * (x^2 + a*x + a^2 + 2)
sage: H['x'](f).factor()
(x - a) * (x^2 + a*x + a^2 + 2)
sage: H == K
False
sage: H.gen() == K.gen()
False
sage: type(K)
<class 'sage.rings.number_field.number_field.NumberField_absolute_with_category'>
sage: type(H)
<class 'sage.rings.number_field.number_field.NumberField_absolute_with_category'>
sage: H.categories() == K.categories()
True
Moreover, I would like to suggest adding this special use of brackets ( such as QQ[polynomial_root] ) to the official doc as long as it is missing.Daniel JimenezSun, 31 Dec 2017 17:56:35 +0100https://ask.sagemath.org/question/40400/