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

LieAlgebras: Enhance module interface #2262

Merged
merged 10 commits into from
Apr 20, 2023

Conversation

lgoettgens
Copy link
Member

Currently, there is some weird behavior when two identical modules have been constructed in different ways, e.g. some module and its 1st exterior power.

julia> L = special_orthogonal_lie_algebra(QQ, 4)
LinearLieAlgebra ( gl_4) over Rational Field

julia> std_V = standard_module(L)
StdModule of LinearLieAlgebra ( gl_4) over Rational Field

julia> V = exterior_power(std_V, 1)
<StackOverflowError>

julia> is_exterior_power(std_V)
true

This PR first adds tests modeling the intended behavior and then approaches to fix the above accordingly.

While on my way, I may add some more module constructions.

@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Merging #2262 (309aff2) into master (ef38ade) will increase coverage by 0.09%.
The diff coverage is 88.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2262      +/-   ##
==========================================
+ Coverage   73.47%   73.57%   +0.09%     
==========================================
  Files         367      367              
  Lines       50277    50384     +107     
==========================================
+ Hits        36940    37068     +128     
+ Misses      13337    13316      -21     
Impacted Files Coverage Δ
experimental/LieAlgebras/src/AbstractLieAlgebra.jl 82.92% <ø> (+2.43%) ⬆️
...rimental/LieAlgebras/test/LinearLieAlgebra-test.jl 87.50% <ø> (ø)
...rimental/LieAlgebras/test/LieAlgebraModule-test.jl 89.87% <75.00%> (-0.67%) ⬇️
experimental/LieAlgebras/test/LieAlgebra-test.jl 91.30% <80.00%> (+0.25%) ⬆️
experimental/LieAlgebras/src/LieAlgebra.jl 84.46% <88.88%> (-0.39%) ⬇️
experimental/LieAlgebras/src/LieAlgebraModule.jl 85.89% <89.78%> (+5.28%) ⬆️
experimental/LieAlgebras/src/GapWrapper.jl 94.59% <100.00%> (ø)
...mental/LieAlgebras/test/AbstractLieAlgebra-test.jl 100.00% <100.00%> (ø)

... and 14 files with indirect coverage changes


function base_modules(V::LieAlgebraModule{C}) where {C<:RingElement}
@req is_direct_sum(V) "Not a direct sum module."
return get_attribute(V, :base_modules)::Vector{LieAlgebraModule{C}}
Copy link
Member Author

Choose a reason for hiding this comment

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

Here, I changed it from an abstract Tuple{Vararg{LieAlgebraModule{C}}} to a concrete Vector{LieAlgebraModule{C}}. @fingolfin

@lgoettgens lgoettgens marked this pull request as ready for review April 17, 2023 10:26
@lgoettgens lgoettgens closed this Apr 17, 2023
@lgoettgens lgoettgens reopened this Apr 17, 2023
@lgoettgens lgoettgens marked this pull request as draft April 17, 2023 14:12
@lgoettgens lgoettgens marked this pull request as ready for review April 17, 2023 14:40
@lgoettgens
Copy link
Member Author

This is ready for review and merge now. Since I expect some small conflict with #2207, I would rather merge this one first and deal with #2207 later. I anticipate a discussion or at least some ugly hacks there.

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Fine by me

@fingolfin fingolfin merged commit 87034cd into oscar-system:master Apr 20, 2023
@lgoettgens lgoettgens deleted the lg/lie-algebra-modules branch April 21, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants