Skip to content

Commit

Permalink
remove comment and add new ambiguous example (#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevellM authored Oct 29, 2024
1 parent 5601795 commit 2b1fd06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/QuadForm/Quad/GenusRep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ end

function _lattice_to_binary_quadratic_form(L::QuadLat)
M = absolute_basis_matrix(L) # This corresponds to a basis of L
@assert nrows(M) == 2 && ncols(M) == 2
@assert nrows(M) == 2
G = gram_matrix(ambient_space(L), M)
GG = change_base_ring(FlintQQ, G)
d = denominator(GG)
Expand Down Expand Up @@ -2284,10 +2284,6 @@ function automorphism_group_generators(g::QuadBin{ZZRingElem})
f = matrix(ZZ, 2, 2, [a, b, n, -a])
push!(gens, t* f * inv(t))
end
# Stevell can make sense of this:
# if is_ambiguous && !(a==0 ||(a != 0 && c ==0 && b % (2*a) == 0))
# error("missing case")
# end
for T in gens
@assert _action(g, T) == g
end
Expand Down
6 changes: 6 additions & 0 deletions test/QuadForm/Quad/GenusRep.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,12 @@ end
@test rank(L2) != degree(L2)
Ns2 = @inferred genus_representatives(L2, use_auto = false)
@test length(Ns2) == length(Ns)

# Binary case
B = matrix(FlintQQ, 2, 23 ,[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
G = matrix(FlintQQ, 23, 23 ,[-4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1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, 0, 0, 0, 0, 1, -1, 3, -3, -1//2, 3//2, -3//2, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, -3, 10, 3//2, -3//2, 5, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -3, 10, -10, -3//2, 5, -5, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1//2, -1//2, 3//2, -3//2, -1//2, 1, -1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1//2, 3//2, -3//2, 5, 1, -1, 3, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3//2, -3//2, 5, -5, -1, 3, -3, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3//2, 5, -5, 17, 3, -3, 10, -10]);
L = integer_lattice(B, gram = G);
@test length(representatives(genus(L))) == 1
end

@testset "More ZZGenus representatives" begin
Expand Down
6 changes: 5 additions & 1 deletion test/QuadForm/QuadBin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@

g = binary_quadratic_form(-4, 3, 0)
gens = automorphism_group_generators(g)
@test gens == [ZZ[-1 0;0 -1], ZZ[-4 3; -5 4]]
@test gens == [ZZ[-1 0; 0 -1], ZZ[-4 3; -5 4]]

g = binary_quadratic_form(-4, 16, 0)
gens = automorphism_group_generators(g)
@test gens == [ZZ[-1 0; 0 -1], ZZ[-1 4; 0 1]]

g = binary_quadratic_form(1, 2, 0)
gens = automorphism_group_generators(g)
Expand Down

0 comments on commit 2b1fd06

Please sign in to comment.