From f5ddf053bb4f0ce99a220c580f96bb6c5e163e33 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Fri, 12 Apr 2024 14:09:08 +0200 Subject: [PATCH 1/3] `GModule`: replace `_hom` Create the images of generators directly, instead of first creating pseudo-inverses and compositions of maps. (Eventually, restricting the group action to a submodule should become a function of its own.) --- experimental/GModule/GModule.jl | 13 ++++++------- experimental/GModule/test/runtests.jl | 4 ++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/experimental/GModule/GModule.jl b/experimental/GModule/GModule.jl index 68cf506c4ffa..897b03df3ebb 100644 --- a/experimental/GModule/GModule.jl +++ b/experimental/GModule/GModule.jl @@ -263,11 +263,6 @@ function invariant_lattice_classes(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebr return invariant_lattice_classes(MZ) end -function _hom(f::Map{<:AbstractAlgebra.FPModule{T}, <:AbstractAlgebra.FPModule{T}}) where T - @assert base_ring(domain(f)) == base_ring(codomain(f)) - return hom(domain(f), codomain(f), f.(gens(domain(f)))) -end - function invariant_lattice_classes(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra.FPModule{ZZRingElem}}) res = Any[(M, sub(M.M, gens(M.M))[2])] sres = 1 @@ -284,8 +279,12 @@ function invariant_lattice_classes(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebr pG = p.*gens(M.M) for s in S x, mx = sub(M.M, vcat(pG, [M.M(map_entries(x->lift(ZZ, x), s[i:i, :])) for i in 1:nrows(s)])) - - r = (gmodule(M.G, [_hom(mx*h*pseudo_inv(mx)) for h in M.ac]), mx) + # Compute the restriction of the `M.G`-action from `M.M` + # to the submodule given by the embedding `mx`. + hgens = gens(domain(mx)) + mxac = [hom(domain(mx), domain(mx), + [preimage(mx, h(mx(x))) for x in hgens]) for h in M.ac] + r = (gmodule(M.G, mxac), mx) if any(x->is_isomorphic(r[1], x[1]), res) continue else diff --git a/experimental/GModule/test/runtests.jl b/experimental/GModule/test/runtests.jl index 5697809cc3e1..b4dca34b52af 100644 --- a/experimental/GModule/test/runtests.jl +++ b/experimental/GModule/test/runtests.jl @@ -79,6 +79,10 @@ end @test extension_of_scalars(M, phi) == GModule(mE, G, [hom(mE, mE, a) for a in LE]) + G = pc_group(symmetric_group(3)) + z = irreducible_modules(ZZ, G) + @test length(Oscar.GModuleFromGap.invariant_lattice_classes(z[3])) == 2 + # G = Oscar.GrpCoh.fp_group_with_isomorphism(gens(G))[1] # q, mq = maximal_abelian_quotient(PcGroup, G) # @test length(Oscar.RepPc.brueckner(mq)) == 24 From 6821871c4f0da44e17fede0dedb16c4ad23cb314 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Fri, 12 Apr 2024 14:18:51 +0200 Subject: [PATCH 2/3] fix a call of `maximal_submodule_bases` --- experimental/GModule/GModule.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/GModule/GModule.jl b/experimental/GModule/GModule.jl index 897b03df3ebb..0ad4ef43448c 100644 --- a/experimental/GModule/GModule.jl +++ b/experimental/GModule/GModule.jl @@ -317,7 +317,7 @@ function maximal_submodule_bases(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra. end function maximal_submodules(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) - return [sub(M, s) for s = maximal_submodule_bases] + return [sub(M, s) for s = maximal_submodule_bases(M)] end From 7047b677b53714eb55f809472eb7de11fbdb3959 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Fri, 12 Apr 2024 16:20:59 +0200 Subject: [PATCH 3/3] `GModule`: add `sub(M, emb)` --- experimental/GModule/GModule.jl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/experimental/GModule/GModule.jl b/experimental/GModule/GModule.jl index 0ad4ef43448c..a24d87f3b279 100644 --- a/experimental/GModule/GModule.jl +++ b/experimental/GModule/GModule.jl @@ -279,12 +279,7 @@ function invariant_lattice_classes(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebr pG = p.*gens(M.M) for s in S x, mx = sub(M.M, vcat(pG, [M.M(map_entries(x->lift(ZZ, x), s[i:i, :])) for i in 1:nrows(s)])) - # Compute the restriction of the `M.G`-action from `M.M` - # to the submodule given by the embedding `mx`. - hgens = gens(domain(mx)) - mxac = [hom(domain(mx), domain(mx), - [preimage(mx, h(mx(x))) for x in hgens]) for h in M.ac] - r = (gmodule(M.G, mxac), mx) + r = (sub(M, mx), mx) if any(x->is_isomorphic(r[1], x[1]), res) continue else @@ -635,6 +630,15 @@ function Oscar.sub(C::GModule{<:Any, <:AbstractAlgebra.FPModule{T}}, m::MatElem{ return b end +# Compute the restriction of the `M.G`-action from `M.M` +# to the submodule given by the embedding `f`. +function Oscar.sub(M::GModule{<:Any, <:AbstractAlgebra.FPModule{T}}, f::AbstractAlgebra.Generic.ModuleHomomorphism{T}) where T + @assert codomain(f) == M.M + S = domain(f) + Sac = [hom(S, S, [preimage(f, h(f(x))) for x in gens(S)]) for h in M.ac] + return gmodule(S, M.G, Sac) +end + function gmodule(k::Nemo.FinField, C::GModule{<:Any, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) @assert absolute_degree(k) == 1 F = free_module(k, dim(C)*absolute_degree(base_ring(C)))