-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add letters
function for PcGroupElem
#4202
base: master
Are you sure you want to change the base?
Conversation
Moved from the mjrodgers-OW_GModules branch.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4202 +/- ##
========================================
Coverage 84.59% 84.60%
========================================
Files 631 640 +9
Lines 84899 85140 +241
========================================
+ Hits 71824 72032 +208
- Misses 13075 13108 +33
|
Thanks @jamesnohilly to clarify: what you posted in the description is not (yet) what you did, but a description of the work programme, right? Also, should mention that the code here was taken from PR #4108 by @fieker and is only the starting point. |
Yes, that's correct! I've now updated the description to make it clearer and also included a note that the code originates from PR #4108 as the starting point. |
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 comments. Maybe more directed towards @fingolfin and @ThomasBreuer instead of @jamesnohilly
return res | ||
end | ||
|
||
# Convert syllables in canonical form into group element |
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.
why does it only work for syllables in canonical form? I would at least expect the function to test this requirement.
And I think this requirement makes it impossible to construct certain elements in certain groups. Consider < a, b | a^2 = 1, b^2 = 1, aba = bab >
(Weyl group of type A2). The element aba
has no representation in "syllables in canonical form" (or maybe I misunderstood what canonical form means here)
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.
The point is that there are different useful ways to encode a group element that is given by some kind of word. For general elements in finitely presented groups, there is no normal form, and an element is represented by a sequence of letters or syllables.
For elements in polycyclic groups, there is a normal form which corresponds to an exponent vector, and many low level functions deal just with these exponent vectors. In situations where one needs a word-like description of an element, it may be necessary to switch from the exponent vector to a syllable description and back. Often it is not needed to do actual computations (such as normalizing the data) in such a case. Testing whether the data are admissible can make sense; in this case, there should be a check = false
option that allows one to skip these tests.
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.
Thanks for the explanation. I might have mixed up FP and PcGroups when thinking about this.
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've added this check (enabled by default) to verify if the syllables are in the required canonical form in the latest commit.
test/Groups/pcgroup.jl
Outdated
@test letters(G[1]^2) == [2, 2] | ||
@test letters(G[1]^2*G[2]^3*G[3]^3) == [2, 2, 3, 4] | ||
@test letters(G[1]^-2*G[2]^-3*G[3]^-3) == [2, 3, 4] | ||
end |
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.
end | |
end | |
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.
@jamesnohilly you can apply this suggestion via the web interface by using the "Commit suggestions" button. Though you then should also "fetch" the changes from git into your local branch.
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.
Ah, I never noticed this, thanks! I've applied this suggestion in the latest commit.
@jamesnohilly tests are still failing. are on onto that, or do you need assistance? |
As a starting point for this PR, I've borrowed the
syllable
functions for PcGroup from PR #4108 to use as a reference for planned work.Planned work for this PR:
letters
for (Sub)PcGroupElem._exponent_vector
for whether the input is really "canonical".test/Groups/pcgroups.jl
for the new functions.Suggestions from @fingolfin