Skip to content

Commit

Permalink
Tweaks for lattices (#1302)
Browse files Browse the repository at this point in the history
* Tweaks for lattices
  • Loading branch information
thofma authored Nov 29, 2023
1 parent c34f0ab commit 4b26ea2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
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 @@ end
#
################################################################################

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)
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)
end
fl, beta = __isprincipal(O, I, :right)
if !fl
return false, zero_map(L.V, M.V)
Expand All @@ -204,7 +208,7 @@ function _is_isomorphic_with_isomorphism_same_ambient_module(L::ModAlgAssLat, M:
end
end

function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat)
function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat; strategy = :s1)
# 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 @@ function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat)
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)
if fl
_iso = LtoMM * inv(iso)
@assert _iso(L) == M
if !is_zero(LtoMM.matrix)
@assert _iso(L) == M
end
return true, _iso
else
return false, zero_map(L.V, M.V)
Expand All @@ -230,7 +236,7 @@ function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat)
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)
if fl
_iso = iso * LLtoM
@assert _iso(L) == M
Expand All @@ -241,8 +247,8 @@ function is_isomorphic_with_isomorphism(L::ModAlgAssLat, M::ModAlgAssLat)
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]
end

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

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)
end

for T in _twists(M)
if is_isomorphic(L, T)
if is_isomorphic(L, T; strategy = strategy)
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 @@ function _twists(V::ModAlgAss)
A = outer_automorphisms(G)
res = typeof(V)[]
for a in A
push!(res, _twist(V, a))
push!(res, _twist(V, hom(a)))
end
return res
end
Expand All @@ -683,7 +683,7 @@ function _twist(V::ModAlgAss, a::Map)
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"
B = basis(A)
rep2 = QQMatrix[]
for i in 1:length(B)
Expand All @@ -693,3 +693,21 @@ function _twist(V::ModAlgAss, a::Map)
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
end

0 comments on commit 4b26ea2

Please sign in to comment.