Skip to content

Commit

Permalink
Bump version and AbstractAlgebra and Nemo compats (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Sep 14, 2023
1 parent c591959 commit 1cf978a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 94 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Hecke"
uuid = "3e1990a7-5d81-5526-99ce-9ba3ff248f21"
version = "0.20.3"
version = "0.21.0"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down Expand Up @@ -28,9 +28,9 @@ GAPExt = "GAP"
PolymakeExt = "Polymake"

[compat]
AbstractAlgebra = "^0.31.0"
AbstractAlgebra = "^0.32.1"
GAP = "0.9.6"
Nemo = "^0.35.1"
Nemo = "^0.36.0"
Polymake = "0.10, 0.11"
RandomExtensions = "0.4.3"
julia = "1.6"
Expand Down
14 changes: 8 additions & 6 deletions src/GrpAb/GrpAbFinGen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,27 +219,29 @@ function show_gen(io::IO, A::GrpAbFinGen)
end

function show_snf(io::IO, A::GrpAbFinGen)
io = pretty(io)
if get(io, :compact, false)
print(io, "Abelian group with structure: ")
else
print(io, "GrpAb: ")
print(io, LowercaseOff(), "GrpAb: ")
end
show_snf_structure(io, A)
end

function show_snf_structure(io::IO, A::GrpAbFinGen, mul = "x")
@assert is_snf(A)
len = length(A.snf)
io = pretty(io)
if len == 0
print(io, "Z/1")
print(io, LowercaseOff(), "Z/1")
return
end

if A.snf[1] == 0
if len == 1
print(io, "Z")
print(io, LowercaseOff(), "Z")
else
print(io, "Z^$(len)")
print(io, LowercaseOff(), "Z^$(len)")
end
return
end
Expand All @@ -252,15 +254,15 @@ function show_snf_structure(io::IO, A::GrpAbFinGen, mul = "x")
j += 1
end
if iszero(inv)
print(io, "Z")
print(io, LowercaseOff(), "Z")
if j > 1
print(io, "^($j)")
end
else
if j > 1
print(io, "(Z/$(inv))^$(j)")
else
print(io, "Z/$(inv)")
print(io, LowercaseOff(), "Z/$(inv)")
end
end
if i + j - 1 < len
Expand Down
6 changes: 5 additions & 1 deletion src/GrpAb/SubgroupEnum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,11 @@ function _ptype(G, p)
for i in 1:length(Gsnf.snf) if Gsnf.snf[i] > 1]
reverse!(x)
t = findlast(!iszero, x)
return x[1:t]
if t === nothing
return x[1:0]
else
return x[1:t]
end
end

# Same as above but now allow a function to be applied to the output
Expand Down
2 changes: 1 addition & 1 deletion src/Misc/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ julia> N = matrix(ZZ, 2, 2, [1 1;
[0 1]
julia> multiplicative_order(N)
PosInf()
infinity
```
"""
function multiplicative_order(f::Union{ZZMatrix, QQMatrix})
Expand Down
20 changes: 1 addition & 19 deletions src/QuadForm/Quad/ZLattices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2146,25 +2146,7 @@ with gram matrix
[ 0 0 -3 2]
julia> glue, iS, iR = glue_map(M, S, R)
(Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 -> Q/2Z, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 -> Q/2Z, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 -> Q/2Z)
(Map: finite quadratic module -> finite quadratic module, Map: finite quadratic module -> finite quadratic module, Map: finite quadratic module -> finite quadratic module)
julia> is_bijective(glue)
true
Expand Down
48 changes: 6 additions & 42 deletions src/QuadForm/Torsion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1144,43 +1144,19 @@ Gram matrix quadratic form:
[ 0 0 0 0 4//3]
julia> bool, phi = is_isometric_with_isometry(T,U)
(true, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^5 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^5 -> Q/2Z)
(true, Map: finite quadratic module -> finite quadratic module)
julia> is_bijective(phi)
true
julia> T2, _ = sub(T, [-T[4], T[2]+T[3]+T[5]])
(Finite quadratic module: (Z/3)^2 -> Q/2Z, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^5 -> Q/2Z)
(Finite quadratic module: (Z/3)^2 -> Q/2Z, Map: finite quadratic module -> finite quadratic module)
julia> U2, _ = sub(T, [T[4], T[2]+T[3]+T[5]])
(Finite quadratic module: (Z/3)^2 -> Q/2Z, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^5 -> Q/2Z)
(Finite quadratic module: (Z/3)^2 -> Q/2Z, Map: finite quadratic module -> finite quadratic module)
julia> bool, phi = is_isometric_with_isometry(U2, T2)
(true, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 -> Q/2Z)
(true, Map: finite quadratic module -> finite quadratic module)
julia> is_bijective(phi)
true
Expand Down Expand Up @@ -1254,13 +1230,7 @@ Gram matrix quadratic form:
[4//5]
julia> bool, phi = is_anti_isometric_with_anti_isometry(T, T)
(true, Map with following data
Domain:
=======
Finite quadratic module: Z/5 -> Q/2Z
Codomain:
=========
Finite quadratic module: Z/5 -> Q/2Z)
(true, Map: finite quadratic module -> finite quadratic module)
julia> a = gens(T)[1];
Expand Down Expand Up @@ -1305,13 +1275,7 @@ Gram matrix quadratic form:
[3//5]
julia> bool, phi = is_anti_isometric_with_anti_isometry(T,T)
(true, Map with following data
Domain:
=======
Finite quadratic module: Z/15 -> Q/Z
Codomain:
=========
Finite quadratic module: Z/15 -> Q/Z)
(true, Map: finite quadratic module -> finite quadratic module)
julia> a = gens(T)[1];
Expand Down
26 changes: 4 additions & 22 deletions src/QuadForm/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,7 @@ Gram matrix quadratic form:
[1//3 2//3 1//4]
julia> N, f = normal_form(T)
(Finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z, Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z)
(Finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z, Map: finite quadratic module -> finite quadratic module)
julia> domain(f)
Expand All @@ -366,15 +360,9 @@ Gram matrix quadratic form:
[ 0 0 0 4//3]
julia> abelian_group_homomorphism(f)
Map with following data
Domain:
=======
Abelian group with structure: (Z/3)^2 x Z/12
Codomain:
=========
(General) abelian group with relation matrix
Map: GrpAb: (Z/3)^2 x Z/12 -> (General) abelian group with relation matrix
[4 0 0 0; 0 3 0 0; 0 0 3 0; 0 0 0 3]
with structure of Abelian group with structure: (Z/3)^2 x Z/12
with structure of GrpAb: (Z/3)^2 x Z/12
```
Note that an object of type `TorQuadModuleMor` needs not to be a morphism
Expand Down Expand Up @@ -409,13 +397,7 @@ Gram matrix quadratic form:
[2 4 3//2]
julia> f = hom(T, T6, gens(T6))
Map with following data
Domain:
=======
Finite quadratic module: (Z/3)^2 x Z/12 -> Q/2Z
Codomain:
=========
Finite quadratic module: (Z/3)^2 x Z/12 -> Q/12Z
Map: finite quadratic module -> finite quadratic module
julia> T[1]*T[1] == f(T[1])*f(T[1])
false
Expand Down

0 comments on commit 1cf978a

Please sign in to comment.