Skip to content

Commit c4ffff3

Browse files
authored
Adjust to changes in AA and Nemo (#1236)
1 parent e61502d commit c4ffff3

File tree

19 files changed

+48
-56
lines changed

19 files changed

+48
-56
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ GAPExt = "GAP"
2828
PolymakeExt = "Polymake"
2929

3030
[compat]
31-
AbstractAlgebra = "^0.32.1"
31+
AbstractAlgebra = "^0.33.0"
3232
GAP = "0.9.6"
33-
Nemo = "^0.36.1"
33+
Nemo = "^0.37.0"
3434
Polymake = "0.10, 0.11"
3535
RandomExtensions = "0.4.3"
3636
julia = "1.6"

docs/src/function_fields/degree_localization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ localization(K::Generic.RationalFunctionField{T}, ::typeof(degree)) where T <: F
3636

3737
```@repl
3838
using Hecke # hide
39-
K, x = RationalFunctionField(FlintQQ, "x");
39+
K, x = rational_function_field(FlintQQ, "x");
4040
R = localization(K, degree)
4141
```
4242

@@ -51,7 +51,7 @@ the degree localization
5151

5252
```@repl
5353
using Hecke # hide
54-
K, x = RationalFunctionField(FlintQQ, "x");
54+
K, x = rational_function_field(FlintQQ, "x");
5555
R = localization(K, degree)
5656
5757
a = R()

examples/Round2.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ function Nemo.residue_field(a::HessQR, b::HessQRElem)
10571057
@assert parent(b) == a
10581058
@assert is_prime(b.c)
10591059
F = GF(b.c)
1060-
Ft, t = RationalFunctionField(F, String(var(a.R)), cached = false)
1060+
Ft, t = rational_function_field(F, String(var(a.R)), cached = false)
10611061
R = parent(numerator(t))
10621062
return Ft, MapFromFunc(a, Ft,
10631063
x->F(x.c)*Ft(map_coefficients(F, x.f, parent = R))//Ft(map_coefficients(F, x.g, parent = R)),
@@ -1330,9 +1330,9 @@ Hecke.example("Round2.jl")
13301330
13311331
?GenericRound2
13321332
1333-
Qt, t = RationalFunctionField(QQ, "t")
1333+
Qt, t = rational_function_field(QQ, "t")
13341334
Qtx, x = polynomial_ring(Qt, "x")
1335-
F, a = FunctionField(x^6+27*t^2+108*t+108, "a")
1335+
F, a = function_field(x^6+27*t^2+108*t+108, "a")
13361336
integral_closure(parent(denominator(t)), F)
13371337
integral_closure(localization(Qt, degree), F)
13381338
integral_closure(Hecke.Globals.Zx, F)
@@ -1345,7 +1345,7 @@ integral_closure(localization(ZZ, 2), k)
13451345
13461346
more interesting and MUCH harder:
13471347
1348-
G, b = FunctionField(x^6 + (140*t - 70)*x^3 + 8788*t^2 - 8788*t + 2197, "b")
1348+
G, b = function_field(x^6 + (140*t - 70)*x^3 + 8788*t^2 - 8788*t + 2197, "b")
13491349
13501350
=#
13511351

@@ -1442,7 +1442,7 @@ function Hecke.splitting_field(f::Generic.Poly{<:Generic.RationalFunctionFieldEl
14421442
end
14431443

14441444
while true
1445-
G, b = FunctionField(lf[1], "b", cached = false)
1445+
G, b = function_field(lf[1], "b", cached = false)
14461446
if length(lf) == 1 && degree(G) < 3
14471447
return G
14481448
end

src/FunField/Factor.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function Hecke.factor_absolute(f::Generic.Poly{<:Generic.RationalFunctionFieldEl
5454
g = gh[1]
5555
h = gh[2]
5656
k = base_ring(g)
57-
kt, t = RationalFunctionField(k, base_ring(Pf).S, cached = false)
57+
kt, t = rational_function_field(k, base_ring(Pf).S, cached = false)
5858
ktx, x = polynomial_ring(kt, symbols(Pf)[1], cached = false)
5959
push!(la, [from_mpoly(g, ktx), from_mpoly(h, ktx)]=>v)
6060
end
@@ -121,7 +121,7 @@ function Hecke.splitting_field(f::Generic.Poly{<:Generic.RationalFunctionFieldEl
121121
end
122122

123123
while true
124-
G, b = FunctionField(lf[1], "b", cached = false)
124+
G, b = function_field(lf[1], "b", cached = false)
125125
if length(lf) == 1 && degree(G) < 3
126126
return G
127127
end

src/FunField/HessQR.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ function Nemo.residue_field(a::HessQR, b::HessQRElem)
335335
@assert parent(b) == a
336336
@assert is_prime(b.c)
337337
F = GF(b.c)
338-
Ft, t = RationalFunctionField(F, String(var(a.R)), cached = false)
338+
Ft, t = rational_function_field(F, String(var(a.R)), cached = false)
339339
R = parent(numerator(t))
340340
return Ft, MapFromFunc(a, Ft,
341341
x->F(x.c)*Ft(map_coefficients(F, x.f, parent = R))//Ft(map_coefficients(F, x.g, parent = R)),

src/FunField/IntClsZx.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ using .HessMain
213213
#=
214214
this should work:
215215
216-
Qt, t = RationalFunctionField(QQ, "t")
216+
Qt, t = rational_function_field(QQ, "t")
217217
Qtx, x = polynomial_ring(Qt, "x")
218-
F, a = FunctionField(x^6+27*t^2+108*t+108, "a")
218+
F, a = function_field(x^6+27*t^2+108*t+108, "a")
219219
integral_closure(parent(denominator(t)), F)
220220
integral_closure(localization(Qt, degree), F)
221221
integral_closure(Hecke.Globals.Zx, F)
@@ -228,6 +228,6 @@ integral_closure(localization(ZZ, 2), k)
228228
229229
more interesting and MUCH harder:
230230
231-
G, b = FunctionField(x^6 + (140*t - 70)*x^3 + 8788*t^2 - 8788*t + 2197, "b")
231+
G, b = function_field(x^6 + (140*t - 70)*x^3 + 8788*t^2 - 8788*t + 2197, "b")
232232
233233
=#

src/GenOrd/Auxiliary.jl

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,12 @@ function hnf_modular(M::MatElem{T}, d::T, is_prime::Bool = false) where {T}
7272
return H[1:ncols(M), :]
7373
end
7474

75-
function function_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::String = "_a"; check::Bool = true, cached::Bool = false)
76-
return FunctionField(f, s, cached = cached)
75+
function function_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::VarName = :_a; check::Bool = true, cached::Bool = false)
76+
return function_field(f, s, cached = cached)
7777
end
7878

79-
function function_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::Symbol; check::Bool = true, cached::Bool = false)
80-
return FunctionField(f, s, cached = cached)
81-
end
82-
83-
function extension_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::String = "_a"; check::Bool = true, cached::Bool = false)
84-
return FunctionField(f, s, cached = cached)
85-
end
86-
87-
function extension_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::Symbol; check::Bool = true, cached::Bool = false)
88-
return FunctionField(f, s, cached = cached)
79+
function extension_field(f::PolyElem{<:Generic.RationalFunctionFieldElem}, s::VarName = :_a; check::Bool = true, cached::Bool = false)
80+
return function_field(f, s, cached = cached)
8981
end
9082

9183
function Hecke.basis(F::Generic.FunctionField)

src/Misc/Integer.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,6 @@ function _factors_trial_division(n::ZZRingElem, np::Int=10^5)
416416
end
417417

418418

419-
function (::Type{Base.Rational{BigInt}})(x::QQFieldElem)
420-
return Rational{BigInt}(BigInt(numerator(x)), BigInt(denominator(x)))
421-
end
422-
423419
export euler_phi_inv, Divisors, carmichael_lambda
424420

425421
@doc raw"""

src/QuadForm/Types.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,11 @@ Gram matrix quadratic form:
360360
[ 0 0 0 4//3]
361361
362362
julia> abelian_group_homomorphism(f)
363-
Map: GrpAb: (Z/3)^2 x Z/12 -> (General) abelian group with relation matrix
364-
[4 0 0 0; 0 3 0 0; 0 0 3 0; 0 0 0 3]
365-
with structure of GrpAb: (Z/3)^2 x Z/12
363+
Map
364+
from GrpAb: (Z/3)^2 x Z/12
365+
to (General) abelian group with relation matrix
366+
[4 0 0 0; 0 3 0 0; 0 0 3 0; 0 0 0 3]
367+
with structure of GrpAb: (Z/3)^2 x Z/12
366368
```
367369
368370
Note that an object of type `TorQuadModuleMor` needs not to be a morphism
@@ -397,7 +399,9 @@ Gram matrix quadratic form:
397399
[2 4 3//2]
398400
399401
julia> f = hom(T, T6, gens(T6))
400-
Map: finite quadratic module -> finite quadratic module
402+
Map
403+
from finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z
404+
to finite quadratic module: (Z/3)^2 x Z/12 -> Q/12Z
401405
402406
julia> T[1]*T[1] == f(T[1])*f(T[1])
403407
false

src/QuadForm/indefiniteLLL.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If `v` is a square matrix, return the identity matrix of size nxn.
6060
If `redflag` is set to `true`, it LLL-reduces the `m-n` first rows.
6161
"""
6262
function _complete_to_basis(v::MatElem{ZZRingElem}, redflag::Bool = false)
63-
63+
6464
n = nrows(v)
6565
m = ncols(v)
6666

@@ -131,7 +131,7 @@ function _quadratic_form_solve_triv(G::MatElem{ZZRingElem}; base::Bool = false,
131131
#Case 2: G has a block +- [1 0 ; 0 -1] on the diagonal
132132
for i = 2:n
133133
if G[i-1,i] == 0 && abs(G[i-1,i-1])==1 &&abs(G[i,i])==1 && sign(G[i-1,i-1])*sign(G[i,i]) == -1
134-
134+
135135
H[i,i-1] = -1
136136
sol = H[i,:]
137137
if !base
@@ -298,7 +298,7 @@ function lll_gram_indef_with_transform(G::MatElem{ZZRingElem}; check::Bool = fal
298298
#The first line of the matrix G3 only contains 0, except some 'g' on the right, where g² | det G.
299299
n = ncols(G)
300300
U3 = identity_matrix(ZZ,n)
301-
U3[n,1] = round(- G3[n,n]//2*1//G3[1,n])
301+
U3[n,1] = round(ZZRingElem, - G3[n,n]//2*1//G3[1,n])
302302
G4 = U3*G3*transpose(U3)
303303

304304
#The coeff G4[n,n] is reduced modulo 2g
@@ -310,7 +310,7 @@ function lll_gram_indef_with_transform(G::MatElem{ZZRingElem}; check::Bool = fal
310310
V = G4[[1,n], 2:(n-1)]
311311
end
312312

313-
B = map_entries(round, -inv(change_base_ring(QQ,U))*V)
313+
B = map_entries(x->round(ZZRingElem, x), -inv(change_base_ring(QQ,U))*V)
314314
U4 = identity_matrix(ZZ,n)
315315

316316
for j = 2:n-1

test/EllCrv/LocalData.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
@test @inferred kodaira_symbol(E, P) == "I0"
317317

318318
# rational function field
319-
QQt, t = RationalFunctionField(QQ, "t")
319+
QQt, t = rational_function_field(QQ, "t")
320320
E = elliptic_curve_from_j_invariant(t)
321321
_, K, f, c, s = tates_algorithm_local(E, 1//t)
322322
@test K == "I1"
@@ -356,7 +356,7 @@
356356
@test s == true
357357

358358
k, a = quadratic_field(2)
359-
kt, t = RationalFunctionField(k, "t")
359+
kt, t = rational_function_field(k, "t")
360360
E = elliptic_curve_from_j_invariant(1//(t^2 + t + a))
361361

362362
_, K, f, c, s = tates_algorithm_local(E, 1//t)
@@ -377,7 +377,7 @@
377377
@test c == 1
378378
@test s == true
379379

380-
kt, t = RationalFunctionField(GF(2), "t")
380+
kt, t = rational_function_field(GF(2), "t")
381381
E = elliptic_curve_from_j_invariant(t^3/(t^2 + t + 1))
382382
_, K, f, c, s = tates_algorithm_local(E, t^2 + t + 1)
383383
@test K == "I1"

test/EllCrv/MinimalModels.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
end
5555

5656
# _minimize and integral model
57-
Kt, t = RationalFunctionField(QQ, "t")
57+
Kt, t = rational_function_field(QQ, "t")
5858
E = EllipticCurve(Kt.([0, t^21, 1//216, -7//1296, 1//t]))
5959
EE, = integral_model(E)
6060
@test all(p -> is_one(denominator(p)) && is_one(denominator(numerator(p))), a_invars(EE))
@@ -63,7 +63,7 @@
6363

6464
Qx, x = QQ["x"]
6565
K, z = number_field(x^2 + 1, "z", cached = false)
66-
Kt, t = RationalFunctionField(K, "t")
66+
Kt, t = rational_function_field(K, "t")
6767
E = EllipticCurve(Kt.([0, t^21, (z + 1)//216, -7//1296, (z + 3)//t]))
6868
EE, = integral_model(E)
6969
EE = Hecke.reduce_model(E)

test/FunField/DegreeLocalization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
R, x = RationalFunctionField(QQ, "x")
2+
R, x = rational_function_field(QQ, "x")
33
L = localization(R, degree)
44

55
@testset "DegreeLocalization" begin

test/FunField/Differential.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Hecke: divisor
33
flds = [QQ, rationals_as_number_field()[1]]
44

55
@testset "Differentials" for k in flds
6-
kx, x = RationalFunctionField(k, "x")
6+
kx, x = rational_function_field(k, "x")
77
kt = parent(numerator(x))
88
ky, y = polynomial_ring(kx, "y")
99

test/FunField/Divisor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
k = QQ
2-
kx, x = RationalFunctionField(k, "x")
2+
kx, x = rational_function_field(k, "x")
33
kt = parent(numerator(x))
44
ky, y = polynomial_ring(kx, "y")
55

test/GenOrd/GenOrd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
test_Ring_interface(O)
1313

1414
k = GF(5)
15-
kx, x = RationalFunctionField(k, "x")
15+
kx, x = rational_function_field(k, "x")
1616
kt = parent(numerator(x))
1717
ky, y = polynomial_ring(kx, "y")
1818
F, a = function_field(y^3+(4*x^3 + 4*x^2 + 2*x +2)*y^2 + (3*x+3)*y +2)

test/GenOrd/Ideal.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@testset "Ideals for orders over function fields" begin
22

33
k = GF(7)
4-
kx, x = RationalFunctionField(k, "x")
4+
kx, x = rational_function_field(k, "x")
55
kt = parent(numerator(x))
66
ky, y = polynomial_ring(kx, "y")
77
F, a = function_field(y^2+x)
@@ -26,7 +26,7 @@
2626

2727

2828
k = QQ
29-
kx, x = RationalFunctionField(k, "x")
29+
kx, x = rational_function_field(k, "x")
3030
kt = parent(numerator(x))
3131
ky, y = polynomial_ring(kx, "y")
3232
F, a = function_field(y^2+x*y+x^3+y^3)

test/GenOrd/MaximalOrder.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@testset "Qt" begin
2-
qt, t = RationalFunctionField(QQ, "t")
2+
qt, t = rational_function_field(QQ, "t")
33
qtx, x = polynomial_ring(qt, "x")
44
f = x^4 + t*x^3 - 6*x^2 - t*x + 1
5-
F, a = FunctionField(f, "a")
5+
F, a = function_field(f, "a")
66
O = integral_closure(Hecke.localization(qt, degree), F)
77
b = basis(O, F)
88
mp = map(minpoly, b)
@@ -24,16 +24,16 @@ end
2424

2525
@testset "FldFin" begin
2626
for q = [GF(17), GF(next_prime(ZZRingElem(10)^30)), finite_field(5, 2)[1], finite_field(next_prime(ZZRingElem(10)^25), 2, "a", cached = false)[1]]
27-
qt, t = RationalFunctionField(q, "t", cached = false)
27+
qt, t = rational_function_field(q, "t", cached = false)
2828
qtx, x = polynomial_ring(qt, cached = false)
2929
f = x^3+(t+1)^5*(x+1)+(t^2+t+1)^7
30-
F, a = FunctionField(f, "a", cached = false)
30+
F, a = function_field(f, "a", cached = false)
3131
integral_closure(parent(numerator(t)), F)
3232
integral_closure(localization(qt, degree), F)
3333
end
3434

3535
k = GF(5)
36-
kx, x = RationalFunctionField(k, "x")
36+
kx, x = rational_function_field(k, "x")
3737
kt = parent(numerator(x))
3838
ky, y = polynomial_ring(kx, "y")
3939
F, a = function_field(y^3+(4*x^3 + 4*x^2 + 2*x +2)*y^2 + (3*x+3)*y +2)

test/Misc/Poly.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ end
116116
@test @inferred is_squarefree(x * (x + 1))
117117
@test @inferred !is_squarefree(x * (x + 1)^2)
118118

119-
F, a = RationalFunctionField(GF(3), "a")
119+
F, a = rational_function_field(GF(3), "a")
120120
Fx, x = F["x"]
121121
@test @inferred is_squarefree(x)
122122
@test @inferred is_squarefree(2*x^0)

0 commit comments

Comments
 (0)