Ask Your Question
0

Defining a 'nice' Compositum

asked 2019-04-23 00:07:29 -0500

nmbthr gravatar image

I'm having two difficulties which I assume are simple to resolve. I have a set field, say $K= \mathbb{Q}(x^2+1)$, and a set of polynomials I want to check if they are irreducible over $K$. If they are irreducible, I would like to form the compositum of $K$ and this field generated by $f$ and then find a 'nice' generator. For example,

K.<root> = NumberField(x^2+1);
R = K['x'];
poly = [x^2 + 1, x^2 + 2, x^2 + x + 1];
f = R(poly[0]);
if f.is_irreducible:
    L = NumberField([x^2+1, f]);

There are two issues:

  1. Even when f.is_irreducible() gives True, the polynomial is not always irreducible, as in the case above, so that the construction of L gives an error.

  2. Even if L can be formed, how do I find a 'nice' generator for L, i.e. a single polynomial $g$ which generates L so that I can form a 'better' (in terms of computation speed) field $M= \mathbb{Q}(g)$?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2019-04-23 04:24:38 -0500

dan_fulea gravatar image

The following works for me:

S.<X> = QQ[]
K.<j> = QuadraticField(-1)
R.<x> = K[]

polynomials = [X^2 + 1, X^2 + 2, X^2 + X + 1]

count = 0
for f in polynomials:
    count += 1
    print "[%s]" % count
    if R(f).is_irreducible():
        print "\tIrreductible case for %s over K..." % f
        L = NumberField( [X^2+1, f], names='a');
        print "\tThe number field L is:"
        print "\t%s" % L
        print "\tThe base field of L is:"
        print "\t%s" % L.base_field()
        print "\tL has absolute degree %s" % L.absolute_degree()
        print "\tL has relative degree %s" % L.relative_degree()
    else:
        print "\tReducible case for %s over K" % f

Results:

[1]
        Reducible case for X^2 + 1 over K
[2]
        Irreductible case for X^2 + 2 over K...
        The number field L is:
        Number Field in a0 with defining polynomial X^2 + 1 over its base field
        The base field of L is:
        Number Field in a1 with defining polynomial X^2 + 2
        L has absolute degree 4
        L has relative degree 2
[3]
        Irreductible case for X^2 + X + 1 over K...
        The number field L is:
        Number Field in a0 with defining polynomial X^2 + 1 over its base field
        The base field of L is:
        Number Field in a1 with defining polynomial X^2 + X + 1
        L has absolute degree 4
        L has relative degree 2

Note that f.is_irreducible is only a method, as a boolean it always avaluates to True, one has to call it, f.is_irreducible() to have the needed True or False. Also, always make the difference between the transcendentals like x over different fields.

edit flag offensive delete link more

Comments

Something like a0 + a1, which may be obtained like this:

sage: sum(L.gens())
a0 + a1

should be a simple generator, but this should be checked in an ad-hoc manner.

dan_fulea gravatar imagedan_fulea ( 2019-04-23 04:28:05 -0500 )edit

Once you have the field as a relative extension, you can get it as a primitive extension of Q via L.absolute_field('b'). You can then use L.optimized_representation() to get a nice representation.

nbruin gravatar imagenbruin ( 2019-04-23 10:39:39 -0500 )edit

Please use python3 print syntax in your answers.

FrédéricC gravatar imageFrédéricC ( 2019-04-24 03:42:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-04-23 00:07:29 -0500

Seen: 51 times

Last updated: Apr 23