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

feat: group algebras with sparse representation #1655

Merged
merged 1 commit into from
Oct 26, 2024
Merged

feat: group algebras with sparse representation #1655

merged 1 commit into from
Oct 26, 2024

Conversation

thofma
Copy link
Owner

@thofma thofma commented Oct 18, 2024

Due to popular demand, group algebras with sparse representation (aka "don't crash with large groups"). Needs some work/clean up:

julia> G = SymmetricGroup(10)
Full symmetric group over 10 elements

julia> QG = group_algebra(QQ, G)
Group algebra
  of full symmetric group over 10 elements
  over rational field

julia> a = QG(rand(G)); b = QG(rand(G));

julia> c = (a + b) * (a - b)
(1,2,4,8,7)(3,9,10,5,6) - (1,4,9)(2,10,3,6,7,5,8) + (1,7,3,8,6,10,4)(2,9,5) - (1,2,6)(3,9)(4,5)

@royess this might interest you. It is similar to your approach.

Small todo:

  • Add a FG(::Dict) constructor.
  • Add tests.
  • Add documentation.

@thofma thofma marked this pull request as draft October 18, 2024 19:41
@thofma thofma force-pushed the th/grpalg branch 3 times, most recently from d4cbc4f to 2c131f3 Compare October 21, 2024 20:34
@thofma thofma marked this pull request as ready for review October 21, 2024 21:11
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 90.79755% with 15 lines in your changes missing coverage. Please review.

Project coverage is 75.90%. Comparing base (2af99ca) to head (4c08764).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/AlgAss/Elem.jl 84.14% 13 Missing ⚠️
src/AlgAss/AlgGrp.jl 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1655      +/-   ##
==========================================
+ Coverage   75.85%   75.90%   +0.04%     
==========================================
  Files         361      361              
  Lines      113719   113783      +64     
==========================================
+ Hits        86262    86366     +104     
+ Misses      27457    27417      -40     
Files with missing lines Coverage Δ
src/AlgAss/AbsAlgAss.jl 88.26% <100.00%> (+0.06%) ⬆️
src/AlgAss/Types.jl 85.39% <100.00%> (+2.49%) ⬆️
src/Grp/GenGrp.jl 70.11% <100.00%> (+0.11%) ⬆️
src/GrpAb/GrpAbFinGen.jl 76.01% <100.00%> (+0.02%) ⬆️
src/AlgAss/AlgGrp.jl 74.41% <85.71%> (+1.35%) ⬆️
src/AlgAss/Elem.jl 88.34% <84.14%> (-0.26%) ⬇️

... and 30 files with indirect coverage changes

@lgoettgens
Copy link
Contributor

Does this change allow me to work with group algebras of infinite groups as well?

@thofma
Copy link
Owner Author

thofma commented Oct 22, 2024

Yes:

julia> F = free_group(2)
Free group of rank 2

julia> x, y = gens(F);

julia> QF = group_algebra(QQ, F; sparse = true)
Group algebra
  of free group of rank 2
  over rational field

julia> (QF(x) + QF(y))^2
f1^2 + f1*f2 + f2*f1 + f2^2

@Fe-r-oz
Copy link

Fe-r-oz commented Oct 22, 2024

This is wonderful! I will shift to sparse = true as soon as this is merged! Thank you.

Copy link
Contributor

@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.

Great! Some quick comments and questions (all nitpicks, not meant to block anything)

docs/src/manual/algebras/groupalgebras.md Outdated Show resolved Hide resolved
docs/src/manual/algebras/groupalgebras.md Show resolved Hide resolved
src/AlgAss/AlgGrp.jl Outdated Show resolved Hide resolved
src/AlgAss/Types.jl Outdated Show resolved Hide resolved
src/AlgAss/Types.jl Outdated Show resolved Hide resolved
src/AlgAss/Types.jl Outdated Show resolved Hide resolved
@thofma thofma force-pushed the th/grpalg branch 2 times, most recently from 60f759d to 4de570c Compare October 26, 2024 10:56
@thofma
Copy link
Owner Author

thofma commented Oct 26, 2024

Thanks for the comments. I think I addressed them all. I also removed the sparse option from the user-facing version. It is now chosen automatically (as in Magma).

@thofma thofma enabled auto-merge (squash) October 26, 2024 12:47
@thofma thofma merged commit dc2560e into master Oct 26, 2024
18 checks passed
@thofma thofma deleted the th/grpalg branch October 26, 2024 15:06
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.

4 participants