-
Notifications
You must be signed in to change notification settings - Fork 839
feat: The Preliminaries for Locally Cartesian Closed Categories #30366
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
base: master
Are you sure you want to change the base?
Conversation
PR summary 5da820350aImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
…ndex, pull-push) (Sigma=push, Reindex=pull, pull-push = cartesian product)
Just a few quick remarks for now:
|
What about making a new file in the new folder LocallyCartesianClosed named "Prelim.lean"? Otherwise, please suggest a location for this. The effect on
@Jlh18 , Is this close to being merged? Seems this is weaker assumption for a couple of theorems in lccc prelim.
We already have cartesian monoidal category structure on slice categories thanks to Andrew's work – incidentally one reason the LCCC work got merge conflict back in February, and had to wait for that work to be done. But, it is nicer to do it that way. I am using this monoidal structure. If I don't misread what you say, then Also, on the semantics side, I think with |
Well, your additions may have changed the import graph of other files, which may be the reason for the breakage in Galois categories. Putting the new code in a separate file should solve this issue...
I have no idea how what you say answer my suggestion. In your code, it seems that there is data for the right adjoints of the pullback functors on the (Ah, actually, it seems you do not include data for the pushforwards. As a structure on a category, it would make sense to have data for these functors.) |
It seems I was confused about your comment. I thought it is concerning the file Comma.Over.Pullback, but it seems you are actually commenting on #30375 PR and not this PR, correct? |
This pull request has conflicts, please merge |
(isBinaryProductSigmaReindex Y Z) (Limits.prodIsProd Y Z) ⟨.left⟩ | ||
|
||
lemma sigmaReindexIsoProd_hom_comp_snd {Y Z : Over X} : | ||
(sigmaReindexIsoProd Y Z).hom ≫ (snd Y Z) = (μ_ Y Z) := |
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.
Could you remove unnecessary parentheses in the whole file? (And add simp/reassoc
attributes to lemmas when applicable.)
· intro Z | ||
simp only [const_obj_obj, Functor.id_obj, comp_obj, Over.pullback] | ||
exact sigmaReindexIsoProd Y Z |
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.
We should not create data using tactics.
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.
seems the culprit was fapply
at the beginning of the construction of iso. it is now addressed in the last commit.
|
||
/-- The slice category over the terminal object is equivalent to the original category. -/ | ||
def equivOverTerminal [HasTerminal C] : Over (⊤_ C) ≌ C := | ||
CategoryTheory.Equivalence.mk (Over.forget _) (Functor.toOverTerminal C) |
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.
Could you not use Equivalence.mk
which does not have good definitional properties?
map {X Y} f := Over.homMk f | ||
|
||
/-- The slice category over the terminal object is equivalent to the original category. -/ | ||
def equivOverTerminal [HasTerminal C] : Over (⊤_ C) ≌ C := |
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 equivalence should be defined more generally for any object satisfying IsTerminal
.
/-- A right adjoint to the forward functor of an equivalence is naturally isomorphic to the | ||
inverse functor of the equivalence. -/ | ||
def equivalenceRightAdjointIsoInverse (e : D ≌ C) (R : C ⥤ D) (adj : e.functor ⊣ R) : | ||
R ≅ e.inverse := | ||
conjugateIsoEquiv adj (e.toAdjunction) (Iso.refl _) |
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 should be removed. (It seems it is a particular case of Adjunction.rightAdjointUniq
.)
abbrev Sigma {X : C} (Y : Over X) (U : Over Y.left) : Over X := | ||
(map Y.hom).obj U | ||
|
||
namespace Sigma |
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.
There should not be a capital initial.
map {X Y} f := Over.homMk f | ||
|
||
/-- The slice category over the terminal object is equivalent to the original category. -/ | ||
def equivOverTerminal (X : C) (h : IsTerminal X) : Over (X) ≌ C where |
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.
Could you move this to the IsTerminal
namespace? Also, the inverse
functor could probably be "inlined" in the definition of the equivalence. Could you also add the simps
attribute?
After looking at this PR more closely, I am feeling a little bit skeptical as most of the definitions only duplicates what we already have ( class Over.ChosenPullback {Y X : C} (f : Y ⟶ X) where
pullback : Over X ⥤ Over Y
mapPullbackAdj : Over.map f ⊣ pullback |
In the PR (#30375) about the basics of lcccs I have defined that a morphism
In an earlier version I had the following
which has a field providing the data of the adjunction rather than merely its existence. I think this is more compatible with the
which uses Choice. I think having data instead of property can be useful in this regard, that is it makes the theory computable. However, sometimes it is useful to prove a morphism is exponentiable simply by showing that the right adjoint exists rather than constructing the right adjoint, e.g. using AFT or SAFT or something like that. But, I guess in those particular cases we can use Choice to get the right adjoint from existence. I am fine with redeveloping The current file proves the following results which did not exist in mathlib. These are important for supporting the rest of theory LCCCs that we have built:
As for the notations, yes, of course we can write Here's a proposal:
Do we want to transfer instances of |
@joelriou In particular if you have |
|
The process would be easier if each PR was short and with a specific scope.
Yes, but we may also be interested in the functoriality of
They should basically be no automatic instances of |
Sounds good, I'll try to implement these in the next commit. Hopefully the file will become much shorter. |
See #21525
This PR defines the basic preliminaries for defining locally cartesian closed categories (LCCCs):
Over.Sigma
,Over.Reindex
are short-hands for object part of the action ofOver.map
andOver.pullback
. These are useful for developing consistent notations for locally cartesian closed categories (lcccs). The basic API ofOver.Sigma
(push) andOver.Reindex
(pull) is developed and we prove that pull-push is isomorphic to the cartesian binary product in the slices. In fact, we prove the stronger statement, namely that the pull-push composition(Over.pullback Y.hom) ⋙ (Over.map Y.hom)
is naturally isomorphic to the left tensor product functorY × _
inOver X
. This is going to be crucial in our mate-based approach to lcccs.Also, using the calculus of mates we define certain natural isomorphisms involving
Over.star
andOver.pullback
which will be used in defining the right adjoint to the pullback functor in the development of LCCCs.