-
Notifications
You must be signed in to change notification settings - Fork 72
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
Refactoring of retractions, sections, and equivalences, and adding the 6-for-2 property of equivalences #903
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'm leaving a partial review for now. So far I like the changes, especially the renaming of 3-for-2 up to homotopies, I could never remember which one is which 👌
Thanks for fixing up the |
I made some simplifications to the proof that retracts of equivalences are equivalences. In particular, I avoided all explicit constructions of homotopies, since they were all consequences of things that were already constructed in the library. |
Thanks for simplifying the proofs! It originally went from an observation that the higher coherence assumed in the HoTT-UF book wasn't needed to what I submitted in my previous PR, so in the end I didn't consider looking for an even simpler proof. I'm glad you still kept them around though, as I think they're still instructive to have there |
I think it is exactly the same proof as the one you gave, except it is packaged up in terms of earlier constructions in the library. I probably wouldn't have thought of it if you hadn't already simplified the proof. Now I would still like to think about that identification that you earlier marked abstract. It would be nice to have an informal explanation of that construction, because it is hard to understand just by looking at the code. |
Oh, you un-abstracted it. |
Yeah, it's not very conceptual. The first half reasons using homotopies and the last half using identifications. There's another proof in HoTT-UF, but I decided to just brute force it. |
I'll clean it up for you |
Under usual conditions, I would be more than happy to clean up my own mess as well given the feedback, although I also appreciate what you're doing! |
Is this PR closing completion? I was hoping to do a few more things with retracts of maps. |
I'll try to complete it asap. But things are not done in sufficiently functorial manner, so I'm adding for example morphisms of arrows to make this possible. |
As agreed with Egbert, I will review and then merge this PR now. So if anyone else wants to give more input, now is your chance. |
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.
Awesome work, Egbert! Thanks for doing all this
I don't know if you intended to, but I noticed you didn't include the explanation of the terminology "6-for-2" as you did for "3-for-2". |
commuting-triangles-of-maps
file. I moved the commuting triangles induced by sections and retractions here, and moved the action of precomposition on commuting traingles tofunctoriality-of-function-types
foundation-core.equivalences
. One of the ways I cleaned up was by writing a bit more infrastructure for sections and retractions. This made the long names obsolete, because now the projections are named. This is also a general case I would like to make against long variable names: If you write proper infrastructure then you don't need long variable names, plus it will be a lot easier to maintain your naming scheme and not float off course with it.foundation-core.equivalences
file now contains much more explanations.left-factor-htpy
, which was supposed to mean the left factor up to homotopy. However, I think it is clearer if we mentiontriangle
in such names, and name the map in the triangle that is the subject of the assertion. Note that diagrammatic ordering is usually the opposite of the compositional ordering, soleft-factor-htpy
got replaced byright-map-triangle
. Similarly, I replacedcomp-htpy
byleft-map-triangle
andright-factor-htpy
bytop-map-triangle
. This change triggered a lot of changes throughout the library.retractions
I added a predicate foris-retraction
, for obvious reasonssections
I added a predicate foris-section
. In both cases I could have gone through the library and implement this predicate throughout. I didn't do so, but I could potentially do that in a subsequent pull request (not this one).retracts-of-types
fromretractions
, because it is a separate concept from the concept of a retraction of a map, even though it is of course closely related. One thing I did in this file was introduce a non-infix notation for retracts of types. We usually have some non-infix notation for infix operators that indicate how to use statements involving that operator in a naming scheme. Writingretract-of
in names quickly looks very awkward, so I improved that toretract
using this setup.retracts-of-maps
fromorthogonal-factorization-systems
tofoundation
, so that it can be next toretracts-of-types
retracts-of-maps
, but that triggered lots of changes throughout that file. I ended up renaming quite a lot of things, and I hope that is ok. One of the thing I fixed was that the wordsection
was used in names, but no element ofsection _
was constructed or involved. I also replacedretract-of-map
withretract-map
to not have to writeof
so often. Prepositions are not very common in our naming scheme, and I think our naming scheme is better when we use them very sparingly.