Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This kind of extension is not supported by SageMath yet. Such extensions (whose defining polynomial is neither unramified nor Eisenstein) are added by this merge request which has not been merged into SageMath yet.

I can only speculate that the LMFDB generated the code for an upcoming version of SageMath that will work once such extensions are available.

To create such an extension in SageMath 9.6 you would have to (manually) rewrite the extension as an unramified extension followed by an Eisenstein extension. (The change mentioned above essentially automates this.)

Alternatively, you could try to compile the branch referenced in the above merge request.

Depending on what you are trying to achieve, you could also try to use the henselization package that implements something similar. To install it, you do sage -pip --user install git+https://github.com/MCLF/henselization.git or without the --user or replace sage -pip with just pip, depends how you installed SageMath in the first place.

Then the following should work:

sage: from henselization import Henselization
[you can likely ignore any warnings here]
sage: K = QQ.henselization(2)
sage: L.<a> = K.extension(K['x']([4, 0, 8, 0, 1]))
sage: a.valuation()
1/2
sage: L.residue_field()
Finite Field in u3 of size 2^2
sage: L.valuation().value_group()
Additive Abelian Group generated by 1/2

The field L is then essentially the 2-adic field that were trying to construct but backed by exact number field elements.

This kind of extension is not supported by SageMath yet. Such extensions (whose defining polynomial is neither unramified nor Eisenstein) are added by this merge request which has not been merged into SageMath yet.

I can only speculate that the LMFDB generated the code for an upcoming version of SageMath that will work once such extensions are available.

To create such an extension in SageMath 9.6 you would have to (manually) rewrite the extension as an unramified extension followed by an Eisenstein extension. (The change mentioned above essentially automates this.)

Alternatively, you could try to compile the branch referenced in the above merge request.

Depending on what you are trying to achieve, you could also try to use the henselization package that implements something similar. To install it, you do sage -pip --user install git+https://github.com/MCLF/henselization.git or without the --user or replace sage -pip with just pip, depends how you installed SageMath in the first place.

Then the following should work:

sage: from henselization import Henselization
[you can likely ignore any warnings here]
sage: K = QQ.henselization(2)
sage: L.<a> = K.extension(K['x']([4, 0, 8, 0, 1]))
sage: a.valuation()
1/2
sage: L.residue_field()
Finite Field in u3 of size 2^2
sage: L.valuation().value_group()
Additive Abelian Group generated by 1/2

The field L is then essentially the 2-adic field that were you're trying to construct but backed by exact number field elements.