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

Experimental: Partitioned Permutations #3439

Merged
merged 39 commits into from
Apr 10, 2024

Conversation

BjSchaefer
Copy link
Contributor

This is a new module for working with partitioned permutations which are used in Free Probablility Theory. For more information see the Readme file.

The module uses the module SetPartitions which is currently in the folder experimentals. To compile properly, we needed to rename the project folder to ZPartitionedPermutations so that this folder is below the folder SetPartitions within the folder experimentals.

@benlorenz
Copy link
Member

The module uses the module SetPartitions which is currently in the folder experimentals. To compile properly, we needed to rename the project folder to ZPartitionedPermutations so that this folder is below the folder SetPartitions within the folder experimentals.

Please add both folders to orderedpkgs instead:

# If an experimental package A depends on another experimental package B, one
# can add `"B", "A"` to `orderedpkgs` below to ensure that B is loaded before A.
# DO NOT USE THIS UNLESS YOU KNOW THE CONSEQUENCES.
# For more background, see https://github.com/oscar-system/Oscar.jl/issues/2300.
const orderedpkgs = [
"LieAlgebras",
"BasisLieHighestWeight", # nees code from LieAlgebras
]

@lgoettgens
Copy link
Member

Thanks for your contribution! I have not much background in the mathematics involved, but will point out some general coding things.

The module uses the module SetPartitions which is currently in the folder experimentals. To compile properly, we needed to rename the project folder to ZPartitionedPermutations so that this folder is below the folder SetPartitions within the folder experimental.

Please add both folders in

const orderedpkgs = [

together with a comment like the one already existent to specify the order of inclusion.

Copy link
Member

@lkastner lkastner left a comment

Choose a reason for hiding this comment

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

I'll block merging until the comment of @benlorenz has been addressed. There is a dedicated mechanism for loading certain packages in an ordered fashion. The side effect is that if a dependency that is in experimental gets discarded, then so will any package depending thereupon.

@lgoettgens lgoettgens dismissed lkastner’s stale review February 27, 2024 14:40

has been addressed

@thofma
Copy link
Collaborator

thofma commented Feb 27, 2024

Since this adds functions for SetPartition from experimental/SetPartition, is there a particular reason to not combine those too? Maybe with some generic "FreeProbabilityTheory" name? Or alternatively, would it be an option to move those methods to the SetPartition module?

@BjSchaefer
Copy link
Contributor Author

The SetPartitions do not exactly contribute to Free Probability Theory but rather to certain compact quantum groups. However, it is very much an option to move the functions for SetPartitions to the corresponding module.

@thofma
Copy link
Collaborator

thofma commented Feb 27, 2024

However, it is very much an option to move the functions for SetPartitions to the corresponding module.

I think that would be great.

The SetPartitions do not exactly contribute to Free Probability Theory but rather to certain compact quantum groups.

OK, that makes sense. I think what we want to avoid is having too many separated (but interdependent) modules in experimental. So if there are more things incoming in the same "broad" area (it could be "Free probability theory and quantum groups"), at some point we can and probably should think about consolidating things. Makes it also easier to move things from experimental to src (which should be the endgame).

Edit: These are just some things to keep in mind, nothing that should hold up this PR here.

@lgoettgens lgoettgens changed the title Partitioned Permutations Experimental: Partitioned Permutations Mar 6, 2024
@fieker fieker marked this pull request as draft March 6, 2024 10:41
@lgoettgens lgoettgens added the experimental Only changes experimental parts of the code label Mar 13, 2024
@BjSchaefer BjSchaefer force-pushed the bs/partitioned_permutations branch from 6e5e31a to 8e08ccb Compare April 2, 2024 20:36
@joschmitt
Copy link
Member

@BjSchaefer Please mark the pull request as "ready for review" when you are done. I assume this is the case, but I did not follow all of the discussion, so I am not sure.

@BjSchaefer BjSchaefer marked this pull request as ready for review April 4, 2024 11:22
Copy link
Member

@joschmitt joschmitt left a comment

Choose a reason for hiding this comment

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

Thank you!
I don't know about the mathematics, but for experimental this certainly looks good enough.
Whoever has write access to master: this can be merged from my point of view.

Copy link
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

Two small nitpicks, otherwise no objections from my side. But as Johannes, I am not familiar with the mathematics involved.

experimental/Experimental.jl Outdated Show resolved Hide resolved
BjSchaefer and others added 2 commits April 9, 2024 14:20
@lgoettgens lgoettgens enabled auto-merge (squash) April 9, 2024 12:22
auto-merge was automatically disabled April 9, 2024 12:28

Head branch was pushed to by a user without write access

@fieker
Copy link
Contributor

fieker commented Apr 9, 2024 via email

@lgoettgens
Copy link
Member

On Tue, Apr 09, 2024 at 05:33:21AM -0700, Lars Göttgens wrote: @lgoettgens commented on this pull request. > + upper_points(cycle_partition(perm(symmetric_group(length(pp_1)), 1:length(pp_1))))) + end +end + +""" + factorization_partitioned_permutation(pp::PartitionedPermutation) + +Return the factorization of pp in form of a set of 2-tuples. + +# Examples +jldoctest +julia> length(factorization_partitioned_permutation(partitioned_permutation(perm(symmetric_group(3), [2, 1, 3]), [1, 1, 2]))) +2 + +""" +function factorization_partitioned_permutation(pp::PartitionedPermutation) Sorry for not thinking this through before posting. factorization(s) seems to already exist in the Oscar universe while factorize does not. So factorization should be the preferred name I think.
factor is the usual Oscar name to obtain a factorisation. factorisations is for the special case of algebraic integers where all factorisations into irreducibles can be computed, but a single factorisation should "factor" I'd actually prefer: function factor(pp::PartitionedPermutation) as the signature - unless there is a reason to repeat the paritioned permutation bit in the name and the signature

-- Reply to this email directly or view it on GitHub: #3439 (comment) You are receiving this because you are subscribed to this thread. Message ID: @.***>

Thanks claus! I didn't remember this one.

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Merging #3439 (fc72cb6) into master (edb8c71) will decrease coverage by 0.45%.
Report is 29 commits behind head on master.
The diff coverage is 94.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3439      +/-   ##
==========================================
- Coverage   82.17%   81.72%   -0.45%     
==========================================
  Files         568      573       +5     
  Lines       77169    77488     +319     
==========================================
- Hits        63410    63330      -80     
- Misses      13759    14158     +399     
Files Coverage Δ
experimental/Experimental.jl 78.57% <ø> (ø)
...rmutations/src/EnumeratePartitionedPermutations.jl 100.00% <100.00%> (ø)
...Permutations/src/PartitionedPermutationProducts.jl 100.00% <100.00%> (ø)
...itionedPermutations/src/PartitionedPermutations.jl 100.00% <100.00%> (ø)
experimental/SetPartitions/src/SetPartition.jl 100.00% <100.00%> (ø)
experimental/SetPartitions/src/SetPartitions.jl 100.00% <ø> (ø)
...titionedPermutations/src/PartitionedPermutation.jl 79.31% <79.31%> (ø)

... and 40 files with indirect coverage changes

@lgoettgens lgoettgens merged commit f206830 into oscar-system:master Apr 10, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Only changes experimental parts of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants