ToFiniteField[k,ff]
converts the integer k to an element of the prime subfield of the finite field ff.
ToFiniteField[expr,ff]
converts the coefficients of the rational expression expr to elements of the finite field ff.
ToFiniteField[expr,ff,t]
converts the coefficients of the rational expression expr to elements of the finite field ff, with t representing the field generator.
ToFiniteField
ToFiniteField[k,ff]
converts the integer k to an element of the prime subfield of the finite field ff.
ToFiniteField[expr,ff]
converts the coefficients of the rational expression expr to elements of the finite field ff.
ToFiniteField[expr,ff,t]
converts the coefficients of the rational expression expr to elements of the finite field ff, with t representing the field generator.
Details
- ToFiniteField replaces integers k with elements ff[{k}] of the prime subfield of ff and replaces t with the field generator ff[{0,1}].
- ToFiniteField goes inside List, Plus, Times and integer Power in expr.
Examples
open all close allBasic Examples (4)
Convert an integer to an element of the prime subfield of a finite field:
ToFiniteField[21, FiniteField[11, 2]]Use t to represent the field generator:
ToFiniteField[2 + 3t + 4t ^ 2, FiniteField[19, 3], t]Convert the coefficients of a rational expression to elements in the prime subfield of a finite field:
ToFiniteField[x + 9x / (2y + 3z), FiniteField[5, 2]]Use t to represent the field generator:
ToFiniteField[(2 + 3t)x + (4 + t ^ 2)y, FiniteField[7, 3], t]Scope (4)
Convert integers and rational numbers to elements of the prime subfield of a finite field:
ToFiniteField[{123, 456 / 789}, FiniteField[7, 2]]PolynomialMod[{123, 456 / 789}, 7]Convert a polynomial in t to a a polynomial in the field generator:
ToFiniteField[12 + 34t + 56t ^ 2 + 78t ^ 3, FiniteField[23, 4], t]θ = FiniteField[23, 4][{0, 1}]12 + 34t + 56t ^ 2 + 78t ^ 3 /. t -> θConvert the coefficients of a polynomial to elements in the prime subfield of a finite field:
ToFiniteField[123 + 456x + 789x ^ 2 + x ^ 3, FiniteField[29, 3]]Convert the coefficients of a rational function, with t used to represent the field generator:
ToFiniteField[t((t ^ 2 + 3)x + (5t + 7)y) / (4t ^ 3x ^ 2 + (3t ^ 2 + 1)y ^ 2), FiniteField[17, 4], t]θ = FiniteField[17, 4][{0, 1}]t((t ^ 2 + 3)x + (5t + 7)y) / (4t ^ 3x ^ 2 + (3t ^ 2 + 1)y ^ 2) /. t -> θProperties & Relations (2)
FromFiniteField converts finite field elements to polynomials in the field generator:
ToFiniteField[(2 + 3t)x + (4 + t ^ 2)y, FiniteField[7, 3], t]FromFiniteField[%, FiniteField[7, 3], t]FromFiniteFieldIndex gives finite field elements with specified indices:
FromFiniteFieldIndex[{123, 456, 789}, FiniteField[5, 7]]ToFiniteField converts integers to elements of the prime subfield:
ToFiniteField[{123, 456, 789}, FiniteField[5, 7]]Related Guides
History
Text
Wolfram Research (2024), ToFiniteField, Wolfram Language function, https://reference.wolfram.com/language/ref/ToFiniteField.html.
CMS
Wolfram Language. 2024. "ToFiniteField." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ToFiniteField.html.
APA
Wolfram Language. (2024). ToFiniteField. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ToFiniteField.html
BibTeX
@misc{reference.wolfram_2026_tofinitefield, author="Wolfram Research", title="{ToFiniteField}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ToFiniteField.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tofinitefield, organization={Wolfram Research}, title={ToFiniteField}, year={2024}, url={https://reference.wolfram.com/language/ref/ToFiniteField.html}, note=[Accessed: 13-June-2026]}