Ask Your Question

How to express elements in a field of prime order and power of a prime order using the same function?

asked 2020-09-19 12:34:11 +0100

MKS gravatar image

updated 2022-10-06 16:16:02 +0100

FrédéricC gravatar image

When field size is of the form $p^m$, where $p$ is a prime and $m>1$ is a positive integer, there is no problem. For example

F.<x> = GF(5^2)
print F.fetch_int(4)

It outputs : 4.

But if we take field size is in the form $p^1$, then the above code does not working. For example

F.<x> = GF(5^1)
print F.fetch_int(4)

It gives errors. How can I fix this using the same function in both the cases?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-09-19 13:38:19 +0100

rburing gravatar image

This method is currently available only for the Givaro and NTL implementations of finite fields.

You can specify the implementation using the impl keyword to GF, e.g.:

sage: F.<x> = GF(5^1, impl='givaro')
sage: F.fetch_int(4)

In theory, this method could easily be added to all implementations. You might open a trac ticket for it and/or bring it up on the sage-devel mailing list.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-09-19 12:34:11 +0100

Seen: 225 times

Last updated: Sep 19 '20