-
Notifications
You must be signed in to change notification settings - Fork 251
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
refactor: generalize universes for colimits and limits in Type #7020
Conversation
How does this PR mesh with the planned refactor to use |
Ideally, under |
|
Sorry, I meant to close my own PR 😅 |
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 like the generalizations made in this PR, but there are now merge conflicts. Also, I think many UnivLE.{v,u}
can be replaced by Small.{u} J
, and UnivLE
is only really needed in HasLimits
/HasLimitsOfSize
instances, and Small
is enough for HasLimitsOfShape
. Do you think this is a good idea, and would you mind doing it?
--porting note: @[simp] was removed because the linter said it was useless | ||
theorem Colimit.ι_map_apply {F G : J ⥤ TypeMax.{v, u}} (α : F ⟶ G) (j : J) (x : F.obj j) : | ||
colim.{v, v}.map α (colimit.ι F j x) = colimit.ι G j (α.app j x) := | ||
congr_fun (colimit.ι_map α j) x | ||
#align category_theory.limits.types.colimit.ι_map_apply CategoryTheory.Limits.Types.Colimit.ι_map_apply | ||
|
||
@[simp] | ||
theorem Colimit.w_apply' {F : J ⥤ Type v} {j j' : J} {x : F.obj j} (f : j ⟶ j') : | ||
colimit.ι F j' (F.map f x) = colimit.ι F j x := | ||
congr_fun (colimit.w F f) x | ||
#align category_theory.limits.types.colimit.w_apply' CategoryTheory.Limits.Types.Colimit.w_apply' | ||
|
||
@[simp] | ||
theorem Colimit.ι_desc_apply' (F : J ⥤ Type v) (s : Cocone F) (j : J) (x : F.obj j) : | ||
colimit.desc F s (colimit.ι F j x) = s.ι.app j x := | ||
congr_fun (colimit.ι_desc s j) x | ||
#align category_theory.limits.types.colimit.ι_desc_apply' CategoryTheory.Limits.Types.Colimit.ι_desc_apply' |
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.
Should we change these to #noalign
s, or we don't care?
variable [HasColimitsOfShape J TopCat.{v}] | ||
variable [UnivLE.{u', v}] |
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.
Why this change? I think it's now less general?
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
I am closing this as @alreadydone may have found a better approach. |
Rescuing and porting my [old proof](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/tensor.20products.20commute.20with.20direct.20limits/near/275178330) now that @dagurtomas created a file for it. Also includes some universe generalizations in the file Limits/Types which overlap with @joelriou's #7020. Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
This is a smaller version of #7020. Before this PR, for limits, we gave instances for small indexing categories, but for colimits, we gave instances for `TypeMax`. This PR changes so that we give instances for small indexing categories in both cases. This is more general and also more uniform. Co-authored-by: Joël Riou <rioujoel@gmail.com>
In the category
Type u
and other concrete categories, there are limits and colimits indexed by categoriesJ : Type v
when[UnivLE.{v, u}]
. As the universe for morphisms inJ
is irrelevant, there is no longer any assumption thatJ
is a small category.The definition of the standard colimit cocone in
Type u
now usesShrink
(seeCategoryTheory.Limits.Types
), which broke some constructions of colimits which relied a little too much on the definitional properties of this cocone. While fixing these constructions, some proofs have been cleaned up. Assumptions on universes have been generalized when appropriate.The same should be done for the standard limit cone, but I would rather attempt at this in a separate PR...