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.Sun, 31 Dec 2017 00:25:25 +0100Factorization of $f \in \mathbb{Q}[X]$ in field extension $\mathbb{Q}(\alpha)$.https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/I'm given an irreducible polynomial $f \in \mathbb{Q}[X]$ of degree 5 and I want to determine its Galois group without using the predefined functions of sage. The method I want to follow takes a root $\alpha_1$ of $f$ and studies the factorization of $f$ in the field extension $\mathbb{Q}(\alpha_1)$.
I believe this is possible with other software. How can I do it with sage?
**Edit**
Apparently, Abstract Algebra: An Interactive Approach, Second Edition but they use InitDomain function which is not recognized by my notebook.
Apparently the book gives a CD where an interface between sage and gap is done. So probably the solution requires using gap commands.Sat, 30 Dec 2017 19:14:54 +0100https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/Comment by slelievre for <p>I'm given an irreducible polynomial $f \in \mathbb{Q}[X]$ of degree 5 and I want to determine its Galois group without using the predefined functions of sage. The method I want to follow takes a root $\alpha_1$ of $f$ and studies the factorization of $f$ in the field extension $\mathbb{Q}(\alpha_1)$. </p>
<p>I believe this is possible with other software. How can I do it with sage?</p>
<p><strong>Edit</strong></p>
<p>Apparently, Abstract Algebra: An Interactive Approach, Second Edition but they use InitDomain function which is not recognized by my notebook. </p>
<p>Apparently the book gives a CD where an interface between sage and gap is done. So probably the solution requires using gap commands.</p>
https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/?comment=40378#post-id-40378It helps if you give an explicit example to get others started exploring your question.Sun, 31 Dec 2017 00:16:49 +0100https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/?comment=40378#post-id-40378Answer by slelievre for <p>I'm given an irreducible polynomial $f \in \mathbb{Q}[X]$ of degree 5 and I want to determine its Galois group without using the predefined functions of sage. The method I want to follow takes a root $\alpha_1$ of $f$ and studies the factorization of $f$ in the field extension $\mathbb{Q}(\alpha_1)$. </p>
<p>I believe this is possible with other software. How can I do it with sage?</p>
<p><strong>Edit</strong></p>
<p>Apparently, Abstract Algebra: An Interactive Approach, Second Edition but they use InitDomain function which is not recognized by my notebook. </p>
<p>Apparently the book gives a CD where an interface between sage and gap is done. So probably the solution requires using gap commands.</p>
https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/?answer=40379#post-id-40379You could do something like the following.
$ sage -v
SageMath version 8.1, Release Date: 2017-12-07
$ sage -q
sage: P.<x> = QQ[]
sage: f = P([QQ.random_element() for _ in range(6)])
sage: f
x^4 - 2*x^3 - x^2 + x + 8
sage: f.roots()
[]
sage: f_roots = f.roots(QQbar, multiplicities=False)
sage: f_roots
[-0.9308781364905225? - 0.9859665944129413?*I,
-0.9308781364905225? + 0.9859665944129413?*I,
1.930878136490523? - 0.7891098514623471?*I,
1.930878136490523? + 0.7891098514623471?*I]
sage: alpha = f_roots[0]
sage: K = QQ[alpha]
sage: K
Number Field in a with defining polynomial x^4 - 2*x^3 - x^2 + x + 8
sage: K['x'](f).factor()
(x - a) * (x^3 + (a - 2)*x^2 + (a^2 - 2*a - 1)*x + a^3 - 2*a^2 - a + 1)
Sun, 31 Dec 2017 00:25:25 +0100https://ask.sagemath.org/question/40374/factorization-of-f-in-mathbbqx-in-field-extension-mathbbqalpha/?answer=40379#post-id-40379