Skip to content
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

feat(category_theory/limits): equivalences create limits #1175

Merged
merged 14 commits into from Jul 5, 2019

Conversation

semorrison
Copy link
Collaborator

@semorrison semorrison commented Jul 3, 2019

We provide

instance has_limit_comp_equivalence {D : Type u'} [category.{v+1} D]
  (E : C ⥤ D) [is_equivalence E] [has_limit F] : has_limit (F ⋙ E) := ...

def has_limit_of_comp_equivalence {D : Type u'} [category.{v+1} D] 
  (E : C ⥤ D) [is_equivalence E] [has_limit (F ⋙ E)] : has_limit F := ...

@semorrison semorrison requested a review from a team as a code owner July 3, 2019 14:33
@jcommelin
Copy link
Member

@semorrison Can't you use https://github.com/leanprover-community/mathlib/blob/master/src/category_theory/adjunction/limits.lean#L90

def right_adjoint_preserves_limits : preserves_limits G :=

After all, the equivalences in mathlib are now adjoint equivalences.

@semorrison
Copy link
Collaborator Author

semorrison commented Jul 4, 2019 via email

@semorrison
Copy link
Collaborator Author

Okay, I've switched to using right_adjoint_preserves_limits. Thanks for pointing this out!

Unfortunately the implicit arguments in the preserves_limit* API make it very hard to use, witness https://github.com/leanprover-community/mathlib/pull/1175/files#diff-171c7c8eaccb86dd820fc704b9e1e6e3R120. I think my preference is to fix this in a separate PR.

@jcommelin
Copy link
Member

There is now a whole bunch of files where the only changes have to do with set.mem_preimage. Is this related to a recent PR of Patrick, and did some wires get crossed? Or is this intentional?

@semorrison
Copy link
Collaborator Author

semorrison commented Jul 4, 2019 via email

@semorrison
Copy link
Collaborator Author

Sorted. Don't know what happened, but git checkout master src/topology/ solved the problem.

@semorrison
Copy link
Collaborator Author

I'm happy with this PR as is now. The proof

def is_limit_map_cone (E : D ⥤ C) [is_equivalence E]
  (c : cone K) (h : is_limit c) : is_limit (E.map_cone c) :=
begin
  have P : preserves_limits E := adjunction.right_adjoint_preserves_limits E.inv.adjunction,
  have P' := P.preserves_limits_of_shape,
  have P'' := P'.preserves_limit,
  have P''' := P''.preserves,
  exact P''' h,
end

is awful, but that's because of design problems in the preserves_limits.lean API. I think I can address those, but I'd prefer to do so in a separate commit.

@jcommelin
Copy link
Member

@semorrison Shouldn't we also have the dual is_colimit_map_cocone etc...?

@semorrison
Copy link
Collaborator Author

Yes, eventually. :-) I have another PR lined up that does monadic adjunctions, and proves monadic functors, including reflective inclusions, create limits. So for that I only need this half. I'm about to go on holiday so may not get to the other half of this immediately, even though it should just be copy-paste.

@jcommelin jcommelin added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Jul 5, 2019
@semorrison
Copy link
Collaborator Author

I added the corresponding definitions for colimits.

@mergify mergify bot merged commit 05550ea into master Jul 5, 2019
@mergify mergify bot deleted the has_limit_comp_equivalence branch July 5, 2019 15:45
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…community#1175)

* feat(category_theory/limits): equivalences create limits

* equivalence lemma

* add @[simp]

* use right_adjoint_preserves_limits

* undo weird changes in topology files

* formatting

* do colimits too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants