Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove comment and add new ambiguous example #1665

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1//2, 1, -1, 3, 1//2, -1//2, 3//2, -3//2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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
Loading