-
Notifications
You must be signed in to change notification settings - Fork 193
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
functoriality of smash #1892
functoriality of smash #1892
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.
It's great to have this!
A few of the Defined
lines are a bit slow. Not sure if that is because of the simpl + pelim
, or because of the long proofs.
Many of the proofs follow the same pattern. Is there a lemma that can be written to handle the boilerplate? That would make it easier to read and might speed up the Defined lines.
Also, the proofs have symmetrical path algebra. It would be nice if that could be handled using swap instead of being duplicated, but that could be considered for a future PR.
Oh, about naming, I think we most often use names like |
About a lemma for handling the boilerplate, I'm thinking of something like |
Thanks for taking a look. I'm not yet certain what the boiler plate code should look like. When proving symmetry and associativity, they started requiring a lot of non-trivial paths so it is not that common outside of functionality it seems. |
d8747dc
to
8716820
Compare
I think all of the new proofs would benefit from About the boilerplate, I mean how every proof uses I also wonder if such a lemma could require a swapped version of the 5th goal, so that exactly the same tactics might be used to prove the 4th and 5th goals. |
I tried to understand how to simplify the proof of |
8716820
to
850cf9d
Compare
I've pushed my attempt which does some simplificiation, but most of the proof is the same. |
You need to do pointed_reduce.
snrapply Build_pHomotopy.
{ snrapply Smash_ind.
- intros x y; simpl.
exact (ap011 _ (p x) (q y)).
- reflexivity.
- reflexivity.
- intros x.
nrapply transport_paths_FlFr'; simpl.
lhs nrapply concat_p1.
lhs nrapply Smash_rec_beta_gluel.
rhs nrapply whiskerL.
2: nrapply Smash_rec_beta_gluel.
induction (p x); simpl.
rhs_V nrapply concat_pp_p.
apply whiskerR.
nrapply ap_pp.
- intros y.
nrapply transport_paths_FlFr'; simpl.
lhs nrapply concat_p1.
lhs nrapply Smash_rec_beta_gluer.
rhs nrapply whiskerL.
2: nrapply Smash_rec_beta_gluer.
induction (q y); simpl.
rhs_V nrapply concat_pp_p.
apply whiskerR.
nrapply (ap011_pp _ _ _ 1 1). }
symmetry; simpl.
lhs nrapply concat_p1.
apply ap022; apply concat_p1. But unfortunately the |
850cf9d
to
d557753
Compare
@jdchristensen I wanted to mention that I also pushed an easy proof of symmetry for smash products here too after doing the simplifications you suggested. I also quickly remembered why associativity was problematic. Hopefully, we can eventually experiment with some of Axel's insights into the problem. One thing that has been bothering me is that the "recursion data" for smash products seems to use funext in an essential way, whereby you need funext to show |
Well, I guess that's not the right way to express the recursion data. It should consist of the constructors of the smash product expressed in (BTW, I see that |
I wasn't happy with how slow the Defined was with those changes, so I was hoping for a different way... I had some suggestions above, but I'd also be ok with some rewrites, as they sometimes make proofs both shorter and faster... |
d557753
to
01f5506
Compare
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 651c8dba-0215-4c7f-b22f-864c5a686c55 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: fe88ccbb-b98d-4c1c-a1e1-c3b578960d39 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 9aa64a30-6ca2-462d-9604-48aa1571bf42 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 95bd5cf8-565c-4e69-b214-bcb558855d2f -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 1d1c7756-7849-46e2-bde2-ef16de5a2a71 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 36a879a1-5c54-41f2-9335-1e326f5f8fc0 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 47e545dc-bf9b-4041-88f2-4dfd000a6587 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: bd0437be-7bd8-49a6-a607-119d8ddd111a -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 84d03a3c-3d7d-4136-bb05-434ba45fd00a -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 3d8be3f9-1880-4d41-82d7-dfaa6fbfe211 -->
01f5506
to
4db57a3
Compare
I've used the new bifunctor constructors to define the smash functor. The definition is now much cleaner. I see the slowdown you are talking about @jdchristensen, however I haven't got any ideas how to speed it up. |
I can't figure out what has changed. I know that sometimes forced pushes are needed (e.g. this was probably a rebase), but when possible it's better to add commits. E.g. when I have your branch checked out, it makes it much easier to update it and see exactly what changed. And even through the github interface, it's much easier to navigate. As far as I can tell, there are several comments that could be addressed:
|
@jdchristensen Sorry about that. I will try to avoid force pushing from now on. FTR I have not modified any commits during each force push and only added commits after each review suggestion / modification. Your suggestion for the proof of functor_smash_homotpic is the commit with description improve proof of functor_smash_homotopic for instance. |
I'll try and address the other points you brought up later when I get some time. |
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]>
I'm not quite sure how to use symmetry to reduce the redundancy in the argument yet, but I will keep thinking about it. |
Signed-off-by: Ali Caglayan <[email protected]>
I've managed to speed up the |
I just sped up a few more lines. I think this is good enough. There are still three Defined lines that are around 0.1 to 0.15s, but that's not too bad. Also, now that the proofs are shorter, I think it's ok that symmetrical arguments are repeated, since there's no simple fix for that. LGTM! |
Here is a new attempt at the functoriality of smash. I've done it directly without using the swapping infrastructure in the Hurewicz formalization. It was quite straightforward and allowed me to define some useful lemmas about
ap011
. (Actually from what I could tell, this wasn't proven to the full extent in the Hurewicz formalization anyway).I'll wait till after #1886 which will mean some proofs will need to be shifted around.