Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Note that the mapping is just taking the binary digits of the integer and using them as coefficients w.r.t. the basis $1,x,x^2,\ldots$

You can use the built-in integer_representation() method, or do the job manually:

sage: a = F.fetch_int(3)
sage: a.integer_representation()
sage: ZZ(list(vector(a)), base=2)