Reduction modulo p of Gaussian Integers

已查看 43 次
跳至第一个未读帖子

Paweł Bogdan

未读,
2021年1月31日 15:45:282021/1/31
收件人 sage-nt

Dear sage-nt group!

I'm working on some algorithm using the reduction modulo p of polynomial maps defined over Z. I'm just wondering if it is possible to implement something like that for Gaussian Integers (just like in thread: https://math.stackexchange.com/questions/2160330/about-ring-of-gaussian-integers-modulo-n) Is something like that implemented in Sage? How can I define such a structure?

Best regards
Paweł Bogdan

Julian Rüth

未读,
2021年1月31日 18:21:292021/1/31
收件人 sag...@googlegroups.com
Dear Paweł,

* Paweł Bogdan <pawel....@gmail.com> [2021-01-31 12:45:28 -0800]:

> [...]
> Is something like that implemented in Sage? How can I define such a
> structure?

I am not sure I understood what you are trying to achieve exactly. But
if you are looking for a reduction map from the Gaussian Integers to a
residue field, the following might be more or less what you are trying
to do:

sage: Z.<I> = GaussianIntegers()
sage: R.<x> = Z[]
sage: p = 3
sage: red = R.hom(R.change_ring(Z.residue_field(prime=p)))
sage: g = R.random_element(); g
(-I - 7)*x^2 + x + 4*I - 7
sage: red(g)
(2*Ibar + 2)*x^2 + x + Ibar + 2
sage: p = Z.ideal(2).factor()[0][0]
sage: red = R.hom(R.change_ring(Z.residue_field(prime=p)))
sage: red(g)
x + 1

Is that what you had in mind?

julian

Paweł Bogdan

未读,
2021年2月6日 16:10:122021/2/6
收件人 sage-nt
Dear Julien!

Yes, this is exactly what I meant. Thank you very much!

Best regards
Paweł
回复全部
回复作者
转发
0 个新帖子