-
Notifications
You must be signed in to change notification settings - Fork 162
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
FIX: Add IsBiCoset #2666
FIX: Add IsBiCoset #2666
Conversation
and allow coset multiplication only for bicosets (as otherwise its not well-defined. This fixes gap-system#2555
lib/csetgrp.gd
Outdated
## <Prop Name="IsBiCoset" Arg='C'/> | ||
## | ||
## <Description> | ||
## A (right) cose is considered a <E>bicoset</E> if its set of elements simultaneously forms a left |
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.
Typo: coset
Just as a remark (not strictly required to merge but desirable) we can test this behaviour with the following test file
|
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.
This seems fine in principle, just some remarks. And I don't understand this:
There is no test for the condition of #2555, as the illegal coset multiplication now runs into a `no method found' error.
That's not a problem for adding a test, as also illustrated by @markuspf; since this PR is about fixing that bug, I'd really wish there was a test for this. But I'll survive either way shrug
## | ||
## <Description> | ||
## A (right) coset is considered a <E>bicoset</E> if its set of elements simultaneously forms a left | ||
## coset for the same subgroup. This is the case, for example, if the coset representative normalizes |
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 "for example"? This is an equivalence, isn't it?
local s,r; | ||
s:=ActingDomain(c); | ||
r:=Representative(c); | ||
return ForAll(GeneratorsOfGroup(s),x->r*x/r in s); |
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.
Perhaps test for x^r in s
instead, as that will be a bit more efficient in some cases (e.g. for permutations)?
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.
Yes, if this ever could be time-critical this has the potential to be faster. I decided on the inverse-conjugation as it translated directly to the condition as I had written it doen on paper.
TryNextMethod(); | ||
fi; | ||
c:=RightCoset(ActingDomain(a), Representative(a) * Representative(b) ); | ||
if IsBiCoset(b) then |
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.
Perhaps first check HasIsBicoset to avoid a computation?
@@ -668,10 +683,12 @@ function(a) | |||
local s,r; | |||
s:=ActingDomain(a); | |||
r:=Representative(a); | |||
if ForAny(GeneratorsOfGroup(s),x->not x^r in s) then | |||
if not IsBiCoset(a) then | |||
Error("Inversion only works for cosets of normal subgroups"); |
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.
That error message is wrong (though of course it was before, too)
@hulpke to clarify (esp. in light of what was discussed during yesterdays video conference call; you may have read the notes): all my comments are about minor issues. If you want, you can ignore them, and just merge this, though personally I think it would make sense to at least add a test as suggested by @markuspf. I can address any remaining points with a PR of my own afterwards, too (or alternatively, I can also push fixes to this PR, if you are fine with that) |
@fingolfin What can be awkward awkward (which is not the case here) is the combination of a slew of minor suggestions with the required approval of a PR, which can look as if a moving hurdle is put up higher and higher, requiring the justification or change of ad-hoc decisions. As for testing for a hard error, this will require a change if cosets ever get interpreted as sets of elements and get set-wise multiplication. As I also did not know how to do such a check in a test file, it seemed safer to leave it out. |
Ignore the close/open. Clumsy fingers when carrying the laptop with the web page open... |
Just to clarify: Do we want to merge this now? |
@markuspf I wasn't planning to add more, so as far as I'm concerned this is ready to merge or to discard. |
and allow coset multiplication only for bicosets (as otherwise its not well-defined.
This fixes #2555
There is no test for the condition of #2555, as the illegal coset multiplication now runs into a `no method found' error.