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

Mjrodgers ow g modules #4108

Merged
merged 34 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d7b7045
add bad first attempt at `GModuleHom` type
mjrodgers Sep 16, 2024
f05a8ab
fix `irreducible_modules(QQ,G)` returning duplicate modules
mjrodgers Sep 17, 2024
8a9d8de
fix variable name
mjrodgers Sep 17, 2024
20c6825
add missing `}`
mjrodgers Sep 17, 2024
2a16d7c
extend the GHom's - almost useful now
fieker Sep 18, 2024
e12fb1e
typos
fieker Sep 18, 2024
d9612fe
proof of comcept: use map in restriction
fieker Sep 18, 2024
697ea8f
add bad first attempt at `GModuleHom` type
mjrodgers Sep 16, 2024
24eaaff
fix `irreducible_modules(QQ,G)` returning duplicate modules
mjrodgers Sep 17, 2024
657bf52
fix variable name
mjrodgers Sep 17, 2024
106165b
add missing `}`
mjrodgers Sep 17, 2024
4630411
extend the GHom's - almost useful now
fieker Sep 18, 2024
d29002d
typos
fieker Sep 18, 2024
6c9ad76
proof of comcept: use map in restriction
fieker Sep 18, 2024
9a4c7ed
make extensino return an extension and add iso(FP...)
fieker Sep 26, 2024
4053099
more functionality for collector objects
ThomasBreuer Sep 27, 2024
d45516c
Update test/Groups/pcgroup.jl
fieker Oct 9, 2024
0915920
change ordering to make it work
fieker Oct 9, 2024
3122e45
fix iso(FPGroup, E) and ass iso(PcGroup, E)
fieker Oct 9, 2024
5174b90
more functionality for collector objects
ThomasBreuer Sep 27, 2024
9a7c554
add `get_relative_order`, `get_power`, `get_conjugate`
ThomasBreuer Oct 9, 2024
5b04090
use Thomas' new functions and do the iso
fieker Oct 10, 2024
5f02019
add comment - it will fail...
fieker Oct 10, 2024
714c288
Merge remote-tracking branch 'origin/master' into mjrodgers-OW_GModules
fieker Nov 14, 2024
9d62185
add/ fix support for sub/ image/ kernel for G-modules
fieker Nov 28, 2024
5812f12
Merge remote-tracking branch 'origin/master' into mjrodgers-OW_GModules
fieker Nov 28, 2024
423540d
more functionality for collector objects
ThomasBreuer Sep 27, 2024
992f6f7
Merge remote-tracking branch 'origin/master' into mjrodgers-OW_GModules
fieker Dec 12, 2024
ccb5ee4
problems with forms...
fieker Dec 12, 2024
58cb293
remove stuff
fieker Dec 12, 2024
6533095
fix a `conductor` call
ThomasBreuer Dec 12, 2024
1cd8833
make the tests pass
ThomasBreuer Dec 13, 2024
90925f0
Merge branch 'mjrodgers-OW_GModules' of https://github.com/oscar-syst…
mjrodgers Jan 10, 2025
b81c70e
Update src/Rings/AbelianClosure.jl
mjrodgers Jan 15, 2025
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
6 changes: 3 additions & 3 deletions experimental/GModule/src/Cohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ the corresponding elt in the extension.
If the gmodule is defined via a pc-group and the 1st argument is the
`Type{PcGroup}`, the resulting group is also pc.
"""
function extension(c::CoChain{2,<:Oscar.GAPGroupElem})
function extension(::Type{FPGroup}, c::CoChain{2,<:Oscar.GAPGroupElem})
C = c.C
G = Group(C)
F = codomain(isomorphism(FPGroup, G, on_gens=true))
Expand Down Expand Up @@ -2253,7 +2253,7 @@ function split_extension(C::GModule)
c = Dict((g, h) => zero(C.M) for g = C.G for h = C.G)
S = elem_type(C.G)
T = elem_type(C.M)
return extension(CoChain{2, S, T}(C, c))
return extension(FPGroup, CoChain{2, S, T}(C, c))
end

function split_extension(::Type{PcGroup}, C::GModule{<:PcGroupElem})
Expand Down Expand Up @@ -2396,7 +2396,7 @@ function pc_group(c::CoChain{2, <:Oscar.PcGroupElem})
end

function Oscar.permutation_group(c::CoChain{2})
g = extension(c)[1]
g = extension(FPGroup, c)[1]
return permutation_group(g)
end

Expand Down
74 changes: 51 additions & 23 deletions experimental/GModule/src/GModule.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
isdefined(Oscar, :word) || function word end

include("Cohomology.jl")
include("Types.jl")
include("GaloisCohomology.jl")
include("GrpExt.jl")
include("Misc.jl")

module GModuleFromGap
using Oscar
using Hecke
import Hecke: data

#XXX: clash of names!
Expand Down Expand Up @@ -43,7 +43,7 @@
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
Expand All @@ -56,9 +56,15 @@
@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)
Expand Down Expand Up @@ -281,7 +287,7 @@
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 = (sub(M, mx), mx)
r = (sub(M, mx)[1], mx)
if any(x->is_isomorphic(r[1], x[1]), res)
continue
else
Expand Down Expand Up @@ -313,7 +319,7 @@
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

Expand Down Expand Up @@ -496,7 +502,7 @@
k char field
|
Q

So: V is given as G -> GL(n, K)
This is represented by
sigma: Gal(K/k)^2 -> K a 2-chain
Expand All @@ -520,7 +526,7 @@
split by A in GL(n, K)
Now, technically, A V A^-1 has values in Gl(n, E)
Step 7:
Replacing V -> A V A^-1 changes
Replacing V -> A V A^-1 changes
X_g -> A^g X A^-1
As A V A^-1 is in GL(n, E), A^g X A^-1 can be normalized (mult. by
scalar in K) to be in Gl(n, E)
Expand All @@ -543,7 +549,7 @@
d = reduce(lcm, [x[2] for x = ld], init = 1)

s = subfields(base_ring(V))

s = [x for x in s if degree(x[1]) >= d*degree(k)]
sort!(s, lt = (a,b) -> degree(a[1]) < degree(b[1]))
for (m, mm) in s
Expand Down Expand Up @@ -600,7 +606,7 @@
#we need Gal(E/k) as the quotient of A/U
q, mq = quo(domain(mA), U)
X = Dict( g => map_entries(mA(preimage(mq, g)), AA) * X[preimage(mq, g)] * AAi for g = q)
for (g, x) = X
for (g, x) = X
lf = findfirst(!iszero, x)
x *= inv(x[lf])
X[g] = map_entries(pseudo_inv(mm), x)
Expand Down Expand Up @@ -636,7 +642,7 @@
LD = Dict{AbsSimpleNumFieldOrderIdeal, Int}()
LI = Dict{AbsSimpleNumFieldEmbedding, Int}()
for (p, d) = ld
if p == -1
if p == -1
@assert d == 2
if signature(k)[2] == 0
for e = real_embeddings(k)
Expand All @@ -659,21 +665,21 @@
C, mC = automorphism_group(PermGroup, EF)
gE = mE_EF(E[1])
hBC = hom(C, B, [[b for b = B if mC(c)(gE) == mE_EF(mB(b)(E[1]))][1] for c = gens(C)])
gF = mF_EF(F[1])
U, mU = sub(C, [c for c = C if mC(c)(gF) == gF])
gF = mF_EF(F[1])
U, mU = sub(C, [c for c = C if mC(c)(gF) == gF])
MEF = MultGrp(EF)
#inflate
s = Dict{NTuple{2, elem_type(U)}, elem_type(MEF)}((f, g) => MEF(mE_EF(s[(hBC(f), hBC(g))])) for f = U for g = U)


D = gmodule(U, [hom(MEF, MEF, mC(mU(x))) for x = gens(U)])
Sigma = CoChain{2,PermGroupElem, MultGrpElem{AbsSimpleNumFieldElem}}(D, s)

fl, mu = Oscar.GaloisCohomology_Mod.is_coboundary(Sigma)
@assert fl
#inflate X
X = Dict( g => map_entries(mE_EF, X[preimage(h, hBC(mU(g)))]) *mu(g).data for g = U)
@hassert :MinField 1 isone_cochain(X, mU*mC)
@hassert :MinField 1 isone_cochain(X, mU*mC)
@vtime :MinField 2 BB, BBi = hilbert90_generic(X, mU*mC)
c = content_ideal(BB)
sd = Hecke.short_elem(inv(c))
Expand All @@ -697,7 +703,8 @@
function irreducible_modules(::QQField, G::Oscar.GAPGroup)
#if cyclo is not minimal, this is not irreducible
z = irreducible_modules(CyclotomicField, G)
return [gmodule(QQ, descent_to_minimal_degree_field(m)) for m in z]
temp = map(x -> galois_orbit_sum(character(x)), z)
return [gmodule(QQ, descent_to_minimal_degree_field(z[i])) for i in unique(i -> temp[i], 1:length(temp))]
end

function irreducible_modules(::ZZRing, G::Oscar.GAPGroup)
Expand Down Expand Up @@ -926,7 +933,8 @@

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

Check warning on line 936 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L936

Added line #L936 was not covered by tests
return D, hom(C, D, b)
return b
end

Expand All @@ -936,9 +944,19 @@
@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 Oscar.sub(M::GModule{<:Any, FinGenAbGroup}, f::FinGenAbGroupHom)
@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]

Check warning on line 954 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L949-L954

Added lines #L949 - L954 were not covered by tests
D = gmodule(S, M.G, Sac)
return D, hom(D, M, f)
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)))
Expand Down Expand Up @@ -1324,14 +1342,14 @@
cnt = 0
while true
local Y
while true
while true

Check warning on line 1345 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L1345

Added line #L1345 was not covered by tests
Y = rand(K, -5:5)
iszero(Y) || break
end
cnt += 1
S = sum(mA(emb(g))(Y)*c((g,)).data for g = G)
is_zero(S) || return true, mK(S)
if cnt > 10
if cnt > 10
error("should not happen")
end
end
Expand Down Expand Up @@ -1824,8 +1842,8 @@
function invariant_forms(C::GModule{<:Any, <:AbstractAlgebra.FPModule})
D = Oscar.dual(C)
h = hom_base(C, D)
k = kernel(transpose(reduce(vcat, [matrix(base_ring(C), 1, dim(C)^2, _vec(x-transpose(x))) for x = h])))
return [sum(h[i]*k[i, j] for i=1:length(h)) for j=1:ncols(k)]
k = kernel((reduce(vcat, [matrix(base_ring(C), 1, dim(C)^2, _vec(x-transpose(x))) for x = h])))
return [sum(h[i]*k[j,i] for i=1:length(h)) for j=1:nrows(k)]
end

function Oscar.is_isomorphic(A::GModule{T, <:AbstractAlgebra.FPModule{<:FinFieldElem}}, B::GModule{T, <:AbstractAlgebra.FPModule{<:FinFieldElem}}) where T
Expand Down Expand Up @@ -1934,12 +1952,22 @@
end

function Oscar.simplify(C::GModule{<:Any, <:AbstractAlgebra.FPModule{ZZRingElem}})
f = invariant_forms(C)[1]
# f = invariant_forms(C)[1]
#thsi will not give pos. def. forms!!! we need to go via Reynolds.

Check warning on line 1956 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L1956

Added line #L1956 was not covered by tests
# @assert all(i->det(f[1:i, 1:i])>0, 1:nrows(f))
m = map(matrix, C.ac)
S = identity_matrix(ZZ, dim(C))
while true
f = zero_matrix(ZZ, dim(C), dim(C))
for i=gens(C.G)
x = action(C, i)

Check warning on line 1963 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L1961-L1963

Added lines #L1961 - L1963 were not covered by tests
f = f + matrix(x)*transpose(matrix(x))
end
# @assert is_symmetric(f)

Check warning on line 1966 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L1966

Added line #L1966 was not covered by tests
# @assert is_positive_definite(f)
L, T = lll_gram_with_transform(f)
# @assert L == T*f*transpose(T)

Check warning on line 1970 in experimental/GModule/src/GModule.jl

View check run for this annotation

Codecov / codecov/patch

experimental/GModule/src/GModule.jl#L1969-L1970

Added lines #L1969 - L1970 were not covered by tests
Ti = inv(T)
n = [T*x*Ti for x = m]
if length(string(n)) >= length(string(m))
Expand Down
Loading
Loading