Skip to content

Commit

Permalink
Fix trace equivalence for infinite isometries (#1212)
Browse files Browse the repository at this point in the history
* fix trace equivalence for infinite isometries

* forgot a argument check
  • Loading branch information
StevellM authored Sep 19, 2023
1 parent bc105af commit c5f65d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/QuadForm/Lattices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ function trace_lattice_with_isometry_and_transfer_data(H::AbstractLat{T}; alpha:
return H, f, AbstractSpaceRes(V, V, identity_matrix(E, n), identity_matrix(E, n))
end

@req (degree(E) == 2) && (is_totally_complex(E)) && (is_totally_real(base_field(E))) "The base field of H must be CM"
@req H isa HermLat "H must be hermitian or defined over the integers"
@req maximal_order(E) == equation_order(E) "Equation order and maximal order must coincide"

# This function perform the trace construction on the level of the
Expand Down Expand Up @@ -1178,7 +1178,6 @@ function trace_lattice_with_isometry(H::HermLat, res::AbstractSpaceRes; beta::Fi
@req parent(beta) === E "beta must be an element of the base algebra of H"
@req (beta == QQ(1) || norm(beta) == 1) "beta must be of norm 1"

@req (degree(E) == 2) && (is_totally_complex(E)) && (is_totally_real(base_field(E))) "The base field of H must be CM"
@req maximal_order(E) == equation_order(E) "Equation order and maximal order must coincide"

Lres = restrict_scalars(H, res)
Expand Down Expand Up @@ -1342,7 +1341,7 @@ function hermitian_structure_with_transfer_data(_L::ZZLat, f::QQMatrix; check::B
end
else
@req E isa NfRel "E must be a relative number field"
@req (degree(E) == 2) && (is_totally_complex(E)) && (is_totally_real(base_field(E))) "E must be a CM-field"
@req degree(E) == 2 "E must be a degree 2 extension of a number field"
b = gen(E)
chi = absolute_minpoly(b)
R = parent(chi)
Expand Down Expand Up @@ -1390,9 +1389,9 @@ function hermitian_structure_with_transfer_data(_L::ZZLat, f::QQMatrix; check::B
for i=1:m
for j=1:m
vi = deepcopy(v)
vi[1,1+(i-1)*euler_phi(n)] = one(QQ)
vi[1,1+(i-1)*n2] = one(QQ)
vj = deepcopy(v)
vj[1,1+(j-1)*euler_phi(n)] = one(QQ)
vj[1,1+(j-1)*n2] = one(QQ)
a = matrix(QQ, 1, n2, [(vi*mb^k*G*transpose(vj))[1] for k in 0:n2-1])
co = solve_left(trace_mat, a)
gram[i,j] = (co*bs)[1]
Expand Down
7 changes: 7 additions & 0 deletions test/QuadForm/Lattices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ end
@test_throws ArgumentError trace_lattice_with_isometry(E8, order = 3)
end

@testset "Fix #1210: trace equivalence for infinite isometries" begin
L = integer_lattice(; gram=QQ[1 2; 2 1])
f = QQ[4 -1; 1 0]
H, res = @inferred hermitian_structure_with_transfer_data(L, f)
@test trace_lattice_with_isometry(H, res) == (L, f)
end

@testset "Hashes" begin
E, b = cyclotomic_field_as_cm_extension(14)
V = hermitian_space(E, 2)
Expand Down

0 comments on commit c5f65d5

Please sign in to comment.