-
Notifications
You must be signed in to change notification settings - Fork 120
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
Cosets changes #126
Merged
Merged
Cosets changes #126
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While this describes what the code does, this strikes me as deeply problematic. It means that you have to creates lots of new subgroups by conjugating H around.
My idea would be to represent
gH
byHg^{-1}
, using that fact that the inversion map induces a bijection between them.That said, I am actually still sceptical about the whole idea of providing left cosets. Perhaps it's a good idea to do so, but I'd really like to see some concrete applications in order to figure out what the "right" way (or at least a "somewhat useful way") to go about them might be.
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 would be much faster during the creation of the coset (I don't have to create the conjugate subgroup), but would it be slower every time I need to access to it?
If
lc=gH
, and I save it asHg^-1
, every time I type something likerand(lc)
orelements(lc)
, or some intersection involvinglc
, I need to compute an inverse. A possible syntax for therand
function could be> function rand(lc::Coset)
> x=rand(lc)
> if isleft(lc) then x=x^-1 end
> return x
> 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.
I think it is perfectly realizable, maybe with a little care about the fact that the underlying GAP object is not the object I'm interested (but its image under the inverse function), but is it really faster?
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.
Well, that exactly is my point: what is "faster" depends entirely on the use case. But no matter how you implement the left cosets, one thing stays the same: as long as they simply (ab)use GAP's right cosets, it will always be faster if you rewrite your code to use right cosets instead of left cosets.
Anyway: as long as this is an implementation detail is hidden from the user, this is fine. But I would not want to mention it to the user! The user should not have to care about this.
Next thing: GAP doesn't really do much with
RightCosets
anyway. So we could think about simply not using GAP objects of typeRightCoset
at all, and simply implement our own two typesRightCoset
andLeftCoset
, which simply wrap a group elementg
plus a subgroupH
. Implementing things likerand
orelements
then is easy: e.g.rand(H) * g
to get a random element. I'll put this idea into another issueThere 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.
It seems good. Do I try this new type on the same branch? Or do we open a new one?