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

Tweaks for lattices #1302

Merged
merged 2 commits into from
Nov 29, 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
35 changes: 25 additions & 10 deletions src/ModAlgAss/Lattices/Morphisms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@
#
################################################################################

function _is_isomorphic_with_isomorphism_same_ambient_module(L::ModAlgAssLat, M::ModAlgAssLat)
function _is_isomorphic_with_isomorphism_same_ambient_module(L::ModAlgAssLat, M::ModAlgAssLat; strategy = :default)

Check warning on line 194 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L194

Added line #L194 was not covered by tests
E, f, O, I = _hom_space_as_ideal(L, M)
if strategy == :s1
fl = __isprincipal_s1(O, I, :right)
return fl, zero_map(L.V, M.V)

Check warning on line 198 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L196-L198

Added lines #L196 - L198 were not covered by tests
end
fl, beta = __isprincipal(O, I, :right)
if !fl
return false, zero_map(L.V, M.V)
Expand All @@ -204,7 +208,7 @@
end
end

function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat)
function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat; strategy = :s1)

Check warning on line 211 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L211

Added line #L211 was not covered by tests
# the hom_space function wants L and M sitting inside the same ambient space
# there is some choice we can make
# we try to choose the order, where we already computed the endomorphism
Expand All @@ -216,10 +220,12 @@
return false, zero_map(L.V, M.V)
end
MM = iso(M)
fl, LtoMM = _is_isomorphic_with_isomorphism_same_ambient_module(L, MM)
fl, LtoMM = _is_isomorphic_with_isomorphism_same_ambient_module(L, MM; strategy = strategy)

Check warning on line 223 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L223

Added line #L223 was not covered by tests
if fl
_iso = LtoMM * inv(iso)
@assert _iso(L) == M
if !is_zero(LtoMM.matrix)
@assert _iso(L) == M

Check warning on line 227 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L226-L227

Added lines #L226 - L227 were not covered by tests
end
return true, _iso
else
return false, zero_map(L.V, M.V)
Expand All @@ -230,7 +236,7 @@
return false, zero_map(L.V, M.V)
end
LL = iso(L)
fl, LLtoM = _is_isomorphic_with_isomorphism_same_ambient_module(LL, M)
fl, LLtoM = _is_isomorphic_with_isomorphism_same_ambient_module(LL, M; strategy = strategy)

Check warning on line 239 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L239

Added line #L239 was not covered by tests
if fl
_iso = iso * LLtoM
@assert _iso(L) == M
Expand All @@ -241,8 +247,8 @@
end
end

function is_isomorphic(L::ModAlgAssLat, M::ModAlgAssLat)
return is_isomorphic_with_isomorphism(L, M)[1]
function is_isomorphic(L::ModAlgAssLat, M::ModAlgAssLat; strategy = :default)
return is_isomorphic_with_isomorphism(L, M; strategy = strategy)[1]

Check warning on line 251 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L250-L251

Added lines #L250 - L251 were not covered by tests
end

################################################################################
Expand Down Expand Up @@ -313,16 +319,25 @@
#
################################################################################

function is_aut_isomorphic(L::ModAlgAssLat, M::ModAlgAssLat)
# Take a Z[G]-lattice L and Z[H]-lattice M with G isomorhic to H
# Check if there is an isomorphism G -> H, such that
# L and M are isomorphic
# If G === H, this is the test for Aut(G)-isomorphism
function is_aut_isomorphic(L::ModAlgAssLat, M::ModAlgAssLat; strategy = :default)
G = group(algebra(L.base_ring))
H = group(algebra(M.base_ring))
if G !== H
M = _make_compatible(L, M)

Check warning on line 330 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L326-L330

Added lines #L326 - L330 were not covered by tests
end

for T in _twists(M)
if is_isomorphic(L, T)
if is_isomorphic(L, T; strategy = strategy)

Check warning on line 334 in src/ModAlgAss/Lattices/Morphisms.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/Lattices/Morphisms.jl#L334

Added line #L334 was not covered by tests
return true
end
end
return false
end


function _make_compatible(L::ModAlgAssLat, M::ModAlgAssLat)
G = group(algebra(L.base_ring))
H = group(algebra(M.base_ring))
Expand Down
22 changes: 20 additions & 2 deletions src/ModAlgAss/ModAlgAss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
A = outer_automorphisms(G)
res = typeof(V)[]
for a in A
push!(res, _twist(V, a))
push!(res, _twist(V, hom(a)))

Check warning on line 677 in src/ModAlgAss/ModAlgAss.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/ModAlgAss.jl#L677

Added line #L677 was not covered by tests
end
return res
end
Expand All @@ -683,7 +683,7 @@
A = algebra(V)
@req A isa AlgGrp "Algebra must be a group algebra"
G = group(A)
@req domain(a) == G == codomain(G) "Map must be an endomorphism of the group"
@req domain(a) == G == codomain(a) "Map must be an endomorphism of the group"

Check warning on line 686 in src/ModAlgAss/ModAlgAss.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/ModAlgAss.jl#L686

Added line #L686 was not covered by tests
B = basis(A)
rep2 = QQMatrix[]
for i in 1:length(B)
Expand All @@ -693,3 +693,21 @@
end
W = Amodule(A, rep2)
end

function _change_group(V::ModAlgAss, a::Map; algebra = nothing)
A = Hecke.algebra(V)
@req A isa AlgGrp "Algebra must be a group algebra"
G = group(A)
@req G == codomain(a) "Map must be an endomorphism of the group"
@assert algebra !== nothing
H = domain(a)
QH = group_algebra(base_field(A), H)
B = basis(A)
rep2 = QQMatrix[]
for i in 1:length(B)
g = A.base_to_group[i]
push!(rep2, action(V, A(a(g))))
end
W = Amodule(QH, rep2)
return W

Check warning on line 712 in src/ModAlgAss/ModAlgAss.jl

View check run for this annotation

Codecov / codecov/patch

src/ModAlgAss/ModAlgAss.jl#L697-L712

Added lines #L697 - L712 were not covered by tests
end
Loading