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