-
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
integer group powers #1995
integer group powers #1995
Conversation
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 44ea3237-3e45-45d4-891c-694d93f0ae79 -->
Another approach to |
This implementation doesn't compute particularly well to begin with. For instance I'm open to trying out the equivalence approach if @ThomatoTomato would like to have a go. I haven't thought much about it however. |
Okay! Thank you for making me some exercises 🥰 I will see what I will be able to do. |
Definition grp_pow_int_add_1 {G : Group} (n : Int) (g : G) | ||
: grp_pow g (n.+1)%int = g * grp_pow g n. |
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 is a perfect example of a result that will hold in general for the int_iter
that I am proposing. Also, grp_pow_homo
is a naturality statement for int_iter
: if you have pointed types A
and B
with self-equivalences g
and h
, and a pointed map f : A -> B
that commutes with the self-equivalences, then f (int_iter n g pt) = int_iter n h pt
.
(I need to learn how to make suggestions) I've completed the two parts, but I've also changed a lot things along the way. I cannot tell if it is for the better or the worse. I think Dan's idea about having a nat_iter for types with an auto-equivalence sounds nice, but can't we further generalize this to group actions? Do we have any theory of group actions atm? |
What do you mean? Do you mean comments on the code? If so, then you can click on the "Files changed" tab, select some lines to comment on, and enter a comment.
I think it all looks pretty good. And it seems like the unfolded definition of grp_pow simplified things a bit. However, if int_iter is added, I think it will produce something more like the previous definition, so you might have to undo some of your changes.
I don't think we have anything about group actions. But this is really something specific to the integers, since they are free on one generator, so I don't think a general theory of group actions would give as useful a tool as a specific int_iter. If you search the library, you'll find nat_iter and pos_iter, so you can model int_iter on them. But there are additional facts, like the naturality I mentioned earlier, that haven't been done for the existing iterators. Maybe the best thing, though, is to first get this approach merged, and then start a new PR for int_iter. If you address the various comments above, then we can merge. |
I think I've adressed everything that has been commented on now. The change I made in Int.v probably has a shorter form, but I went with the easy solution 🥰 I managed to get rid of many of the rewrites, but I made a helper function that is very similar to grp_pow_int_add_1, called grp_pow_int_sub_1. I could prove it using the former, but then I had to use a lot of rewrites again. I think this is the cleanest way to do this, but idk. |
In addition to the new comments, there are still a couple of older ones that haven't been addressed. I marked the completed things as resolved. (A couple that aren't resolved are about int_iter, which we'll postpone to a future PR.) |
Co-authored-by: Dan Christensen <[email protected]>
Co-authored-by: Dan Christensen <[email protected]>
This LGTM. @ThomatoTomato is there anything else you want to do, or should I go ahead and merge? |
I'm ready to merge, so go ahead. |
We generalise group powers to integers. The nat based powers become a special case.
@ThomatoTomato I've left two parts incomplete if you would like to finish them. Make sure to remove any axioms or
Admitted
s. You may push directly to this branch. If pushing doesn't work, then you can just create a new PR.