We begin by starting up the AbstractAlgebra.jl module.
using AbstractAlgebra
INFO: Precompiling module AbstractAlgebra.
Welcome to AbstractAlgebra version 0.0.8 AbstractAlgebra comes with absolutely no warranty whatsoever
R, x = PolynomialRing(ZZ, "x")
(Univariate Polynomial Ring in x over Integers, x)
Create a random polynomial of degree 5 with integer coefficients in [-10, 10]
p = rand(R, 5:5, -10:10)
5*x^5-4*x^4+5*x^3-8*x^2+6*x+8
q = rand(R, 5:5, -10:10)
10*x^5+5*x^4-8*x^2-x+1
r = resultant(p, q)
-8196951635
R = ResidueField(ZZ, 65537) # R = Z/65537Z
Residue field of Integers modulo 65537
S, (x, y) = PolynomialRing(R, ["x", "y"])
(Multivariate Polynomial Ring in x, y over Residue field of Integers modulo 65537, AbstractAlgebra.Generic.MPoly{AbstractAlgebra.Generic.ResF{BigInt}}[x, y])
f = 1 + x + y
x+y+1
g = f^5;
h = g*(g + 1);
length(h)
66
R, x = PolynomialRing(QQ, "x")
K = ResidueField(R, x^3 + 3x + 1) # Number field
Residue field of Univariate Polynomial Ring in x over Rationals modulo x^3+3//1*x+1//1
S = MatrixSpace(K, 3, 3)
M = rand(S, 2:2, -10:10)
[3//10*x^2+1//3*x+3//5 1//2*x^2-1//3*x+6//1 -4//5*x^2+2//7*x+1//1] [1//2*x^2+x-7//6 -1//3*x^2+9//5*x+5//1 -7//6*x^2+3//2*x-5//3] [5//2*x^2+1//2*x-1//6 -7//2*x^2-8//3*x+7//8 -7//10*x^2-8//7*x-4//3]
U, t = PolynomialRing(K, "t")
p = minpoly(U, M) # compute minimum polynomial of M
t^3+(11//15*x^2-104//105*x-64//15)*t^2+(-71963//25200*x^2-91127//5040*x+46537//12600)*t+(8446987//756000*x^2-1399517//27000*x-269947//36000)
D = det(M)
-8446987//756000*x^2+1399517//27000*x+269947//36000
We will compute with a polynomial ring over a residue ring over a polynomial ring over a finite field
R = ResidueField(ZZ, 23)
Residue field of Integers modulo 23
S, y = PolynomialRing(R, "y")
(Univariate Polynomial Ring in y over Residue field of Integers modulo 23, y)
T = ResidueRing(S, y^3 + 3y + 1)
Residue ring of Univariate Polynomial Ring in y over Residue field of Integers modulo 23 modulo y^3+3*y+1
U, z = PolynomialRing(T, "z")
(Univariate Polynomial Ring in z over Residue ring of Univariate Polynomial Ring in y over Residue field of Integers modulo 23 modulo y^3+3*y+1, z)
p = rand(U, 2:2, 5:5, -10:10); q = rand(U, 2:2, 5:5, -10:10);
s = resultant(p, q)
4*y^2+10
We verify an identity on Weber functions
Work to an internal precision of 1000 terms
R, q = PuiseuxSeriesRing(ZZ, 1000 , "q" )
(Puiseux series ring in q over Integers, q+O(q^1001))
Define the Dedekind eta function
eta_qexp(q) = prod(1 - q^n for n = 1:50)*q^(1//24)
eta_qexp (generic function with 1 method)
Define one of the Weber modular functions
f1(q) = divexact(eta_qexp(q^(1//2)), eta_qexp(q))
f1 (generic function with 1 method)
Define two Puiseux series in terms of the Weber function
A = divexact(f1(q)^2, f1(q^20)^2)
B = divexact(f1(q^2)^2, f1(q^10)^2)
q^1//3-2*q^4//3+q^7//3-2*q^10//3+4*q^13//3-2*q^16//3+q^19//3-4*q^22//3+5*q^25//3-4*q^28//3+8*q^31//3-12*q^34//3+12*q^37//3-14*q^40//3+17*q^43//3-16*q^46//3+17*q^49//3-24*q^52//3+25*q^55//3-28*q^58//3+42*q^61//3+O(q^127//6)
Verify an identity between A and B to the maximum available precision
A^8*(B^18 + 2B^15 + 255B^12 - 580B^9 + 255B^6 - 30B^3 + 1 - 256A^8*B^11 + 256A^4*B^7) + 16A^4*B^11 - B^19
0+O(q^163//6)