-
Notifications
You must be signed in to change notification settings - Fork 196
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
more on commutator subgroups #2205
more on commutator subgroups #2205
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.
I reviewed the latest commits, but I'll want to make one more pass over the whole thing another day.
(The build error seems to be a glitch.) |
Coq is undergoing renaming (to rocq) and the docker images have some teething problems it seems. I think this is known upstream, but I'm unsure if it will be fixed or if we have to do something. |
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 227461ec-4379-4d51-8913-796c057fdd83 -->
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
365b26d
to
f0c34ed
Compare
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
b589965
to
dea560e
Compare
I've made groups definitionally involutive. I was in a bit of a rush so some of the naming and choices could be improved. The |
Great! I'm about to push a commit that takes advantage of this in one spot. Not sure if there are other places as well.
We now have five constructors for groups: |
I just pushed a commit clearing up the confusing naming for the constructors. The summary is as follows: There are 3 constructors
|
I've pruned some more changes that turned out to be unnecessary. I think this is in a good spot for a more thorough review. I'm interested if the build time has been affected in some files for instance. I had some previous experiments with changing around group constructors and they negatively impacted performance which is why I have chosen this setup. Hopefully, we have a balance of clarity, ease-of-use and utility (like with |
Another trick I did that is worth mentioning was to encode the opposite associativity axiom as |
Nice! Can you squash 7 commits into one: starting from "improve group constructors" and including the 6 "revert ..." commits? You could also include the "clarify comment for Build_Group'" change if you want. I'll check things over today or tomorrow. |
Actually, if you can squash "definitionally involutive grp_op" as well, that would mean that files like FreeProduct.v don't get changed at all by this PR, which makes their history cleaner. |
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
55b3e5e
to
34d1169
Compare
@jdchristensen I've squashed the commits related to definitional grp_op into one. THat should be clearer now. |
Signed-off-by: Ali Caglayan <[email protected]>
Global Instance istrunc_isunitpreserving `{Funext} {n A B} unitA unitB f | ||
: IsTrunc n.+1 B -> IsTrunc n (@IsUnitPreserving A B unitA unitB f). | ||
Proof. | ||
unfold IsUnitPreserving; exact _. | ||
Defined. |
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.
Since the proof here is found by typeclass search, can we avoid needing this lemma at all by making IsUnitPreserving transparent for typeclass search? Or some similar idea? (And the same for the many results that use the same idiom.)
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 would rather not mark classes as being transparent for typeclass search or else Coq will spend time unfolding classes and trying to search each class it finds. I agree that this is a bit verbose, but I'm not sure if I can make the proof any slicker.
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.
Is there something like Hint Unfold that will only do it in limited cases?
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.
Ok, I've finished a full pass through and it looks good to me. But I haven't done any timing tests. Are you able to do some? If not, I'll try tomorrow.
The build error is a glitch. |
I won't have time until tomorrow evening. |
I did some timing tests of -j8 builds of four commits: master, the HEAD of this PR, and two in between. All took the same time within the noise. I also did a -j1 file-by-file comparison of the HEAD of this PR vs master and got the following:
That indicates a general trend to be slightly slower with this PR, but nothing major. So I'm ok with merging this. |
@jdchristensen Fantastic. Are there any more related things you would like while we are looking at this? |
Actually, taking a quick look at the timing output for AbPushout.v showed two lines that got slower. I'll indicate them and any others I find.
And here are some slow lines from the Groups folder. I didn't compare to how they are in master.
|
Besides maybe fixing a few slow lines, there's nothing else I can think of adding now. |
(In case it isn't clear, I edited a previous comment to give details of slow lines.) |
I'm not fully certain why those lines in AbPushout are slow. I tried rewriting some of the proofs but it seemed to make things worse. I'll see if I can have a better look soon. |
My latest commit reduces the time to 0.08s, so better than it was before. The main benefit comes from removing one But it doesn't explain why it got slower. Presumably something about the other changes in the PR makes some code slower, and it would be nice to know what causes it. I didn't yet look at any of the other spots I mentioned above. |
My last commit gets this down to ~0.09s. But if I make the same change in master, that line only takes 0.04s, so there is still a discrepancy. Not a big deal, but it must be small slowdowns like this that are showing up in the -j1 results. |
The slowest line in |
As you said before, the slowdown is within the realm of acceptability so its probably not worth the effort of splitting hairs. |
This PR was originally about some extra results on commutator subgroups but ended up introducing a definitionally involutive opposite groups and various improvements to groups.