-
Notifications
You must be signed in to change notification settings - Fork 126
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
GModule work from OSCAR Workshop #4095
Draft
mjrodgers
wants to merge
7
commits into
oscar-system:master
Choose a base branch
from
mjrodgers:OW_GModules
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d7b7045
add bad first attempt at `GModuleHom` type
mjrodgers f05a8ab
fix `irreducible_modules(QQ,G)` returning duplicate modules
mjrodgers 8a9d8de
fix variable name
mjrodgers 20c6825
add missing `}`
mjrodgers 00a2a51
extend the GHom's - almost useful now
fieker 40ab299
typos
fieker 2415646
proof of comcept: use map in restriction
fieker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
mutable struct GModuleHom{ G, T1, T2} <: Map{GModule{G, T1}, GModule{G, T2}, OscarMap, GModuleHom} | ||
|
||
GM1::GModule{G, T1} | ||
GM2::GModule{G, T2} | ||
module_map::Map{T1, T2} | ||
|
||
function GModuleHom( | ||
M1::GModule, | ||
M2::GModule, | ||
mp::Map; | ||
check::Bool = false | ||
) | ||
# Need to require that | ||
# 1. Both GModules have the same group | ||
# 2. The group action is respected | ||
@req M1.G === M2.G "groups need to be identical" | ||
@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 #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 | ||
|
||
return new{typeof(M1.G), typeof(M1.M), typeof(M2.M)}(M1, M2, mp) | ||
end | ||
end | ||
|
||
function hom(M1::GModule{T}, M2::GModule{T}, mp::Map; check::Bool = true) where T <: AbstractAlgebra.Group | ||
return GModuleHom(M1, M2, mp; check) | ||
end | ||
|
||
function hom(M1::GModule{T}, M2::GModule{T}, mp::MatElem; check::Bool = true) where T <: AbstractAlgebra.Group | ||
return GModuleHom(M1, M2, hom(M1.M, M2.M, mp); check) | ||
end | ||
|
||
domain(M::GModuleHom) = M.GM1 | ||
codomain(M::GModuleHom) = M.GM2 | ||
parent(M::GModuleHom) = Hecke.MapParent(domain(M), codomain(M), "homomorphisms") | ||
|
||
mutable struct GModuleElem{T} | ||
parent::GModule | ||
data::T | ||
end | ||
|
||
parent(a::GModuleElem) = a.parent | ||
|
||
function (C::GModule)(a::Union{ModuleElem, FinGenAbGroupElem}) | ||
@req parent(a) === C.M "wrong parent for $a" | ||
return GModuleElem(C, a) | ||
end | ||
|
||
function ==(a::GModuleElem, b::GModuleElem) | ||
@req parent(a) === parent(b) "parents differ" | ||
return a.data == b.data | ||
end | ||
|
||
function hash(a::GModuleElem, u::UInt) | ||
return hash(a.data, u) | ||
end | ||
|
||
function +(a::GModuleElem, b::GModuleElem) | ||
@req parent(a) === parent(b) "parents differ" | ||
return GModuleElem(parent(a), a.data + b.data) | ||
end | ||
|
||
function -(a::GModuleElem, b::GModuleElem) | ||
@req parent(a) === parent(b) "parents differ" | ||
return GModuleElem(parent(a), a.data - b.data) | ||
end | ||
|
||
function -(a::GModuleElem) | ||
return GModuleElem(parent(a), -a.data) | ||
end | ||
|
||
function *(a::GModuleElem, g::GroupElem) | ||
@req parent(a).G === parent(g) "group element has wrong parent" | ||
return GModuleElem(parent(a), action(parent(a), g, a.data)) | ||
end | ||
|
||
function (A::GModuleHom)(a::GModuleElem) | ||
@req parent(a) === domain(A) "element has wrong parent" | ||
return GModuleElem(codomain(A), A.module_map(a.data)) | ||
end | ||
|
||
function kernel(A::GModuleHom) | ||
return sub(A, kernel(A.module_map)[2]) | ||
end | ||
|
||
function image(A::GModuleHom) | ||
return sub(A, image(A.module_map)[2]) | ||
end | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add some tests for the new code?