Ask Your Question

Revision history [back]

Go this way instead:

sage: P = K.ideal(p)
sage: R = P.residue_field()
sage: R.cardinality()
13
sage: [z.lift() for z in R]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

Why representatives are integers:

sage: R(a)
3
sage: (-a)*p
a - 3
sage: (-a)*P in P
True

So in the quotient $a = 3$.

In general $a$ is mapped to one of K.defining_polynomial().roots(R, multiplicities=False).