-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathBasic.lean
More file actions
63 lines (45 loc) · 2.36 KB
/
Basic.lean
File metadata and controls
63 lines (45 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/-
Copyright (c) 2018 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Reid Barton, Bhavik Mehta
-/
module
public import Mathlib.CategoryTheory.Limits.Connected
public import Mathlib.CategoryTheory.Limits.Constructions.Over.Products
public import Mathlib.CategoryTheory.Limits.Constructions.Over.Connected
public import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers
public import Mathlib.CategoryTheory.Limits.Constructions.Equalizers
/-!
# Limits in the over category
Declare instances for limits in the over category: If `C` has finite wide pullbacks, `Over B` has
finite limits, and if `C` has arbitrary wide pullbacks then `Over B` has limits.
-/
@[expose] public section
universe w v u
-- morphism levels before object levels. See note [category_theory universes].
open CategoryTheory CategoryTheory.Limits
variable {C : Type u} [Category.{v} C]
variable {X : C}
namespace CategoryTheory.Over
/-- Make sure we can derive pullbacks in `Over B`. -/
instance {B : C} [HasPullbacks C] : HasPullbacks (Over B) := inferInstance
/-- Make sure we can derive equalizers in `Over B`. -/
instance {B : C} [HasEqualizers C] : HasEqualizers (Over B) := inferInstance
instance hasFiniteLimits {B : C} [HasFiniteWidePullbacks C] : HasFiniteLimits (Over B) := by
have := ConstructProducts.over_finiteProducts_of_finiteWidePullbacks (B := B)
have := hasEqualizers_of_hasPullbacks_and_binary_products (C := Over B)
apply hasFiniteLimits_of_hasEqualizers_and_finite_products
instance hasLimits {B : C} [HasWidePullbacks.{w} C] : HasLimitsOfSize.{w, w} (Over B) := by
have := ConstructProducts.over_binaryProduct_of_pullback (B := B)
have := hasEqualizers_of_hasPullbacks_and_binary_products (C := Over B)
have := ConstructProducts.over_products_of_widePullbacks (B := B)
apply has_limits_of_hasEqualizers_and_products
end Over
namespace Under
instance {B : C} [HasFiniteWidePushouts C] : HasFiniteColimits (Under B) := by
rw [← hasFiniteLimits_opposite_iff]
exact hasFiniteLimits_of_hasLimitsLimits_of_createsFiniteLimits (Over.opEquivOpUnder _).inverse
instance {B : C} [HasWidePushouts.{w} C] : HasColimitsOfSize.{w, w} (Under B) := by
rw [← hasLimitsOfSize_opposite_iff]
exact hasLimits_of_hasLimits_createsLimits (Over.opEquivOpUnder _).inverse
end CategoryTheory.Under