Created
September 12, 2024 09:45
-
-
Save onurinanc/ccb37ae5dde012dc8bb67617a0f89376 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BabyBear = 2^27 * 15 + 1 | |
M31 = 2^31 - 1 | |
BN254 = 21888242871839275222246405745257275088548364400416034343698204186575808495617 | |
GL = 0xffffffff00000001 | |
fields = [BabyBear, M31, BN254, GL] | |
def check_irreducibility(field): | |
F = GF(field) | |
R.<x> = PolynomialRing(F) | |
f = x^2 - 11 | |
return f"Field: {field}\nIs irreducible: {f.is_irreducible()}" | |
print("\n".join(map(check_irreducibility, fields))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment