From 75fce4bddb3f554f67c60bd854e8150bb8b6d412 Mon Sep 17 00:00:00 2001 From: Claus Fieker Date: Wed, 18 Sep 2024 15:36:20 +0200 Subject: [PATCH] proof of comcept: use map in restriction --- experimental/GModule/src/GModule.jl | 21 ++++++++++++++------- experimental/GModule/src/Misc.jl | 3 +++ experimental/GModule/src/Types.jl | 9 +++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/experimental/GModule/src/GModule.jl b/experimental/GModule/src/GModule.jl index fbd9628de1a9..1cf4a6e76165 100644 --- a/experimental/GModule/src/GModule.jl +++ b/experimental/GModule/src/GModule.jl @@ -8,7 +8,6 @@ include("Misc.jl") module GModuleFromGap using Oscar -using Hecke import Hecke: data #XXX: clash of names! @@ -44,7 +43,7 @@ julia> C = gmodule(CyclotomicField, C); julia> h = subfields(base_ring(C), degree = 2)[1][2]; julia> restriction_of_scalars(C, h) -G-module for G acting on vector space of dimension 4 over number field +(G-module for G acting on vector space of dimension 4 over number field, Map: C -> g-module for G acting on vector space of dimension 4 over number field) julia> restriction_of_scalars(C, QQ) G-module for G acting on vector space of dimension 8 over QQ @@ -57,9 +56,15 @@ function restriction_of_scalars(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra.F @assert codomain(phi) == base_ring(M) d = divexact(degree(codomain(phi)), degree(domain(phi))) F = free_module(domain(phi), dim(M)*d) - _, _, rep = relative_field(phi) + _, coord, rep = relative_field(phi) - return GModule(F, group(M), [hom(F, F, hvcat(dim(M), [rep(x) for x in transpose(matrix(y))]...)) for y in M.ac]) + D = GModule(F, group(M), [hom(F, F, hvcat(dim(M), [rep(x) for x in transpose(matrix(y))]...)) for y in M.ac]) + #the blow-up function is not a "nice" module hom as tis is used + #to make from a K-Module to e.g. a QQ-module, so the map + #will be QQ-linear and we'd need to get QQ-gens from a K-module + #also: pre-image is not working (not implemented) (needs more info from + #relative_field) + return D, hom(M, D, MapFromFunc(M.M, D.M, x->D.M(vcat([coord(t) for t = x.v[1,:]]...))); check = false) end function restriction_of_scalars(C::GModule{<:Any, <:AbstractAlgebra.FPModule{AbsSimpleNumFieldElem}}, ::QQField) @@ -314,7 +319,7 @@ function maximal_submodule_bases(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra. return res end -function maximal_submodules(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) +function Oscar.maximal_submodules(M::GModule{<:Oscar.GAPGroup, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) return [sub(M, s) for s = maximal_submodule_bases(M)] end @@ -928,7 +933,8 @@ function Oscar.sub(C::GModule{<:Any, <:AbstractAlgebra.FPModule{T}}, m::MatElem{ y = GAP.Globals.MTX.InducedActionSubmoduleNB(g, x) F = free_module(k, nrows(b)) - return gmodule(F, Group(C), [hom(F, F, matrix([preimage(h, x[i, j]) for i in 1:GAPWrap.NrRows(x), j in 1:GAPWrap.NrCols(x)])) for x = y.generators]), hom(F, C.M, b) + D = gmodule(F, Group(C), [hom(F, F, matrix([preimage(h, x[i, j]) for i in 1:GAPWrap.NrRows(x), j in 1:GAPWrap.NrCols(x)])) for x = y.generators]) + return D, hom(C, D, b) return b end @@ -938,7 +944,8 @@ function Oscar.sub(M::GModule{<:Any, <:AbstractAlgebra.FPModule{T}}, f::Abstract @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) + D = gmodule(S, M.G, Sac) + return D, hom(D, M, f) end function gmodule(k::Nemo.FinField, C::GModule{<:Any, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) diff --git a/experimental/GModule/src/Misc.jl b/experimental/GModule/src/Misc.jl index dcca294ca93a..bd04a1d6cc6e 100644 --- a/experimental/GModule/src/Misc.jl +++ b/experimental/GModule/src/Misc.jl @@ -245,6 +245,9 @@ Hecke.restrict(::Hecke.NumFieldEmb, ::Map{QQField, AbsSimpleNumField}) = complex function relative_field(m::Map{<:AbstractAlgebra.Field, <:AbstractAlgebra.Field}) k = domain(m) K = codomain(m) + if k == base_field(K) + return defining_polynomial(K), Hecke.coordinates, representation_matrix + end @assert base_field(k) == base_field(K) kt, t = polynomial_ring(k, cached = false) f = defining_polynomial(K) diff --git a/experimental/GModule/src/Types.jl b/experimental/GModule/src/Types.jl index a3acc85136f9..ade8fccf68f5 100644 --- a/experimental/GModule/src/Types.jl +++ b/experimental/GModule/src/Types.jl @@ -17,7 +17,8 @@ mutable struct GModuleHom{ G, T1, T2} <: Map{GModule{G, T1}, GModule{G, T2}, Osc @req domain(mp) === M1.M && codomain(mp) === M2.M "map need to map 1st module into 2nd" #not every hom is a G-Hom...that is what check is supposed to do - eventually #see 2. - if check + if check #only works if mp is a morphism so that "*" and "==" are doing + #s.th. useful @assert all(g->action(M1, g)*mp == mp*action(M2, g), gens(M1.G)) end @@ -33,8 +34,8 @@ function hom(M1::GModule{T}, M2::GModule{T}, mp::MatElem; check::Bool = true) wh return GModuleHom(M1, M2, hom(M1.M, M2.M, mp); check) end -domain(M::GModuleHom) = M.Gm1 -codomain(M::GModuleHom) = M.Gm2 +domain(M::GModuleHom) = M.GM1 +codomain(M::GModuleHom) = M.GM2 parent(M::GModuleHom) = Hecke.MapParent(domain(M), codomain(M), "homomorphisms") mutable struct GModuleElem{T} @@ -79,7 +80,7 @@ end function (A::GModuleHom)(a::GModuleElem) @req parent(a) === domain(A) "element has wrong parent" - return GModuleElem(codomain(A), A.module_map(a)) + return GModuleElem(codomain(A), A.module_map(a.data)) end function kernel(A::GModuleHom)