Skip to content

Commit

Permalink
fix preimage for TorQuadModMor (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Brandhorst <[email protected]>
  • Loading branch information
simonbrandhorst and Simon Brandhorst authored Feb 16, 2022
1 parent 7fc9b5d commit 07b864b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/QuadForm/Torsion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ function image(f::TorQuadModMor, a::TorQuadModElem)
end

function preimage(f::TorQuadModMor, a::TorQuadModElem)
A = abelian_group(domain(f))
A = abelian_group(codomain(f))
return domain(f)(f.map_ab\(A(a)))
end

Expand Down
4 changes: 2 additions & 2 deletions test/QuadForm/Torsion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
T, i = primary_part(q1, 3)
@test order(T) == 1


Ld = dual(L)

T = @inferred torsion_quadratic_module(Ld, L, snf = false)
Expand Down Expand Up @@ -76,7 +75,8 @@
#orthogonal submodule to a TorQuadMod
L = Zlattice(matrix(ZZ, [[2,0,0],[0,2,0],[0,0,2]]))
T = Hecke.discriminant_group(L)
S, _ = sub(T, gens(T))
S, i = sub(T, gens(T))
@test all([preimage(i,i(s))==s for s in gens(S)])
@test basis_matrix(Hecke.cover(Hecke.orthogonal_submodule_to(T, S)[1])) == basis_matrix(L)
L1 = Zlattice(identity_matrix(ZZ,10))
T1 = torsion_quadratic_module(L1, 3*L1)
Expand Down

0 comments on commit 07b864b

Please sign in to comment.