使用 sage 计算环商

Use sage to compute ring quotient

令 =ℚ(√2) 和 =() 其中 ^2++1=0 是单位的立方根之一。令a为L的原始元素,O_K代数整数环。然后我如何计算像 O_K/Z[a] 这样的商?我试过了:

K.<sqrt2> = NumberField(x^2-2)
L.<w> = K.extension(x^2+x+1)
a = L.primitive_element()
print L.ring_of_integers().quotient(ZZ[a])

但是我总是收到如下错误:"unable to convert Relative Order in Number Field in w0 with defining polynomial x^2 + (2*sqrt2 + 1)*x + sqrt2 + 3 over its base field to Number Field in w with defining polynomial x^2 + x + 1 over its base field"。

此处正确的语法是什么?

如您所见,问题是我们有 ww0,但他们似乎并不同意。在 this documentation link,我们有一个有趣的例子。

sage: K.<a> = NumberField(x^3 - 2)
sage: ZZ[a]
Order in Number Field in a0 with defining polynomial x^3 - 2 with a0 = a

这让我尝试

sage: K.<a> = NumberField(x^3 - 2)
sage: Za = ZZ[a]
sage: OK = K.maximal_order()
sage: Za.is_suborder(OK)
False
sage: OK.is_suborder(Za)
False
sage: OK
Maximal Order in Number Field in a with defining polynomial x^3 - 2
sage: Za
Order in Number Field in a0 with defining polynomial x^3 - 2 with a0 = a
sage: OK.number_field()
Number Field in a with defining polynomial x^3 - 2
sage: Za.number_field()
Number Field in a0 with defining polynomial x^3 - 2 with a0 = a
sage: OK.number_field() == Za.number_field()
False

正如我们所见,即使 a0=a 显然也没有办法直接比较甚至是基础数字字段。我根本不是这部分代码的专家,但我认为它至少值得澄清一下。我打开了 Trac 28706.


与此同时,如果您能找到一种方法来使用订单的常用语法来获取您想要的订单,我会这样做。对于我根据文档制作的示例,我认为 ZaOK 是相同的,但对于您的示例,我尝试了这个。

sage: Za.gens()
(1, w0, (-2*sqrt2 - 1)*w0 - sqrt2 - 3, (3*sqrt2 + 6)*w0 + 7*sqrt2 + 7)
sage: O1 = L.order([1,w,(-2*sqrt2 - 1)*w - sqrt2 - 3, (3*sqrt2 + 6)*w + 7*sqrt2 + 7])
sage: O1.is_suborder(OK)
True

这当然是一个进步。唉,

sage: OK.quotient(O1)
TypeError: unable to convert Maximal Relative Order in Number Field in w with defining polynomial x^2 + x + 1 over its base field to Number Field in w with defining polynomial x^2 + x + 1 over its base field

所以现在我力不从心了。这样的商数本身是允许的吗?您可能必须创建一个 ideal 来执行此操作。祝你好运!