Ask Your Question

Daniel Jimenez's profile - activity

2018-01-01 16:45:45 +0100 received badge  Scholar (source)
2017-12-31 21:37:50 +0100 received badge  Nice Question (source)
2017-12-31 18:44:22 +0100 received badge  Student (source)
2017-12-31 18:06:13 +0100 received badge  Organizer (source)
2017-12-31 17:56:35 +0100 asked a question Is K = QQ[polynomial_root] the same as K.<a> = QQ.extension(polynomial)?

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.

2017-12-31 16:52:57 +0100 received badge  Nice Answer (source)
2017-12-31 15:45:58 +0100 received badge  Editor (source)
2017-12-31 13:56:56 +0100 received badge  Supporter (source)
2017-12-31 13:12:19 +0100 received badge  Teacher (source)
2017-12-31 12:46:45 +0100 answered a question Extension field adjoining two roots

This works for this particular case:

sage: P.<x> = QQ[]
sage: f = x^3+2*x+5 # f = P([5,2,0,1]) if you want
sage: f_roots = f.roots(QQbar, multiplicities=False)
sage: f_roots
[-1.328268855668609?,
 0.664134427834305? - 1.822971095411114?*I,
 0.664134427834305? + 1.822971095411114?*I]
sage: alpha = f_roots[0]
sage: K = QQ[alpha]
sage: K['x'](f).is_irreducible()
False
sage: factors = K['x'](f).factor()
sage: factors
(x - a) * (x^2 + a*x + a^2 + 2)
sage: g = factors[1][0]
sage: g
x^2 + a*x + a^2 + 2
sage: L.<b> = K.extension(g)
sage: L
Number Field in b with defining polynomial x^2 + a*x + a^2 + 2 over its base field
sage: L['x'](g).factor()
(x - b) * (x + b + a)
sage: L['x'](f).factor()
(x - b) * (x - a) * (x + b + a)
2017-12-31 12:33:55 +0100 received badge  Autobiographer