序和相对扩张

编号字段中的订单

An order in a number field \(K\) is a subring of \(K\) whose rank over \(\ZZ\) equals the degree of \(K\). For example, if \(K=\QQ(\sqrt{-1})\), then \(\ZZ[7i]\) is an order in \(K\). A good first exercise is to prove that every element of an order is an algebraic integer.

sage: K.<I> = NumberField(x^2 + 1)
sage: R = K.order(7*I)
sage: R
Order of conductor 7 generated by 7*I
 in Number Field in I with defining polynomial x^2 + 1
sage: R.basis()
[1, 7*I]

使用 discriminant 命令,我们计算这个命令的判别式

sage: factor(R.discriminant())
-1 * 2^2 * 7^2

用给定的生成元构造序

您可以给出数字字段的任何元素列表,它将生成最小的环 \(R\) 这就包含了它们。

sage: K.<a> = NumberField(x^4 + 2)
sage: K.order([12*a^2, 4*a + 12]).basis()
[1, 4*a, 4*a^2, 16*a^3]

如果 \(R\) 其等级不等于数字字段的程度(即, \(R\) 不是订单),则您将收到一条错误消息。

sage: K.order([a^2])
Traceback (most recent call last):
...
ValueError: the rank of the span of gens is wrong

计算最大阶数

We can also compute the maximal order, using the maxima order command, which behind the scenes finds an integral basis using Pari's nfbasis command. For example, \(\QQ(\sqrt[4]{2})\) has maximal order \(\ZZ[\sqrt[4]{2}]\), and if \(\alpha\) is a root of \(x^3 + x^2 - 2x+8\), then \(\QQ(\alpha)\) has maximal order with \(\ZZ\)-basis

\[1,\frac{1}{2}a^{2}+\frac{1}{2}a,a^{2}。\]
sage: K.<a> = NumberField(x^4 + 2)
sage: K.maximal_order().basis()
[1, a, a^2, a^3]
sage: L.<a> = NumberField(x^3 + x^2 - 2*x+8)
sage: L.maximal_order().basis()
[1, 1/2*a^2 + 1/2*a, a^2]
sage: L.maximal_order().basis()[1].minpoly()
x^3 - 2*x^2 + 3*x - 10

非最大订单的功能是最小的

Sage中仍然缺少许多用于计算非最大阶数的重要功能。例如,在Sage中,根本不支持在阶上使用模或在非极大阶中使用理想进行计算。

sage: K.<a> = NumberField(x^3 + 2)
sage: R = K.order(3*a)
sage: R.ideal(5)
doctest:warning ... FutureWarning: ...
Ideal (5, 15*a, 45*a^2) of Order generated by 3*a in Number Field in a with defining polynomial x^3 + 2
sage: R.ideal(5).factor()
Traceback (most recent call last):
...
AttributeError: 'NumberFieldOrderIdeal_generic' object has no attribute 'factor'

相对外延

A relative number field \(L\) is a number field of the form \(K(\alpha)\), where \(K\) is a number field, and an absolute number field is a number field presented in the form \(\QQ(\alpha)\). By the primitive element theorem, any relative number field \(K(\alpha)\) can be written as \(\QQ(\beta)\) for some \(\beta\in L\). However, in practice it is often convenient to view \(L\) as \(K(\alpha)\). In 符号表达式, we constructed the number field \(\QQ(\sqrt{2})(\alpha)\), where \(\alpha\) is a root of \(x^3 + \sqrt{2} x + 5\), but not as a relative field--we obtained just the number field defined by a root of \(x^6 + 10x^3 - 2x^2 + 25\).

循序渐进地构建相对数字域

要将此数字字段构造为相对数字字段,首先让 \(K\) BE \(\QQ(\sqrt{2})\)

sage: K.<sqrt2> = QuadraticField(2)

接下来,我们创建一元多项式环 \(R = K[X]\) 。在Sage中,我们通过键入 R.<X> = K[] 。这里 R.<X> 意思是“创建对象 \(R\) 带发电机 \(X\) “和 K[] 意为“环上的多项式环 \(K\) “,其中生成器是根据前面提到的 \(X\) (创建包含两个变量的多项式环 \(X,Y\) 只需替换 R.<X> 通过 R.<X,Y> )。

sage: R.<X> = K[]
sage: R
Univariate Polynomial Ring in X over Number Field in sqrt2 with defining polynomial x^2 - 2 with sqrt2 = 1.414213562373095?

现在我们可以在数域上做一个多项式 \(K=\QQ(\sqrt{2})\) ,并构造了 \(K\) 通过将该多项式的根邻接于 \(K\)

sage: L.<a> = K.extension(X^3 + sqrt2*X + 5)
sage: L
Number Field in a with defining polynomial X^3 + sqrt2*X + 5...

Finally, \(L\) is the number field \(\QQ(\sqrt{2})(\alpha)\), where \(\alpha\) is a root of \(X^3 + \sqrt{2}\alpha + 5\). We can do now do arithmetic in this number field, and of course include \(\sqrt{2}\) in expressions.

sage: a^3
-sqrt2*a - 5
sage: a^3 + sqrt2*a
-5

关于相对数字字段的函数

相对数字段 \(L\) 也有许多函数,其中许多函数既有相对版本又有绝对版本。例如, relative_degree 功能打开 \(L\) 返回的相对度 \(L\) 完毕 \(K\) ;程度; \(L\) 完毕 \(\QQ\) 是由 absolute_degree 功能。避免可能的模棱两可 degree 不适用于相对数字字段。

sage: L.relative_degree()
3
sage: L.absolute_degree()
6

相对数字字段上的额外结构

给定任何相对数字字段,也可以是与其同构的绝对数字字段。下面是我们创建的 \(M = \QQ(b)\) ,它同构于 \(L\) ,但这是一个绝对域 \(\QQ\)

sage: M.<b> = L.absolute_field()
sage: M
Number Field in b with defining
polynomial x^6 + 10*x^3 - 2*x^2 + 25

这个 structure 函数返回两个方向上的同构 \(M\)\(L\)

sage: M.structure()
(Isomorphism map:
  From: Number Field in b with defining polynomial x^6 + 10*x^3 - 2*x^2 + 25
  To:   Number Field in a with defining polynomial X^3 + sqrt2*X + 5 over its base field, Isomorphism map:
  From: Number Field in a with defining polynomial X^3 + sqrt2*X + 5 over its base field
  To:   Number Field in b with defining polynomial x^6 + 10*x^3 - 2*x^2 + 25)

相对数域的任意塔

在Sage中,人们可以创建任意的相对数字段塔(不像在Pari中,相对扩展必须是绝对域的单个扩展)。

sage: R.<X> = L[]
sage: Z.<b> = L.extension(X^3 - a)
sage: Z
Number Field in b with defining polynomial X^3 - a over its base field
sage: Z.absolute_degree()
18

备注

Exercise: Construct the relative number field \(L = K(\sqrt[3]{\sqrt{2}+\sqrt{3}})\), where \(K=\QQ(\sqrt{2}, \sqrt{3})\).

相对数域运算可能会很慢

Sage中相对扩展的一个缺点是,在幕后,所有的算术都是根据单个绝对定义多项式来完成的,在某些情况下,这可能会非常慢(比Magma慢得多)。也许这可以通过使用以适当理想为模的奇异多元多项式来解决,因为奇异多项式的算术非常快。此外,Sage对构造性类场理论的直接支持很少,这是使用相对顺序进行显式计算的主要动机;在这方面,公开更多的Pari功能将是很好的。