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

Streamline powers of Lie algebra modules #3081

Merged
merged 18 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion src/Modules/ExteriorPowers/FreeModules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
haskey(powers, p) && return powers[p]
lgoettgens marked this conversation as resolved.
Show resolved Hide resolved
end

R = base_ring(F)::base_ring_type(F)
R = base_ring(F)
n = rank(F)
result_ = FreeMod(R, binomial(n, p))

Expand All @@ -39,8 +39,8 @@
@req length(u) == p "need a $p-tuple of elements"
return wedge(collect(u); parent=result)
end
function my_mult(u::FreeModElem...)
return my_mult(u)

Check warning on line 43 in src/Modules/ExteriorPowers/FreeModules.jl

View check run for this annotation

Codecov / codecov/patch

src/Modules/ExteriorPowers/FreeModules.jl#L42-L43

Added lines #L42 - L43 were not covered by tests
end

function my_decomp(u::FreeModElem)
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/ModulesGraded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ function degree(f::FreeModElem)
iszero(f) && return A[0]
f.d = isa(f.d, GrpAbFinGenElem) ? f.d : determine_degree_from_SR(coordinates(f), degrees(parent(f)))
isa(f.d, GrpAbFinGenElem) || error("The specified element is not homogeneous.")
return f.d
return f.d::GrpAbFinGenElem
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw this was the culprit

end

function degree(::Type{Vector{Int}}, f::FreeModElem)
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/UngradedModules/SubquoModuleElem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ ngens(M::SubquoModule) = ngens(M.sub)

Given an `R`-module `M`, return `R`.
"""
base_ring(M::SubquoModule) = base_ring(M.F)
base_ring(M::SubquoModule) = base_ring(M.F)::base_ring_type(M.F)

@doc raw"""
zero(M::SubquoModule)
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/flattenings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ end
function _change_base_ring_and_preserve_gradings(phi::Any, F::FreeMod)
R = base_ring(F)
S = parent(phi(zero(R)))
FS = (is_graded(F) ? graded_free_module(S, Vector{elem_type(grading_group(F))}(degree.(gens(F)))) : FreeMod(S, ngens(F)))
FS = (is_graded(F) ? graded_free_module(S, degree.(gens(F))) : FreeMod(S, ngens(F)))
FS.S = F.S
return FS, hom(F, FS, gens(FS), phi)
end
Expand Down
Loading