-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Merged by Bors] - feat (Category Theory): redefine and extend mates #13840
Conversation
PR summary a20fcb5384
|
File | Base Count | Head Count | Change |
---|---|---|---|
Mathlib.CategoryTheory.Adjunction.Mates | 332 | 354 | +22 (+6.63%) |
Mathlib.CategoryTheory.Closed.Monoidal | 420 | 421 | +1 (+0.24%) |
Mathlib.CategoryTheory.Closed.Cartesian | 534 | 535 | +1 (+0.19%) |
Mathlib.CategoryTheory.Closed.Functor | 535 | 536 | +1 (+0.19%) |
Import changes for all files
Files | Import difference |
---|---|
7 filesMathlib.CategoryTheory.Closed.FunctorCategory Mathlib.CategoryTheory.Closed.Ideal Mathlib.CategoryTheory.Closed.Functor Mathlib.CategoryTheory.Closed.Types Mathlib.CategoryTheory.Closed.Monoidal Mathlib.CategoryTheory.Closed.Zero Mathlib.CategoryTheory.Closed.Cartesian |
1 |
Mathlib.CategoryTheory.Adjunction.Mates |
22 |
Declarations diff
+ conjugateEquiv
+ conjugateEquiv_adjunction_id
+ conjugateEquiv_adjunction_id_symm
+ conjugateEquiv_comm
+ conjugateEquiv_comp
+ conjugateEquiv_counit
+ conjugateEquiv_counit_symm
+ conjugateEquiv_id
+ conjugateEquiv_iso
+ conjugateEquiv_mateEquiv_vcomp
+ conjugateEquiv_of_iso
+ conjugateEquiv_symm_comm
+ conjugateEquiv_symm_comp
+ conjugateEquiv_symm_id
+ conjugateEquiv_symm_iso
+ conjugateEquiv_symm_of_iso
+ conjugateIsoEquiv
+ iterated_mateEquiv_conjugateEquiv
+ iterated_mateEquiv_conjugateEquiv_symm
+ leftAdjointConjugateSquare.vcomp
+ leftAdjointSquare.comp
+ leftAdjointSquare.comp_hvcomp
+ leftAdjointSquare.comp_vhcomp
+ leftAdjointSquare.hcomp
+ leftAdjointSquare.vcomp
+ leftAdjointSquareConjugate.vcomp
+ mateEquiv
+ mateEquiv_conjugateEquiv_vcomp
+ mateEquiv_counit
+ mateEquiv_counit_symm
+ mateEquiv_hcomp
+ mateEquiv_square
+ mateEquiv_vcomp
+ prodComparison_comp
+ rightAdjointConjugateSquare.vcomp
+ rightAdjointSquare.comp
+ rightAdjointSquare.comp_hvcomp
+ rightAdjointSquare.comp_vhcomp
+ rightAdjointSquare.hcomp
+ rightAdjointSquare.vcomp
+ rightAdjointSquareConjugate.vcomp
+ unit_conjugateEquiv
+ unit_conjugateEquiv_symm
+ unit_mateEquiv
+ unit_mateEquiv_symm
- transferNatTransSelf_adjunction_id
- transferNatTransSelf_adjunction_id_symm
- transferNatTransSelf_comm
- transferNatTransSelf_comp
- transferNatTransSelf_counit
- transferNatTransSelf_id
- transferNatTransSelf_iso
- transferNatTransSelf_of_iso
- transferNatTransSelf_symm_comm
- transferNatTransSelf_symm_comp
- transferNatTransSelf_symm_id
- transferNatTransSelf_symm_iso
- transferNatTransSelf_symm_of_iso
- transferNatTrans_counit
- unit_transferNatTrans
- unit_transferNatTransSelf
You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>
## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>
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.
Thanks for this PR! Your definition certainly looks more readable, and you've proved it's equal to the old one so I'm convinced it's a good change.
Make sure to follow the lint style suggestions (more guidelines are here: https://leanprover-community.github.io/contribute/style.html).
If no-one beats me to it, I'll try to review your actual proofs in more detail soon. I think in most cases it's probably easiest to do ext
and pass to components, although I agree it's not ideal.
One thing that may help you is the reassoc_of% command, which can make rewriting an equality of morphisms inside a long chain quite a bit easier - it essentially lets you ignore associativity.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bhavik Mehta <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This is now ready for review (as far as I can tell). |
Note there is one (non-trivial) new definition in the latest version: This was included to use in applications such as the following:
Here
For testing you could replace it with |
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 just made a small suggestion about slice
syntax
Co-authored-by: Dagur Tómas Ásgeirsson <[email protected]>
@jcommelin after our discussion today I realized I need to add deprecated alias tags. Should this be done for all the renamed theorems or just for the renamed definitions? |
@emilyriehl Concerning "deprecated": We don't have any strict rules yet. It's good practice to add these, because it will help projects that depend on mathlib when they migrate to a newer version. But if we estimate that these declarations aren't really used outside mathlib, then we might skip the process. |
@jcommelin just added for the two key definitions. We're already using this version of mates in poly so that's all set. |
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.
Thanks 🎉
bors merge
The mates bijection between natural transformations inhabiting a certain dual pairs of squares (the duality in the sense of a parallel pair of adjunctions) can be defined in a more direct way: using pasting composition on 2-cells. This pull request: (i) proposes a new definition of `Mates` to replace and rename the existing `transferNatTrans` (ii) proposes a new definition of `Conjugates` to replace and rename the existing `transferNatTransSelf` (iii) proves that the mates correspondence commutes with horizontal and vertical composition of squares, as well as some coherences relating mates to conjugates (iv) updates the files that depends on this, involving two new proofs about exponentiation in cartesian closed categories
Build failed: |
bors r+ |
The mates bijection between natural transformations inhabiting a certain dual pairs of squares (the duality in the sense of a parallel pair of adjunctions) can be defined in a more direct way: using pasting composition on 2-cells. This pull request: (i) proposes a new definition of `Mates` to replace and rename the existing `transferNatTrans` (ii) proposes a new definition of `Conjugates` to replace and rename the existing `transferNatTransSelf` (iii) proves that the mates correspondence commutes with horizontal and vertical composition of squares, as well as some coherences relating mates to conjugates (iv) updates the files that depends on this, involving two new proofs about exponentiation in cartesian closed categories
Build failed (retrying...): |
The mates bijection between natural transformations inhabiting a certain dual pairs of squares (the duality in the sense of a parallel pair of adjunctions) can be defined in a more direct way: using pasting composition on 2-cells. This pull request: (i) proposes a new definition of `Mates` to replace and rename the existing `transferNatTrans` (ii) proposes a new definition of `Conjugates` to replace and rename the existing `transferNatTransSelf` (iii) proves that the mates correspondence commutes with horizontal and vertical composition of squares, as well as some coherences relating mates to conjugates (iv) updates the files that depends on this, involving two new proofs about exponentiation in cartesian closed categories
Pull request successfully merged into master. Build succeeded: |
The mates bijection between natural transformations inhabiting a certain dual pairs of squares (the duality in the sense of a parallel pair of adjunctions) can be defined in a more direct way: using pasting composition on 2-cells.
This pull request:
(i) proposes a new definition of
Mates
to replace and rename the existingtransferNatTrans
(ii) proposes a new definition of
Conjugates
to replace and rename the existingtransferNatTransSelf
(iii) proves that the mates correspondence commutes with horizontal and vertical composition of squares, as well as some coherences relating mates to conjugates
(iv) updates the files that depends on this, involving two new proofs about exponentiation in cartesian closed categories
I have now refactored the rest of the library, so this pull request is ready for review.
I'd appreciate feedback on two aspects of the longer coherence proofs:
(i) Can this be done without calling "ext"? I originally tried to prove this using theorems about pasting composite of natural transformations but got stuck because I couldn't rewrite along equalities of functors of the form
1 >>> F = F
. It's somewhat unaesthetic, though, to prove this by passing to components.(ii) The long proofs involve lots of
slice_rhs
calls. This feels fairly readable to me, but I'm curious if there is a better way.