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

Fix trace equivalence for infinite isometries #1212

Merged
merged 2 commits into from
Sep 19, 2023
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
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 @@
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this still holds, even in the infinite order case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the example of the issue it does not hold, E is real. It does not seem to be actually required to have E/K CM.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right of course.

@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 @@
@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 @@
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"

Check warning on line 1344 in src/QuadForm/Lattices.jl

View check run for this annotation

Codecov / codecov/patch

src/QuadForm/Lattices.jl#L1344

Added line #L1344 was not covered by tests
b = gen(E)
chi = absolute_minpoly(b)
R = parent(chi)
Expand Down Expand Up @@ -1390,9 +1389,9 @@
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
Loading