-
Notifications
You must be signed in to change notification settings - Fork 134
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
quantum_autmorphism_groups of matroid #3950
quantum_autmorphism_groups of matroid #3950
Conversation
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.
Hi there, thanks for your contribution! I left a few suggestions for improving the code
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.
some misc julia/style things I noticed while reading through this. I have no knowledge about the mathematics involved
Co-authored-by: Max Horn <[email protected]>
Thanks Lars and Max :) Co-authored-by: Max Horn <[email protected]>
I believe, I did something addressing all of your comments, Thank you guys :) |
Co-authored-by: Lars Göttgens <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3950 +/- ##
==========================================
+ Coverage 83.98% 84.64% +0.65%
==========================================
Files 592 597 +5
Lines 81635 82647 +1012
==========================================
+ Hits 68562 69956 +1394
+ Misses 13073 12691 -382
|
Thanks to @Sequenzer for addressing the barrage of comments and suggestions by @lgoettgens and myself, well done :-) Just as note: since GitHub's PR review feature is really stupid and often prefers showing resolved & outdated source code comments over newer, unresolved comments (which are then hidden behind a "show more comments..." button/link), I've deleted a bunch of, well, resolved & outdated comments by @lgoettgens and myself, to "unclog" the system a bit (this is of course crude. GH should fix their system, but I've been waiting for a long time now for that, so I don't think we can wait for it) |
4ef5e82
to
482b24d
Compare
482b24d
to
0d3f710
Compare
Co-authored-by: Max Horn <[email protected]>
Co-authored-by: Max Horn <[email protected]>
SetsCount[i] = 0 | ||
continue | ||
end | ||
nonSetsCount = n^i - (SetsCount[i] * factorial(i)) |
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.
I have a hard time understanding this code :-( probably because I am missing some matroid theory?
So sets
contains all bases/circuits/flats, sizes
all sizes of those that occur; setSizes
then is the same as sizes
except duplicates aren't removed; you then count for each size how often it turns up.
Side remark: By chance (for unrelated reasons) yesterday I asked on the Julia slack about a convenient function doing such a thing and @lgoettgens pointed out multiset
to me -- you might consider using setsCount = multiset(length.(sets))
which returns an MSet
which counts for each key how often it occurs in it.
Aaanyway: for a set of size SetsCount[i] == n^i
and not SetsCount[i] == binomial(n,i)
?
Unless those sets are actually also multisets and may contain repetitions, then n^i
makes of course sense.
But then why are the non-sets computed as n^i - (SetsCount[i] * factorial(i))
and not n^i - SetsCount[i]
?
Perhaps all of this is obvious when one is deep in this, but perhaps also some comments could be added, and perhaps some variables have bad names (e.g. if these "sets" are not "sets")
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.
So the answer is yes, these sets could technically be multisets containing repetitions, but for the implemented axiom structures they don't contain any duplicates. This means that the check against SetsCount[i] == n^i
is useless at best.
We count with n^i -(SetsCount[i] * factorial(i))
, because sets = getproperty(Oscar, structure)(M)
will only return one permutation for each set of the chosen structure. In the cited paper we argue that instead of choosing sets from the powerset of the groundset, we need to generalise to new bases/circuits/hyperplanes which are a subset of all tuples consisting of elements of the groundset. In the case of bases, for example, this means that a basis is a tuple such that it has no duplicate elements and the support defines a basis in the classical sense.
As an example: If {1,2,3}
is a classical basis, then (1,2,3), (2,1,3), (2,3,1), (1,3,2), (3,1,2), (3,2,1)
are bases in our world.
As for the name sets
, do you have a better suggestion? I chose sets
because it is the only term that fits all the different structures that come from basis sets, independent sets, etc. but yeah it might be confusing haha
I will tinker around a bit more.
So I for my part am done with it. I asked Dan to look at the mathematical aspects of it and he believes the code is correct. So this should be ready to merge :) |
Co-authored-by: Max Horn <[email protected]> Co-authored-by: Lars Göttgens <[email protected]> Co-authored-by: Daniel Corey <[email protected]> Co-authored-by: Benjamin Lorenz <[email protected]>
Add the functions
quantum_permutation_group
andquantum_automorphism_group
to Oscar.Both the quantum permutation group and the quantum automorphism group (of matroids) are defined in Quantum Automorphisms of Matroids.
Since both of these mathematical objects are defined as quotients of a non-commutative polynomial ring, I decided to represent them in OSCAR as just the vector of generators.
All functions are basically done. Suggestions for better tests are welcome.