category_theory.extensive
⟷
Mathlib.CategoryTheory.Limits.VanKampen
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -605,8 +605,8 @@ theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExten
#print CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism /-
theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F]
- [PreservesColimitsOfShape (Discrete WalkingPair) F] [ReflectsIsomorphisms F] :
- FinitaryExtensive C :=
+ [PreservesColimitsOfShape (Discrete WalkingPair) F]
+ [CategoryTheory.Functor.ReflectsIsomorphisms F] : FinitaryExtensive C :=
by
haveI : reflects_limits_of_shape walking_cospan F :=
reflects_limits_of_shape_of_reflects_isomorphisms
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -6,7 +6,7 @@ Authors: Andrew Yang
import CategoryTheory.Limits.Shapes.CommSq
import CategoryTheory.Limits.Shapes.StrictInitial
import CategoryTheory.Limits.Shapes.Types
-import Topology.Category.Top.Limits.Pullbacks
+import Topology.Category.TopCat.Limits.Pullbacks
import CategoryTheory.Limits.FunctorCategory
#align_import category_theory.extensive from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -193,7 +193,7 @@ theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
let X' := F'.obj ⟨walking_pair.left⟩; let Y' := F'.obj ⟨walking_pair.right⟩
have : F' = pair X' Y' := by apply functor.hext; · rintro ⟨⟨⟩⟩ <;> rfl;
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simpa
- clear_value X' Y'; subst this; change binary_cofan X' Y' at c'
+ clear_value X' Y'; subst this; change binary_cofan X' Y' at c'
rw [H c' _ _ _ (nat_trans.congr_app hα ⟨walking_pair.left⟩)
(nat_trans.congr_app hα ⟨walking_pair.right⟩)]
constructor; · rintro H ⟨⟨⟩⟩; exacts [H.1, H.2]; · intro H; exact ⟨H _, H _⟩
@@ -365,9 +365,9 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
exact
⟨l, (funext hl).symm, types.is_terminal_punit.hom_ext _ _, fun l' h₁ h₂ =>
@@ -377,10 +377,10 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm
· simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
exact
⟨l, (funext hl).symm, types.is_terminal_punit.hom_ext _ _, fun l' h₁ h₂ =>
@@ -486,11 +486,11 @@ instance : FinitaryExtensive TopCat.{u} :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαY val : _).symm
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
refine'
⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, Top.is_terminal_punit.hom_ext _ _,
@@ -503,12 +503,12 @@ instance : FinitaryExtensive TopCat.{u} :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαX val : _).symm
· simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
refine'
⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, Top.is_terminal_punit.hom_ext _ _,
mathlib commit https://github.com/leanprover-community/mathlib/commit/3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe
@@ -321,14 +321,14 @@ theorem hasStrictInitial_of_isUniversal [HasInitial C]
#align category_theory.has_strict_initial_of_is_universal CategoryTheory.hasStrictInitial_of_isUniversal
-/
-#print CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive /-
-instance (priority := 100) hasStrictInitialObjects_of_finitaryExtensive [FinitaryExtensive C] :
+#print CategoryTheory.hasStrictInitialObjects_of_finitaryPreExtensive /-
+instance (priority := 100) hasStrictInitialObjects_of_finitaryPreExtensive [FinitaryExtensive C] :
HasStrictInitialObjects C :=
hasStrictInitial_of_isUniversal
(FinitaryExtensive.vanKampen _
((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr
(by dsimp; infer_instance)).some).isUniversal
-#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive
+#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryPreExtensive
-/
#print CategoryTheory.finitaryExtensive_iff_of_isTerminal /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe
@@ -548,9 +548,9 @@ theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKamp
#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
-/
-#print CategoryTheory.IsVanKampenColimit.of_map /-
-theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
- [PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
+#print CategoryTheory.IsVanKampenColimit.of_mapCocone /-
+theorem IsVanKampenColimit.of_mapCocone {D : Type _} [Category D] (G : C ⥤ D) {F : J ⥤ C}
+ {c : Cocone F} [PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
[PreservesColimitsOfShape J G] [ReflectsColimitsOfShape J G]
(H : IsVanKampenColimit (G.mapCocone c)) : IsVanKampenColimit c :=
by
@@ -563,7 +563,7 @@ theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J
(forall_congr' fun j => _)
· exact ⟨fun h => ⟨is_colimit_of_preserves G h.some⟩, fun h => ⟨is_colimit_of_reflects G h.some⟩⟩
· exact is_pullback.map_iff G (nat_trans.congr_app h.symm j)
-#align category_theory.is_van_kampen_colimit.of_map CategoryTheory.IsVanKampenColimit.of_map
+#align category_theory.is_van_kampen_colimit.of_map CategoryTheory.IsVanKampenColimit.of_mapCocone
-/
#print CategoryTheory.isVanKampenColimit_of_evaluation /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
-import Mathbin.CategoryTheory.Limits.Shapes.CommSq
-import Mathbin.CategoryTheory.Limits.Shapes.StrictInitial
-import Mathbin.CategoryTheory.Limits.Shapes.Types
-import Mathbin.Topology.Category.Top.Limits.Pullbacks
-import Mathbin.CategoryTheory.Limits.FunctorCategory
+import CategoryTheory.Limits.Shapes.CommSq
+import CategoryTheory.Limits.Shapes.StrictInitial
+import CategoryTheory.Limits.Shapes.Types
+import Topology.Category.Top.Limits.Pullbacks
+import CategoryTheory.Limits.FunctorCategory
#align_import category_theory.extensive from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module category_theory.extensive
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Limits.Shapes.CommSq
import Mathbin.CategoryTheory.Limits.Shapes.StrictInitial
@@ -14,6 +9,8 @@ import Mathbin.CategoryTheory.Limits.Shapes.Types
import Mathbin.Topology.Category.Top.Limits.Pullbacks
import Mathbin.CategoryTheory.Limits.FunctorCategory
+#align_import category_theory.extensive from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
/-!
# Extensive categories
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -181,6 +181,7 @@ theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F')
#align category_theory.map_pair_equifibered CategoryTheory.mapPair_equifibered
-/
+#print CategoryTheory.BinaryCofan.isVanKampen_iff /-
theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
IsVanKampenColimit c ↔
∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt)
@@ -200,7 +201,9 @@ theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
(nat_trans.congr_app hα ⟨walking_pair.right⟩)]
constructor; · rintro H ⟨⟨⟩⟩; exacts [H.1, H.2]; · intro H; exact ⟨H _, H _⟩
#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.isVanKampen_iff
+-/
+#print CategoryTheory.BinaryCofan.isVanKampen_mk /-
theorem BinaryCofan.isVanKampen_mk {X Y : C} (c : BinaryCofan X Y)
(cofans : ∀ X Y : C, BinaryCofan X Y) (colimits : ∀ X Y, IsColimit (cofans X Y))
(cones : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), PullbackCone f g)
@@ -239,7 +242,9 @@ theorem BinaryCofan.isVanKampen_mk {X Y : C} (c : BinaryCofan X Y)
apply binary_cofan.is_colimit_comp_left_iso (binary_cofan.mk _ _)
exact h₂ f
#align category_theory.binary_cofan.is_van_kampen_mk CategoryTheory.BinaryCofan.isVanKampen_mk
+-/
+#print CategoryTheory.BinaryCofan.mono_inr_of_isVanKampen /-
theorem BinaryCofan.mono_inr_of_isVanKampen [HasInitial C] {X Y : C} {c : BinaryCofan X Y}
(h : IsVanKampenColimit c) : Mono c.inr :=
by
@@ -254,16 +259,21 @@ theorem BinaryCofan.mono_inr_of_isVanKampen [HasInitial C] {X Y : C} {c : Binary
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
(by dsimp; infer_instance)).some
#align category_theory.binary_cofan.mono_inr_of_is_van_kampen CategoryTheory.BinaryCofan.mono_inr_of_isVanKampen
+-/
+#print CategoryTheory.FinitaryExtensive.mono_inr_of_isColimit /-
theorem FinitaryExtensive.mono_inr_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
(hc : IsColimit c) : Mono c.inr :=
BinaryCofan.mono_inr_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.mono_inr_of_is_colimit CategoryTheory.FinitaryExtensive.mono_inr_of_isColimit
+-/
+#print CategoryTheory.FinitaryExtensive.mono_inl_of_isColimit /-
theorem FinitaryExtensive.mono_inl_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
(hc : IsColimit c) : Mono c.inl :=
FinitaryExtensive.mono_inr_of_isColimit (BinaryCofan.isColimitFlip hc)
#align category_theory.finitary_extensive.mono_inl_of_is_colimit CategoryTheory.FinitaryExtensive.mono_inl_of_isColimit
+-/
instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inl : X ⟶ X ⨿ Y) :=
(FinitaryExtensive.mono_inl_of_isColimit (coprodIsCoprod X Y) : _)
@@ -271,6 +281,7 @@ instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inl : X ⟶ X ⨿ Y) :=
instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inr : Y ⟶ X ⨿ Y) :=
(FinitaryExtensive.mono_inr_of_isColimit (coprodIsCoprod X Y) : _)
+#print CategoryTheory.BinaryCofan.isPullback_initial_to_of_isVanKampen /-
theorem BinaryCofan.isPullback_initial_to_of_isVanKampen [HasInitial C] {c : BinaryCofan X Y}
(h : IsVanKampenColimit c) : IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
by
@@ -284,12 +295,15 @@ theorem BinaryCofan.isPullback_initial_to_of_isVanKampen [HasInitial C] {c : Bin
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
(by dsimp; infer_instance)).some
#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_isVanKampen
+-/
+#print CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan /-
theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C]
{c : BinaryCofan X Y} (hc : IsColimit c) :
IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
BinaryCofan.isPullback_initial_to_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan
+-/
#print CategoryTheory.hasStrictInitial_of_isUniversal /-
theorem hasStrictInitial_of_isUniversal [HasInitial C]
@@ -398,6 +412,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
section TopCat
+#print CategoryTheory.finitaryExtensiveTopCatAux /-
/-- (Implementation) An auxiliary lemma for the proof that `Top` is finitary extensive. -/
def finitaryExtensiveTopCatAux (Z : TopCat.{u})
(f : Z ⟶ TopCat.of (Sum PUnit.{u + 1} PUnit.{u + 1})) :
@@ -457,6 +472,7 @@ def finitaryExtensiveTopCatAux (Z : TopCat.{u})
· intro s m e₁ e₂; ext x; change m x = dite _ _ _
split_ifs; · rw [← e₁]; rfl; · rw [← e₂]; rfl
#align category_theory.finitary_extensive_Top_aux CategoryTheory.finitaryExtensiveTopCatAux
+-/
instance : FinitaryExtensive TopCat.{u} :=
by
@@ -535,6 +551,7 @@ theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKamp
#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
-/
+#print CategoryTheory.IsVanKampenColimit.of_map /-
theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
[PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
[PreservesColimitsOfShape J G] [ReflectsColimitsOfShape J G]
@@ -550,7 +567,9 @@ theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J
· exact ⟨fun h => ⟨is_colimit_of_preserves G h.some⟩, fun h => ⟨is_colimit_of_reflects G h.some⟩⟩
· exact is_pullback.map_iff G (nat_trans.congr_app h.symm j)
#align category_theory.is_van_kampen_colimit.of_map CategoryTheory.IsVanKampenColimit.of_map
+-/
+#print CategoryTheory.isVanKampenColimit_of_evaluation /-
theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J D] (F : J ⥤ C ⥤ D)
(c : Cocone F) (hc : ∀ x : C, IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)) :
IsVanKampenColimit c := by
@@ -569,6 +588,7 @@ theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J
⟨evaluation_jointly_reflects_colimits _ fun x =>
((this x).mpr fun j => (H j).map ((evaluation C D).obj x)).some⟩
#align category_theory.is_van_kampen_colimit_of_evaluation CategoryTheory.isVanKampenColimit_of_evaluation
+-/
instance [HasPullbacks C] [FinitaryExtensive C] : FinitaryExtensive (D ⥤ C) :=
haveI : has_finite_coproducts (D ⥤ C) := ⟨fun n => limits.functor_category_has_colimits_of_shape⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module category_theory.extensive
-! leanprover-community/mathlib commit 178a32653e369dce2da68dc6b2694e385d484ef1
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -18,6 +18,9 @@ import Mathbin.CategoryTheory.Limits.FunctorCategory
# Extensive categories
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
## Main definitions
- `category_theory.is_van_kampen_colimit`: A (colimit) cocone over a diagram `F : J ⥤ C` is van
Kampen if for every cocone `c'` over the pullback of the diagram `F' : J ⥤ C'`,
@@ -56,6 +59,7 @@ universe v' u' v u
variable {J : Type v'} [Category.{u'} J] {C : Type u} [Category.{v} C]
+#print CategoryTheory.NatTrans.Equifibered /-
/-- A natural transformation is equifibered if every commutative square of the following form is
a pullback.
```
@@ -67,22 +71,30 @@ G(X) → G(Y)
def NatTrans.Equifibered {F G : J ⥤ C} (α : F ⟶ G) : Prop :=
∀ ⦃i j : J⦄ (f : i ⟶ j), IsPullback (F.map f) (α.app i) (α.app j) (G.map f)
#align category_theory.nat_trans.equifibered CategoryTheory.NatTrans.Equifibered
+-/
+#print CategoryTheory.NatTrans.equifibered_of_isIso /-
theorem NatTrans.equifibered_of_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α] : α.Equifibered :=
fun _ _ f => IsPullback.of_vert_isIso ⟨NatTrans.naturality _ f⟩
#align category_theory.nat_trans.equifibered_of_is_iso CategoryTheory.NatTrans.equifibered_of_isIso
+-/
+#print CategoryTheory.NatTrans.Equifibered.comp /-
theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H} (hα : α.Equifibered)
(hβ : β.Equifibered) : (α ≫ β).Equifibered := fun i j f => (hα f).paste_vert (hβ f)
#align category_theory.nat_trans.equifibered.comp CategoryTheory.NatTrans.Equifibered.comp
+-/
+#print CategoryTheory.IsUniversalColimit /-
/-- A (colimit) cocone over a diagram `F : J ⥤ C` is universal if it is stable under pullbacks. -/
def IsUniversalColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.pt ⟶ c.pt)
(h : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (hα : α.Equifibered),
(∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)) → Nonempty (IsColimit c')
#align category_theory.is_universal_colimit CategoryTheory.IsUniversalColimit
+-/
+#print CategoryTheory.IsVanKampenColimit /-
/-- A (colimit) cocone over a diagram `F : J ⥤ C` is van Kampen if for every cocone `c'` over the
pullback of the diagram `F' : J ⥤ C'`, `c'` is colimiting iff `c'` is the pullback of `c`.
@@ -94,11 +106,15 @@ def IsVanKampenColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
(h : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (hα : α.Equifibered),
Nonempty (IsColimit c') ↔ ∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)
#align category_theory.is_van_kampen_colimit CategoryTheory.IsVanKampenColimit
+-/
-theorem IsVanKampenColimit.is_universal {F : J ⥤ C} {c : Cocone F} (H : IsVanKampenColimit c) :
+#print CategoryTheory.IsVanKampenColimit.isUniversal /-
+theorem IsVanKampenColimit.isUniversal {F : J ⥤ C} {c : Cocone F} (H : IsVanKampenColimit c) :
IsUniversalColimit c := fun _ c' α f h hα => (H c' α f h hα).mpr
-#align category_theory.is_van_kampen_colimit.is_universal CategoryTheory.IsVanKampenColimit.is_universal
+#align category_theory.is_van_kampen_colimit.is_universal CategoryTheory.IsVanKampenColimit.isUniversal
+-/
+#print CategoryTheory.IsVanKampenColimit.isColimit /-
/-- A van Kampen colimit is a colimit. -/
noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
(h : IsVanKampenColimit c) : IsColimit c :=
@@ -110,7 +126,9 @@ noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
haveI : is_iso (𝟙 c.X) := inferInstance
exact is_pullback.of_vert_is_iso ⟨by erw [nat_trans.id_app, category.comp_id, category.id_comp]⟩
#align category_theory.is_van_kampen_colimit.is_colimit CategoryTheory.IsVanKampenColimit.isColimit
+-/
+#print CategoryTheory.IsInitial.isVanKampenColimit /-
theorem IsInitial.isVanKampenColimit [HasStrictInitialObjects C] {X : C} (h : IsInitial X) :
IsVanKampenColimit (asEmptyCocone X) :=
by
@@ -122,11 +140,13 @@ theorem IsInitial.isVanKampenColimit [HasStrictInitialObjects C] {X : C} (h : Is
⟨by rintro _ ⟨⟨⟩⟩, fun _ =>
⟨is_colimit.of_iso_colimit h (cocones.ext (as_iso f).symm <| by rintro ⟨⟨⟩⟩)⟩⟩
#align category_theory.is_initial.is_van_kampen_colimit CategoryTheory.IsInitial.isVanKampenColimit
+-/
section Extensive
variable {X Y : C}
+#print CategoryTheory.FinitaryExtensive /-
/-- A category is (finitary) extensive if it has finite coproducts,
and binary coproducts are van Kampen.
@@ -135,10 +155,12 @@ class FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where
[HasFiniteCoproducts : HasFiniteCoproducts C]
van_kampen' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c
#align category_theory.finitary_extensive CategoryTheory.FinitaryExtensive
+-/
attribute [instance] finitary_extensive.has_finite_coproducts
-theorem FinitaryExtensive.van_kampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
+#print CategoryTheory.FinitaryExtensive.vanKampen /-
+theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c :=
by
let X := F.obj ⟨walking_pair.left⟩; let Y := F.obj ⟨walking_pair.right⟩
@@ -146,17 +168,20 @@ theorem FinitaryExtensive.van_kampen [FinitaryExtensive C] {F : Discrete Walking
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simpa
clear_value X Y; subst this
exact finitary_extensive.van_kampen' c hc
-#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.van_kampen
+#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.vanKampen
+-/
-theorem map_pair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') : α.Equifibered :=
+#print CategoryTheory.mapPair_equifibered /-
+theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') : α.Equifibered :=
by
rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
all_goals
dsimp; simp only [discrete.functor_map_id]
exact is_pullback.of_horiz_is_iso ⟨by simp only [category.comp_id, category.id_comp]⟩
-#align category_theory.map_pair_equifibered CategoryTheory.map_pair_equifibered
+#align category_theory.map_pair_equifibered CategoryTheory.mapPair_equifibered
+-/
-theorem BinaryCofan.is_van_kampen_iff (c : BinaryCofan X Y) :
+theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
IsVanKampenColimit c ↔
∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt)
(hαX : αX ≫ c.inl = c'.inl ≫ f) (hαY : αY ≫ c.inr = c'.inr ≫ f),
@@ -174,9 +199,9 @@ theorem BinaryCofan.is_van_kampen_iff (c : BinaryCofan X Y) :
rw [H c' _ _ _ (nat_trans.congr_app hα ⟨walking_pair.left⟩)
(nat_trans.congr_app hα ⟨walking_pair.right⟩)]
constructor; · rintro H ⟨⟨⟩⟩; exacts [H.1, H.2]; · intro H; exact ⟨H _, H _⟩
-#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.is_van_kampen_iff
+#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.isVanKampen_iff
-theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
+theorem BinaryCofan.isVanKampen_mk {X Y : C} (c : BinaryCofan X Y)
(cofans : ∀ X Y : C, BinaryCofan X Y) (colimits : ∀ X Y, IsColimit (cofans X Y))
(cones : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), PullbackCone f g)
(limits : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), IsLimit (cones f g))
@@ -213,9 +238,9 @@ theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
apply binary_cofan.is_colimit_comp_right_iso (binary_cofan.mk _ _)
apply binary_cofan.is_colimit_comp_left_iso (binary_cofan.mk _ _)
exact h₂ f
-#align category_theory.binary_cofan.is_van_kampen_mk CategoryTheory.BinaryCofan.is_van_kampen_mk
+#align category_theory.binary_cofan.is_van_kampen_mk CategoryTheory.BinaryCofan.isVanKampen_mk
-theorem BinaryCofan.mono_inr_of_is_van_kampen [HasInitial C] {X Y : C} {c : BinaryCofan X Y}
+theorem BinaryCofan.mono_inr_of_isVanKampen [HasInitial C] {X Y : C} {c : BinaryCofan X Y}
(h : IsVanKampenColimit c) : Mono c.inr :=
by
refine' pullback_cone.mono_of_is_limit_mk_id_id _ (is_pullback.is_limit _)
@@ -228,11 +253,11 @@ theorem BinaryCofan.mono_inr_of_is_van_kampen [HasInitial C] {X Y : C} {c : Bina
exact
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
(by dsimp; infer_instance)).some
-#align category_theory.binary_cofan.mono_inr_of_is_van_kampen CategoryTheory.BinaryCofan.mono_inr_of_is_van_kampen
+#align category_theory.binary_cofan.mono_inr_of_is_van_kampen CategoryTheory.BinaryCofan.mono_inr_of_isVanKampen
theorem FinitaryExtensive.mono_inr_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
(hc : IsColimit c) : Mono c.inr :=
- BinaryCofan.mono_inr_of_is_van_kampen (FinitaryExtensive.van_kampen c hc)
+ BinaryCofan.mono_inr_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.mono_inr_of_is_colimit CategoryTheory.FinitaryExtensive.mono_inr_of_isColimit
theorem FinitaryExtensive.mono_inl_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
@@ -246,7 +271,7 @@ instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inl : X ⟶ X ⨿ Y) :=
instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inr : Y ⟶ X ⨿ Y) :=
(FinitaryExtensive.mono_inr_of_isColimit (coprodIsCoprod X Y) : _)
-theorem BinaryCofan.isPullback_initial_to_of_is_van_kampen [HasInitial C] {c : BinaryCofan X Y}
+theorem BinaryCofan.isPullback_initial_to_of_isVanKampen [HasInitial C] {c : BinaryCofan X Y}
(h : IsVanKampenColimit c) : IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
by
refine'
@@ -258,15 +283,16 @@ theorem BinaryCofan.isPullback_initial_to_of_is_van_kampen [HasInitial C] {c : B
exact
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
(by dsimp; infer_instance)).some
-#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_is_van_kampen
+#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_isVanKampen
theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C]
{c : BinaryCofan X Y} (hc : IsColimit c) :
IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
- BinaryCofan.isPullback_initial_to_of_is_van_kampen (FinitaryExtensive.van_kampen c hc)
+ BinaryCofan.isPullback_initial_to_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan
-theorem has_strict_initial_of_is_universal [HasInitial C]
+#print CategoryTheory.hasStrictInitial_of_isUniversal /-
+theorem hasStrictInitial_of_isUniversal [HasInitial C]
(H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))) : HasStrictInitialObjects C :=
hasStrictInitialObjects_of_initial_is_strict
(by
@@ -281,16 +307,20 @@ theorem has_strict_initial_of_is_universal [HasInitial C]
(map_pair_equifibered _) _).some
rintro ⟨⟨⟩⟩ <;> dsimp <;>
exact is_pullback.of_horiz_is_iso ⟨(category.id_comp _).trans (category.comp_id _).symm⟩)
-#align category_theory.has_strict_initial_of_is_universal CategoryTheory.has_strict_initial_of_is_universal
+#align category_theory.has_strict_initial_of_is_universal CategoryTheory.hasStrictInitial_of_isUniversal
+-/
+#print CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive /-
instance (priority := 100) hasStrictInitialObjects_of_finitaryExtensive [FinitaryExtensive C] :
HasStrictInitialObjects C :=
- has_strict_initial_of_is_universal
- (FinitaryExtensive.van_kampen _
+ hasStrictInitial_of_isUniversal
+ (FinitaryExtensive.vanKampen _
((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr
- (by dsimp; infer_instance)).some).is_universal
+ (by dsimp; infer_instance)).some).isUniversal
#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive
+-/
+#print CategoryTheory.finitaryExtensive_iff_of_isTerminal /-
theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
(T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
FinitaryExtensive C ↔ IsVanKampenColimit c₀ :=
@@ -306,7 +336,9 @@ theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFi
obtain ⟨hl, hr⟩ := (H c (HT.from _) (HT.from _) d hd.symm hd'.symm).mp ⟨hc⟩
rw [hl.paste_vert_iff hX.symm, hr.paste_vert_iff hY.symm]
#align category_theory.finitary_extensive_iff_of_is_terminal CategoryTheory.finitaryExtensive_iff_of_isTerminal
+-/
+#print CategoryTheory.types.finitaryExtensive /-
instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
by
rw [finitary_extensive_iff_of_is_terminal (Type u) PUnit types.is_terminal_punit _
@@ -322,7 +354,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm
delta ExistsUnique at this
choose l hl hl'
@@ -334,7 +366,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm
· simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
delta ExistsUnique at this
@@ -362,11 +394,13 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
· intro s; ext ⟨⟨x, ⟨⟩⟩, hx⟩; dsimp; split_ifs; · cases h.symm.trans hx; · rfl
· intro s m e₁ e₂; ext x; split_ifs; · rw [← e₁]; rfl; · rw [← e₂]; rfl
#align category_theory.types.finitary_extensive CategoryTheory.types.finitaryExtensive
+-/
section TopCat
/-- (Implementation) An auxiliary lemma for the proof that `Top` is finitary extensive. -/
-def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u + 1} PUnit.{u + 1})) :
+def finitaryExtensiveTopCatAux (Z : TopCat.{u})
+ (f : Z ⟶ TopCat.of (Sum PUnit.{u + 1} PUnit.{u + 1})) :
IsColimit
(BinaryCofan.mk
(TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inl)
@@ -392,8 +426,7 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· revert h x
apply (IsOpen.continuousOn_iff _).mp
· rw [continuousOn_iff_continuous_restrict]
- convert_to Continuous fun x : { x | f x = Sum.inl PUnit.unit } =>
- s.inl ⟨(x, PUnit.unit), x.2⟩
+ convert_to Continuous fun x : {x | f x = Sum.inl PUnit.unit} => s.inl ⟨(x, PUnit.unit), x.2⟩
· ext ⟨x, hx⟩; exact dif_pos hx
continuity
· convert f.2.1 _ openEmbedding_inl.open_range; ext x;
@@ -403,7 +436,8 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· revert h x
apply (IsOpen.continuousOn_iff _).mp
· rw [continuousOn_iff_continuous_restrict]
- convert_to Continuous fun x : { x | f x ≠ Sum.inl PUnit.unit } =>
+ convert_to
+ Continuous fun x : {x | f x ≠ Sum.inl PUnit.unit} =>
s.inr ⟨(x, PUnit.unit), (this _).resolve_left x.2⟩
· ext ⟨x, hx⟩; exact dif_neg hx
continuity
@@ -422,7 +456,7 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
split_ifs; · cases h.symm.trans hx; · rfl
· intro s m e₁ e₂; ext x; change m x = dite _ _ _
split_ifs; · rw [← e₁]; rfl; · rw [← e₂]; rfl
-#align category_theory.finitary_extensive_Top_aux CategoryTheory.finitaryExtensiveTopAux
+#align category_theory.finitary_extensive_Top_aux CategoryTheory.finitaryExtensiveTopCatAux
instance : FinitaryExtensive TopCat.{u} :=
by
@@ -439,7 +473,7 @@ instance : FinitaryExtensive TopCat.{u} :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαY val : _).symm
@@ -456,7 +490,7 @@ instance : FinitaryExtensive TopCat.{u} :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαX val : _).symm
@@ -479,11 +513,14 @@ universe v'' u''
variable {D : Type u''} [Category.{v''} D]
+#print CategoryTheory.NatTrans.Equifibered.whiskerRight /-
theorem NatTrans.Equifibered.whiskerRight {F G : J ⥤ C} {α : F ⟶ G} (hα : α.Equifibered) (H : C ⥤ D)
[PreservesLimitsOfShape WalkingCospan H] : (whiskerRight α H).Equifibered := fun i j f =>
(hα f).map H
#align category_theory.nat_trans.equifibered.whisker_right CategoryTheory.NatTrans.Equifibered.whiskerRight
+-/
+#print CategoryTheory.IsVanKampenColimit.of_iso /-
theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKampenColimit c)
(e : c ≅ c') : IsVanKampenColimit c' :=
by
@@ -496,6 +533,7 @@ theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKamp
haveI : is_iso e.inv.hom := functor.map_is_iso (cocones.forget _) e.inv
exact (is_pullback.of_vert_is_iso ⟨by simp⟩).paste_vert_iff (nat_trans.congr_app h j).symm
#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
+-/
theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
[PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
@@ -538,13 +576,16 @@ instance [HasPullbacks C] [FinitaryExtensive C] : FinitaryExtensive (D ⥤ C) :=
is_van_kampen_colimit_of_evaluation _ c fun x =>
finitary_extensive.van_kampen _ <| preserves_colimit.preserves hc⟩
+#print CategoryTheory.finitaryExtensive_of_preserves_and_reflects /-
theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [PreservesLimitsOfShape WalkingCospan F]
[ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F]
[ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C :=
- ⟨fun X Y c hc => (FinitaryExtensive.van_kampen _ (isColimitOfPreserves F hc)).of_map F⟩
+ ⟨fun X Y c hc => (FinitaryExtensive.vanKampen _ (isColimitOfPreserves F hc)).of_map F⟩
#align category_theory.finitary_extensive_of_preserves_and_reflects CategoryTheory.finitaryExtensive_of_preserves_and_reflects
+-/
+#print CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism /-
theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F]
[PreservesColimitsOfShape (Discrete WalkingPair) F] [ReflectsIsomorphisms F] :
@@ -556,6 +597,7 @@ theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [F
reflects_colimits_of_shape_of_reflects_isomorphisms
exact finitary_extensive_of_preserves_and_reflects F
#align category_theory.finitary_extensive_of_preserves_and_reflects_isomorphism CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism
+-/
end Functor
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -165,15 +165,15 @@ theorem BinaryCofan.is_van_kampen_iff (c : BinaryCofan X Y) :
constructor
· introv H hαX hαY
rw [H c' (map_pair αX αY) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> assumption) (map_pair_equifibered _)]
- constructor; · intro H; exact ⟨H _, H _⟩; · rintro H ⟨⟨⟩⟩; exacts[H.1, H.2]
+ constructor; · intro H; exact ⟨H _, H _⟩; · rintro H ⟨⟨⟩⟩; exacts [H.1, H.2]
· introv H F' hα h
let X' := F'.obj ⟨walking_pair.left⟩; let Y' := F'.obj ⟨walking_pair.right⟩
have : F' = pair X' Y' := by apply functor.hext; · rintro ⟨⟨⟩⟩ <;> rfl;
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simpa
- clear_value X' Y'; subst this; change binary_cofan X' Y' at c'
+ clear_value X' Y'; subst this; change binary_cofan X' Y' at c'
rw [H c' _ _ _ (nat_trans.congr_app hα ⟨walking_pair.left⟩)
(nat_trans.congr_app hα ⟨walking_pair.right⟩)]
- constructor; · rintro H ⟨⟨⟩⟩; exacts[H.1, H.2]; · intro H; exact ⟨H _, H _⟩
+ constructor; · rintro H ⟨⟨⟩⟩; exacts [H.1, H.2]; · intro H; exact ⟨H _, H _⟩
#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.is_van_kampen_iff
theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
@@ -297,7 +297,7 @@ theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFi
by
refine' ⟨fun H => H.2 c₀ hc₀, fun H => _⟩
constructor
- simp_rw [binary_cofan.is_van_kampen_iff] at H⊢
+ simp_rw [binary_cofan.is_van_kampen_iff] at H ⊢
intro X Y c hc X' Y' c' αX αY f hX hY
obtain ⟨d, hd, hd'⟩ :=
limits.binary_cofan.is_colimit.desc' hc (HT.from _ ≫ c₀.inl) (HT.from _ ≫ c₀.inr)
@@ -322,9 +322,9 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
exact
⟨l, (funext hl).symm, types.is_terminal_punit.hom_ext _ _, fun l' h₁ h₂ =>
@@ -334,10 +334,10 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm
· simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
exact
⟨l, (funext hl).symm, types.is_terminal_punit.hom_ext _ _, fun l' h₁ h₂ =>
@@ -346,7 +346,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
dsimp [limits.types.binary_coproduct_cocone]
delta types.pullback_obj
have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by intro x;
- rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts[Or.inl rfl, Or.inr rfl]
+ rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts [Or.inl rfl, Or.inr rfl]
let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, by convert p.2⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext <;> rfl, fun _ =>
by ext <;> rfl⟩
@@ -373,7 +373,7 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
(TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inr)) :=
by
have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by intro x;
- rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts[Or.inl rfl, Or.inr rfl]
+ rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts [Or.inl rfl, Or.inr rfl]
let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩, fun x =>
⟨⟨_, _⟩, x.2⟩, fun _ => by ext <;> rfl, fun _ => by ext <;> rfl⟩
@@ -439,11 +439,11 @@ instance : FinitaryExtensive TopCat.{u} :=
intro x
cases h : s.fst x
· simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαY val : _).symm
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
refine'
⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, Top.is_terminal_punit.hom_ext _ _,
@@ -456,12 +456,12 @@ instance : FinitaryExtensive TopCat.{u} :=
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
- · apply_fun f at h
+ · apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαX val : _).symm
· simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
- delta ExistsUnique at this
+ delta ExistsUnique at this
choose l hl hl'
refine'
⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, Top.is_terminal_punit.hom_ext _ _,
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -141,14 +141,10 @@ attribute [instance] finitary_extensive.has_finite_coproducts
theorem FinitaryExtensive.van_kampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c :=
by
- let X := F.obj ⟨walking_pair.left⟩
- let Y := F.obj ⟨walking_pair.right⟩
- have : F = pair X Y := by
- apply functor.hext
- · rintro ⟨⟨⟩⟩ <;> rfl
+ let X := F.obj ⟨walking_pair.left⟩; let Y := F.obj ⟨walking_pair.right⟩
+ have : F = pair X Y := by apply functor.hext; · rintro ⟨⟨⟩⟩ <;> rfl;
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simpa
- clear_value X Y
- subst this
+ clear_value X Y; subst this
exact finitary_extensive.van_kampen' c hc
#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.van_kampen
@@ -169,28 +165,15 @@ theorem BinaryCofan.is_van_kampen_iff (c : BinaryCofan X Y) :
constructor
· introv H hαX hαY
rw [H c' (map_pair αX αY) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> assumption) (map_pair_equifibered _)]
- constructor
- · intro H
- exact ⟨H _, H _⟩
- · rintro H ⟨⟨⟩⟩
- exacts[H.1, H.2]
+ constructor; · intro H; exact ⟨H _, H _⟩; · rintro H ⟨⟨⟩⟩; exacts[H.1, H.2]
· introv H F' hα h
- let X' := F'.obj ⟨walking_pair.left⟩
- let Y' := F'.obj ⟨walking_pair.right⟩
- have : F' = pair X' Y' := by
- apply functor.hext
- · rintro ⟨⟨⟩⟩ <;> rfl
+ let X' := F'.obj ⟨walking_pair.left⟩; let Y' := F'.obj ⟨walking_pair.right⟩
+ have : F' = pair X' Y' := by apply functor.hext; · rintro ⟨⟨⟩⟩ <;> rfl;
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simpa
- clear_value X' Y'
- subst this
- change binary_cofan X' Y' at c'
+ clear_value X' Y'; subst this; change binary_cofan X' Y' at c'
rw [H c' _ _ _ (nat_trans.congr_app hα ⟨walking_pair.left⟩)
(nat_trans.congr_app hα ⟨walking_pair.right⟩)]
- constructor
- · rintro H ⟨⟨⟩⟩
- exacts[H.1, H.2]
- · intro H
- exact ⟨H _, H _⟩
+ constructor; · rintro H ⟨⟨⟩⟩; exacts[H.1, H.2]; · intro H; exact ⟨H _, H _⟩
#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.is_van_kampen_iff
theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
@@ -213,17 +196,11 @@ theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
obtain ⟨hl, hr⟩ := h₁ αX αY (e.inv ≫ f) (by simp [hX]) (by simp [hY])
constructor
· rw [← category.id_comp αX, ← iso.hom_inv_id_assoc e f]
- have : c'.inl ≫ e.hom = 𝟙 X' ≫ (cofans X' Y').inl :=
- by
- dsimp
- simp
+ have : c'.inl ≫ e.hom = 𝟙 X' ≫ (cofans X' Y').inl := by dsimp; simp
haveI : is_iso (𝟙 X') := inferInstance
exact (is_pullback.of_vert_is_iso ⟨this⟩).paste_vert hl
· rw [← category.id_comp αY, ← iso.hom_inv_id_assoc e f]
- have : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr :=
- by
- dsimp
- simp
+ have : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr := by dsimp; simp
haveI : is_iso (𝟙 Y') := inferInstance
exact (is_pullback.of_vert_is_iso ⟨this⟩).paste_vert hr
· rintro ⟨H₁, H₂⟩
@@ -250,9 +227,7 @@ theorem BinaryCofan.mono_inr_of_is_van_kampen [HasInitial C] {X Y : C} {c : Bina
·
exact
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
- (by
- dsimp
- infer_instance)).some
+ (by dsimp; infer_instance)).some
#align category_theory.binary_cofan.mono_inr_of_is_van_kampen CategoryTheory.BinaryCofan.mono_inr_of_is_van_kampen
theorem FinitaryExtensive.mono_inr_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
@@ -282,9 +257,7 @@ theorem BinaryCofan.isPullback_initial_to_of_is_van_kampen [HasInitial C] {c : B
·
exact
((binary_cofan.is_colimit_iff_is_iso_inr initial_is_initial _).mpr
- (by
- dsimp
- infer_instance)).some
+ (by dsimp; infer_instance)).some
#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_is_van_kampen
theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C]
@@ -315,9 +288,7 @@ instance (priority := 100) hasStrictInitialObjects_of_finitaryExtensive [Finitar
has_strict_initial_of_is_universal
(FinitaryExtensive.van_kampen _
((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr
- (by
- dsimp
- infer_instance)).some).is_universal
+ (by dsimp; infer_instance)).some).is_universal
#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive
theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
@@ -350,8 +321,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
have : ∀ x, ∃! y, s.fst x = Sum.inl y := by
intro x
cases h : s.fst x
- · simp_rw [sum.inl_injective.eq_iff]
- exact exists_unique_eq'
+ · simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
· apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm
delta ExistsUnique at this
@@ -360,15 +330,13 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
⟨l, (funext hl).symm, types.is_terminal_punit.hom_ext _ _, fun l' h₁ h₂ =>
funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩
· refine' ⟨⟨hαY.symm⟩, ⟨pullback_cone.is_limit_aux' _ _⟩⟩
- intro s
- dsimp
+ intro s; dsimp
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
· apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm
- · simp_rw [sum.inr_injective.eq_iff]
- exact exists_unique_eq'
+ · simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
delta ExistsUnique at this
choose l hl hl'
exact
@@ -377,11 +345,8 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
· intro Z f
dsimp [limits.types.binary_coproduct_cocone]
delta types.pullback_obj
- have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit :=
- by
- intro x
- rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)
- exacts[Or.inl rfl, Or.inr rfl]
+ have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by intro x;
+ rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts[Or.inl rfl, Or.inr rfl]
let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, by convert p.2⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext <;> rfl, fun _ =>
by ext <;> rfl⟩
@@ -393,23 +358,9 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) :=
exact fun s x =>
dite _ (fun h => s.inl <| eX.symm ⟨x, h⟩) fun h =>
s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩
- · intro s
- ext ⟨⟨x, ⟨⟩⟩, _⟩
- dsimp
- split_ifs <;> rfl
- · intro s
- ext ⟨⟨x, ⟨⟩⟩, hx⟩
- dsimp
- split_ifs
- · cases h.symm.trans hx
- · rfl
- · intro s m e₁ e₂
- ext x
- split_ifs
- · rw [← e₁]
- rfl
- · rw [← e₂]
- rfl
+ · intro s; ext ⟨⟨x, ⟨⟩⟩, _⟩; dsimp; split_ifs <;> rfl
+ · intro s; ext ⟨⟨x, ⟨⟩⟩, hx⟩; dsimp; split_ifs; · cases h.symm.trans hx; · rfl
+ · intro s m e₁ e₂; ext x; split_ifs; · rw [← e₁]; rfl; · rw [← e₂]; rfl
#align category_theory.types.finitary_extensive CategoryTheory.types.finitaryExtensive
section TopCat
@@ -421,11 +372,8 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
(TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inl)
(TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inr)) :=
by
- have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit :=
- by
- intro x
- rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)
- exacts[Or.inl rfl, Or.inr rfl]
+ have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by intro x;
+ rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩); exacts[Or.inl rfl, Or.inr rfl]
let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩, fun x =>
⟨⟨_, _⟩, x.2⟩, fun _ => by ext <;> rfl, fun _ => by ext <;> rfl⟩
@@ -446,11 +394,9 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· rw [continuousOn_iff_continuous_restrict]
convert_to Continuous fun x : { x | f x = Sum.inl PUnit.unit } =>
s.inl ⟨(x, PUnit.unit), x.2⟩
- · ext ⟨x, hx⟩
- exact dif_pos hx
+ · ext ⟨x, hx⟩; exact dif_pos hx
continuity
- · convert f.2.1 _ openEmbedding_inl.open_range
- ext x
+ · convert f.2.1 _ openEmbedding_inl.open_range; ext x;
exact
⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ =>
h.symm.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩
@@ -459,11 +405,9 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· rw [continuousOn_iff_continuous_restrict]
convert_to Continuous fun x : { x | f x ≠ Sum.inl PUnit.unit } =>
s.inr ⟨(x, PUnit.unit), (this _).resolve_left x.2⟩
- · ext ⟨x, hx⟩
- exact dif_neg hx
+ · ext ⟨x, hx⟩; exact dif_neg hx
continuity
- · convert f.2.1 _ openEmbedding_inr.open_range
- ext x
+ · convert f.2.1 _ openEmbedding_inr.open_range; ext x
change f x ≠ Sum.inl PUnit.unit ↔ f x ∈ Set.range Sum.inr
trans f x = Sum.inr PUnit.unit
·
@@ -473,24 +417,11 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
exact
⟨fun h => ⟨_, h.symm⟩, fun ⟨e, h⟩ =>
h.symm.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩
- · intro s
- ext ⟨⟨x, ⟨⟩⟩, _⟩
- change dite _ _ _ = _
- split_ifs <;> rfl
- · intro s
- ext ⟨⟨x, ⟨⟩⟩, hx⟩
- change dite _ _ _ = _
- split_ifs
- · cases h.symm.trans hx
- · rfl
- · intro s m e₁ e₂
- ext x
- change m x = dite _ _ _
- split_ifs
- · rw [← e₁]
- rfl
- · rw [← e₂]
- rfl
+ · intro s; ext ⟨⟨x, ⟨⟩⟩, _⟩; change dite _ _ _ = _; split_ifs <;> rfl
+ · intro s; ext ⟨⟨x, ⟨⟩⟩, hx⟩; change dite _ _ _ = _
+ split_ifs; · cases h.symm.trans hx; · rfl
+ · intro s m e₁ e₂; ext x; change m x = dite _ _ _
+ split_ifs; · rw [← e₁]; rfl; · rw [← e₂]; rfl
#align category_theory.finitary_extensive_Top_aux CategoryTheory.finitaryExtensiveTopAux
instance : FinitaryExtensive TopCat.{u} :=
@@ -507,8 +438,7 @@ instance : FinitaryExtensive TopCat.{u} :=
have : ∀ x, ∃! y, s.fst x = Sum.inl y := by
intro x
cases h : s.fst x
- · simp_rw [sum.inl_injective.eq_iff]
- exact exists_unique_eq'
+ · simp_rw [sum.inl_injective.eq_iff]; exact exists_unique_eq'
· apply_fun f at h
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
@@ -520,11 +450,9 @@ instance : FinitaryExtensive TopCat.{u} :=
fun l' h₁ h₂ =>
ContinuousMap.ext fun x => hl' x (l' x) (concrete_category.congr_hom h₁ x).symm⟩
apply embedding_inl.to_inducing.continuous_iff.mpr
- convert s.fst.2 using 1
- exact (funext hl).symm
+ convert s.fst.2 using 1; exact (funext hl).symm
· refine' ⟨⟨hαY.symm⟩, ⟨pullback_cone.is_limit_aux' _ _⟩⟩
- intro s
- dsimp
+ intro s; dsimp
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases h : s.fst x
@@ -532,8 +460,7 @@ instance : FinitaryExtensive TopCat.{u} :=
cases
((concrete_category.congr_hom s.condition x).symm.trans h).trans
(concrete_category.congr_hom hαX val : _).symm
- · simp_rw [sum.inr_injective.eq_iff]
- exact exists_unique_eq'
+ · simp_rw [sum.inr_injective.eq_iff]; exact exists_unique_eq'
delta ExistsUnique at this
choose l hl hl'
refine'
@@ -541,10 +468,8 @@ instance : FinitaryExtensive TopCat.{u} :=
fun l' h₁ h₂ =>
ContinuousMap.ext fun x => hl' x (l' x) (concrete_category.congr_hom h₁ x).symm⟩
apply embedding_inr.to_inducing.continuous_iff.mpr
- convert s.fst.2 using 1
- exact (funext hl).symm
- · intro Z f
- exact finitary_extensive_Top_aux Z f
+ convert s.fst.2 using 1; exact (funext hl).symm
+ · intro Z f; exact finitary_extensive_Top_aux Z f
end TopCat
@@ -563,10 +488,7 @@ theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKamp
(e : c ≅ c') : IsVanKampenColimit c' :=
by
intro F' c'' α f h hα
- have : c'.ι ≫ (Functor.Const J).map e.inv.hom = c.ι :=
- by
- ext j
- exact e.inv.2 j
+ have : c'.ι ≫ (Functor.Const J).map e.inv.hom = c.ι := by ext j; exact e.inv.2 j
rw [H c'' α (f ≫ e.inv.1) (by rw [functor.map_comp, ← reassoc_of h, this]) hα]
apply forall_congr'
intro j
@@ -584,9 +506,7 @@ theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J
refine'
(Iff.trans _
(H (G.map_cocone c') (whisker_right α G) (G.map f)
- (by
- ext j
- simpa using G.congr_map (nat_trans.congr_app h j))
+ (by ext j; simpa using G.congr_map (nat_trans.congr_app h j))
(hα.whisker_right G))).trans
(forall_congr' fun j => _)
· exact ⟨fun h => ⟨is_colimit_of_preserves G h.some⟩, fun h => ⟨is_colimit_of_reflects G h.some⟩⟩
@@ -600,11 +520,7 @@ theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J
have := fun x =>
hc x (((evaluation C D).obj x).mapCocone c') (whisker_right α _)
(((evaluation C D).obj x).map f)
- (by
- ext y
- dsimp
- exact nat_trans.congr_app (nat_trans.congr_app e y) x)
- (hα.whisker_right _)
+ (by ext y; dsimp; exact nat_trans.congr_app (nat_trans.congr_app e y) x) (hα.whisker_right _)
constructor
· rintro ⟨hc'⟩ j
refine' ⟨⟨(nat_trans.congr_app e j).symm⟩, ⟨evaluation_jointly_reflects_limits _ _⟩⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/d4437c68c8d350fc9d4e95e1e174409db35e30d7
@@ -495,7 +495,7 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
instance : FinitaryExtensive TopCat.{u} :=
by
- rw [finitary_extensive_iff_of_is_terminal TopCat.{u} _ TopCat.isTerminalPunit _
+ rw [finitary_extensive_iff_of_is_terminal TopCat.{u} _ TopCat.isTerminalPUnit _
(TopCat.binaryCofanIsColimit _ _)]
apply
binary_cofan.is_van_kampen_mk _ _ (fun X Y => TopCat.binaryCofanIsColimit X Y) _
mathlib commit https://github.com/leanprover-community/mathlib/commit/9b2b58d6b14b895b2f375108e765cb47de71aebd
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module category_theory.extensive
-! leanprover-community/mathlib commit ac3ae212f394f508df43e37aa093722fa9b65d31
+! leanprover-community/mathlib commit 178a32653e369dce2da68dc6b2694e385d484ef1
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.CategoryTheory.Limits.Shapes.CommSq
import Mathbin.CategoryTheory.Limits.Shapes.StrictInitial
import Mathbin.CategoryTheory.Limits.Shapes.Types
-import Mathbin.Topology.Category.Top.Limits
+import Mathbin.Topology.Category.Top.Limits.Pullbacks
import Mathbin.CategoryTheory.Limits.FunctorCategory
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -444,8 +444,8 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· revert h x
apply (IsOpen.continuousOn_iff _).mp
· rw [continuousOn_iff_continuous_restrict]
- convert_to
- Continuous fun x : { x | f x = Sum.inl PUnit.unit } => s.inl ⟨(x, PUnit.unit), x.2⟩
+ convert_to Continuous fun x : { x | f x = Sum.inl PUnit.unit } =>
+ s.inl ⟨(x, PUnit.unit), x.2⟩
· ext ⟨x, hx⟩
exact dif_pos hx
continuity
@@ -457,8 +457,7 @@ def finitaryExtensiveTopAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (Sum PUnit.{u
· revert h x
apply (IsOpen.continuousOn_iff _).mp
· rw [continuousOn_iff_continuous_restrict]
- convert_to
- Continuous fun x : { x | f x ≠ Sum.inl PUnit.unit } =>
+ convert_to Continuous fun x : { x | f x ≠ Sum.inl PUnit.unit } =>
s.inr ⟨(x, PUnit.unit), (this _).resolve_left x.2⟩
· ext ⟨x, hx⟩
exact dif_neg hx
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -78,7 +78,7 @@ theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H
/-- A (colimit) cocone over a diagram `F : J ⥤ C` is universal if it is stable under pullbacks. -/
def IsUniversalColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
- ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.x ⟶ c.x)
+ ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.pt ⟶ c.pt)
(h : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (hα : α.Equifibered),
(∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)) → Nonempty (IsColimit c')
#align category_theory.is_universal_colimit CategoryTheory.IsUniversalColimit
@@ -90,7 +90,7 @@ TODO: Show that this is iff the functor `C ⥤ Catᵒᵖ` sending `x` to `C/x` p
TODO: Show that this is iff the inclusion functor `C ⥤ Span(C)` preserves it.
-/
def IsVanKampenColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
- ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.x ⟶ c.x)
+ ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.pt ⟶ c.pt)
(h : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (hα : α.Equifibered),
Nonempty (IsColimit c') ↔ ∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)
#align category_theory.is_van_kampen_colimit CategoryTheory.IsVanKampenColimit
@@ -162,7 +162,7 @@ theorem map_pair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F')
theorem BinaryCofan.is_van_kampen_iff (c : BinaryCofan X Y) :
IsVanKampenColimit c ↔
- ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.x ⟶ c.x)
+ ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt)
(hαX : αX ≫ c.inl = c'.inl ≫ f) (hαY : αY ≫ c.inr = c'.inr ≫ f),
Nonempty (IsColimit c') ↔ IsPullback c'.inl αX f c.inl ∧ IsPullback c'.inr αY f c.inr :=
by
@@ -198,11 +198,12 @@ theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
(cones : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), PullbackCone f g)
(limits : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), IsLimit (cones f g))
(h₁ :
- ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').x ⟶ c.x)
+ ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt)
(hαX : αX ≫ c.inl = (cofans X' Y').inl ≫ f) (hαY : αY ≫ c.inr = (cofans X' Y').inr ≫ f),
IsPullback (cofans X' Y').inl αX f c.inl ∧ IsPullback (cofans X' Y').inr αY f c.inr)
(h₂ :
- ∀ {Z : C} (f : Z ⟶ c.x), IsColimit (BinaryCofan.mk (cones f c.inl).fst (cones f c.inr).fst)) :
+ ∀ {Z : C} (f : Z ⟶ c.pt),
+ IsColimit (BinaryCofan.mk (cones f c.inl).fst (cones f c.inr).fst)) :
IsVanKampenColimit c := by
rw [binary_cofan.is_van_kampen_iff]
introv hX hY
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -69,11 +69,11 @@ def NatTrans.Equifibered {F G : J ⥤ C} (α : F ⟶ G) : Prop :=
#align category_theory.nat_trans.equifibered CategoryTheory.NatTrans.Equifibered
theorem NatTrans.equifibered_of_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α] : α.Equifibered :=
- fun _ _ f => IsPullback.ofVertIsIso ⟨NatTrans.naturality _ f⟩
+ fun _ _ f => IsPullback.of_vert_isIso ⟨NatTrans.naturality _ f⟩
#align category_theory.nat_trans.equifibered_of_is_iso CategoryTheory.NatTrans.equifibered_of_isIso
theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H} (hα : α.Equifibered)
- (hβ : β.Equifibered) : (α ≫ β).Equifibered := fun i j f => (hα f).pasteVert (hβ f)
+ (hβ : β.Equifibered) : (α ≫ β).Equifibered := fun i j f => (hα f).paste_vert (hβ f)
#align category_theory.nat_trans.equifibered.comp CategoryTheory.NatTrans.Equifibered.comp
/-- A (colimit) cocone over a diagram `F : J ⥤ C` is universal if it is stable under pullbacks. -/
@@ -217,14 +217,14 @@ theorem BinaryCofan.is_van_kampen_mk {X Y : C} (c : BinaryCofan X Y)
dsimp
simp
haveI : is_iso (𝟙 X') := inferInstance
- exact (is_pullback.of_vert_is_iso ⟨this⟩).pasteVert hl
+ exact (is_pullback.of_vert_is_iso ⟨this⟩).paste_vert hl
· rw [← category.id_comp αY, ← iso.hom_inv_id_assoc e f]
have : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr :=
by
dsimp
simp
haveI : is_iso (𝟙 Y') := inferInstance
- exact (is_pullback.of_vert_is_iso ⟨this⟩).pasteVert hr
+ exact (is_pullback.of_vert_is_iso ⟨this⟩).paste_vert hr
· rintro ⟨H₁, H₂⟩
refine' ⟨is_colimit.of_iso_colimit _ <| (iso_binary_cofan_mk _).symm⟩
let e₁ : X' ≅ _ := H₁.is_limit.cone_point_unique_up_to_iso (limits _ _)
@@ -270,7 +270,7 @@ instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inl : X ⟶ X ⨿ Y) :=
instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inr : Y ⟶ X ⨿ Y) :=
(FinitaryExtensive.mono_inr_of_isColimit (coprodIsCoprod X Y) : _)
-theorem BinaryCofan.isPullbackInitialToOfIsVanKampen [HasInitial C] {c : BinaryCofan X Y}
+theorem BinaryCofan.isPullback_initial_to_of_is_van_kampen [HasInitial C] {c : BinaryCofan X Y}
(h : IsVanKampenColimit c) : IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
by
refine'
@@ -284,12 +284,13 @@ theorem BinaryCofan.isPullbackInitialToOfIsVanKampen [HasInitial C] {c : BinaryC
(by
dsimp
infer_instance)).some
-#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullbackInitialToOfIsVanKampen
+#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_is_van_kampen
-theorem FinitaryExtensive.isPullbackInitialToBinaryCofan [FinitaryExtensive C] {c : BinaryCofan X Y}
- (hc : IsColimit c) : IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
- BinaryCofan.isPullbackInitialToOfIsVanKampen (FinitaryExtensive.van_kampen c hc)
-#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullbackInitialToBinaryCofan
+theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C]
+ {c : BinaryCofan X Y} (hc : IsColimit c) :
+ IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
+ BinaryCofan.isPullback_initial_to_of_is_van_kampen (FinitaryExtensive.van_kampen c hc)
+#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan
theorem has_strict_initial_of_is_universal [HasInitial C]
(H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))) : HasStrictInitialObjects C :=
@@ -621,14 +622,14 @@ instance [HasPullbacks C] [FinitaryExtensive C] : FinitaryExtensive (D ⥤ C) :=
is_van_kampen_colimit_of_evaluation _ c fun x =>
finitary_extensive.van_kampen _ <| preserves_colimit.preserves hc⟩
-theorem finitaryExtensiveOfPreservesAndReflects (F : C ⥤ D) [FinitaryExtensive D]
+theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [PreservesLimitsOfShape WalkingCospan F]
[ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F]
[ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C :=
⟨fun X Y c hc => (FinitaryExtensive.van_kampen _ (isColimitOfPreserves F hc)).of_map F⟩
-#align category_theory.finitary_extensive_of_preserves_and_reflects CategoryTheory.finitaryExtensiveOfPreservesAndReflects
+#align category_theory.finitary_extensive_of_preserves_and_reflects CategoryTheory.finitaryExtensive_of_preserves_and_reflects
-theorem finitaryExtensiveOfPreservesAndReflectsIsomorphism (F : C ⥤ D) [FinitaryExtensive D]
+theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F]
[PreservesColimitsOfShape (Discrete WalkingPair) F] [ReflectsIsomorphisms F] :
FinitaryExtensive C :=
@@ -638,7 +639,7 @@ theorem finitaryExtensiveOfPreservesAndReflectsIsomorphism (F : C ⥤ D) [Finita
haveI : reflects_colimits_of_shape (discrete walking_pair) F :=
reflects_colimits_of_shape_of_reflects_isomorphisms
exact finitary_extensive_of_preserves_and_reflects F
-#align category_theory.finitary_extensive_of_preserves_and_reflects_isomorphism CategoryTheory.finitaryExtensiveOfPreservesAndReflectsIsomorphism
+#align category_theory.finitary_extensive_of_preserves_and_reflects_isomorphism CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism
end Functor
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
FastSubsingleton
and FastIsEmpty
to speed up congr!
/convert
(#12495)
This is a PR that's a temporary measure to improve performance of congr!
/convert
, and the implementation may change in a future PR with a new version of congr!
.
Introduces two typeclasses that are meant to quickly evaluate in common cases of Subsingleton
and IsEmpty
. Makes congr!
use these typeclasses rather than Subsingleton
.
Local Subsingleton
/IsEmpty
instances are included as Fast
instances. To get congr!
/convert
to reason about subsingleton types, you can add such instances to the local context. Or, you can apply Subsingleton.elim
yourself.
@@ -764,6 +764,7 @@ theorem isPullback_initial_to_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {
Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
+ have : ∀ i, Subsingleton (⊥_ C ⟶ (Discrete.functor f).obj i) := inferInstance
convert isPullback_of_cofan_isVanKampen hc i.as j.as
exact (if_neg (mt (Discrete.ext _ _) hi.symm)).symm
@@ -360,7 +360,7 @@ theorem IsUniversalColimit.map_reflective
exact c.w _
let cf : (Cocones.precompose β.hom).obj c' ⟶ Gl.mapCocone c'' := by
refine { hom := pullback.lift ?_ f ?_ ≫ (PreservesPullback.iso _ _ _).inv, w := ?_ }
- exact (inv <| adj.counit.app c'.pt)
+ exact inv <| adj.counit.app c'.pt
· rw [IsIso.inv_comp_eq, ← adj.counit_naturality_assoc f, ← cancel_mono (adj.counit.app <|
Gl.obj c.pt), Category.assoc, Category.assoc, adj.left_triangle_components]
erw [Category.comp_id]
These notions on functors are now Functor.Full
, Functor.Faithful
, Functor.EssSurj
, Functor.IsEquivalence
, Functor.ReflectsIsomorphisms
. Deprecated aliases are introduced for the previous names.
@@ -221,7 +221,7 @@ theorem IsVanKampenColimit.of_mapCocone (G : C ⥤ D) {F : J ⥤ C} {c : Cocone
#align category_theory.is_van_kampen_colimit.of_map CategoryTheory.IsVanKampenColimit.of_mapCocone
theorem IsVanKampenColimit.mapCocone_iff (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
- [IsEquivalence G] : IsVanKampenColimit (G.mapCocone c) ↔ IsVanKampenColimit c :=
+ [G.IsEquivalence] : IsVanKampenColimit (G.mapCocone c) ↔ IsVanKampenColimit c :=
⟨IsVanKampenColimit.of_mapCocone G, fun hc ↦ by
let e : F ⋙ G ⋙ Functor.inv G ≅ F := NatIso.hcomp (Iso.refl F) G.asEquivalence.unitIso.symm
apply IsVanKampenColimit.of_mapCocone G.inv
@@ -307,7 +307,7 @@ end Functor
section reflective
theorem IsUniversalColimit.map_reflective
- {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
{F : J ⥤ D} {c : Cocone (F ⋙ Gr)}
(H : IsUniversalColimit c)
[∀ X (f : X ⟶ Gl.obj c.pt), HasPullback (Gr.map f) (adj.unit.app c.pt)]
@@ -410,7 +410,7 @@ theorem IsUniversalColimit.map_reflective
pullback.lift_snd]
theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
- {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
{F : J ⥤ D} {c : Cocone (F ⋙ Gr)} (H : IsVanKampenColimit c)
[∀ X (f : X ⟶ Gl.obj c.pt), HasPullback (Gr.map f) (adj.unit.app c.pt)]
[∀ X (f : X ⟶ Gl.obj c.pt), PreservesLimit (cospan (Gr.map f) (adj.unit.app c.pt)) Gl]
These notions on functors are now Functor.Full
, Functor.Faithful
, Functor.EssSurj
, Functor.IsEquivalence
, Functor.ReflectsIsomorphisms
. Deprecated aliases are introduced for the previous names.
@@ -416,7 +416,7 @@ section Functor
theorem finitaryExtensive_of_reflective
[HasFiniteCoproducts D] [HasPullbacksOfInclusions D] [FinitaryExtensive C]
- {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
[∀ X Y (f : X ⟶ Gl.obj Y), HasPullback (Gr.map f) (adj.unit.app Y)]
[∀ X Y (f : X ⟶ Gl.obj Y), PreservesLimit (cospan (Gr.map f) (adj.unit.app Y)) Gl]
[PreservesPullbacksOfInclusions Gl] :
@@ -475,7 +475,7 @@ theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExten
theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
[HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F]
- [PreservesColimitsOfShape (Discrete WalkingPair) F] [ReflectsIsomorphisms F] :
+ [PreservesColimitsOfShape (Discrete WalkingPair) F] [F.ReflectsIsomorphisms] :
FinitaryExtensive C := by
haveI : ReflectsLimitsOfShape WalkingCospan F := reflectsLimitsOfShapeOfReflectsIsomorphisms
haveI : ReflectsColimitsOfShape (Discrete WalkingPair) F :=
@@ -340,7 +340,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
change f x ≠ Sum.inl PUnit.unit ↔ f x ∈ Set.range Sum.inr
trans f x = Sum.inr PUnit.unit
· rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩) <;>
- simp only [iff_self_iff, eq_self_iff_true, not_true, Ne.def, not_false_iff]
+ simp only [iff_self_iff, eq_self_iff_true, not_true, Ne, not_false_iff]
· exact ⟨fun h => ⟨_, h.symm⟩,
fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩
· intro s
All these lemmas refer to the range of some function being open/range (i.e. isOpen
or isClosed
).
@@ -321,7 +321,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
-- Porting note: this `(BinaryCofan.inl s).2` was unnecessary
have := (BinaryCofan.inl s).2
continuity
- · convert f.2.1 _ openEmbedding_inl.open_range
+ · convert f.2.1 _ openEmbedding_inl.isOpen_range
rename_i x
exact ⟨fun h => ⟨_, h.symm⟩,
fun ⟨e, h⟩ => h.symm.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩
@@ -335,7 +335,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
-- Porting note: this `(BinaryCofan.inr s).2` was unnecessary
have := (BinaryCofan.inr s).2
continuity
- · convert f.2.1 _ openEmbedding_inr.open_range
+ · convert f.2.1 _ openEmbedding_inr.isOpen_range
rename_i x
change f x ≠ Sum.inl PUnit.unit ↔ f x ∈ Set.range Sum.inr
trans f x = Sum.inr PUnit.unit
Includes some doc comments and real code: this is exhaustive, with two exceptions:
Follow-up to #11301, much shorter this time.
@@ -339,7 +339,7 @@ theorem IsUniversalColimit.map_reflective
let c'' : Cocone (F' ⋙ Gr) := by
refine
{ pt := pullback (Gr.map f) (adj.unit.app _)
- ι := { app := λ j ↦ pullback.lift (Gr.map <| c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
+ ι := { app := fun j ↦ pullback.lift (Gr.map <| c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
naturality := ?_ } }
· rw [← Gr.map_comp, ← hc'']
erw [← adj.unit_naturality]
@@ -227,7 +227,7 @@ theorem IsVanKampenColimit.mapCocone_iff (G : C ⥤ D) {F : J ⥤ C} {c : Cocone
apply IsVanKampenColimit.of_mapCocone G.inv
apply (IsVanKampenColimit.precompose_isIso_iff e.inv).mp
refine hc.of_iso (Cocones.ext (G.asEquivalence.unitIso.app c.pt) ?_)
- simp [Functor.asEquivalence]⟩
+ simp [e, Functor.asEquivalence]⟩
theorem IsUniversalColimit.whiskerEquivalence {K : Type*} [Category K] (e : J ≌ K)
{F : K ⥤ C} {c : Cocone F} (hc : IsUniversalColimit c) :
@@ -331,7 +331,7 @@ theorem IsUniversalColimit.map_reflective
have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j := by
intro j
rw [← cancel_mono (adj.counit.app <| F.obj j)]
- dsimp
+ dsimp [α']
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
have hc'' : ∀ j, α.app j ≫ Gl.map (c.ι.app j) = c'.ι.app j ≫ f := NatTrans.congr_app h
@@ -347,7 +347,7 @@ theorem IsUniversalColimit.map_reflective
dsimp
simp only [Category.assoc, Functor.map_comp, adj.right_triangle_components_assoc]
· intros i j g
- dsimp
+ dsimp [α']
ext
all_goals simp only [Category.comp_id, Category.id_comp, Category.assoc,
← Functor.map_comp, pullback.lift_fst, pullback.lift_snd, ← Functor.map_comp_assoc]
@@ -372,10 +372,10 @@ theorem IsUniversalColimit.map_reflective
pullback.lift_fst, pullback.lift_snd, Category.assoc,
Functor.mapCocone_ι_app, ← Gl.map_comp]
· rw [IsIso.comp_inv_eq, adj.counit_naturality]
- dsimp
+ dsimp [β]
rw [Category.comp_id]
· rw [Gl.map_comp, hα'', Category.assoc, hc'']
- dsimp
+ dsimp [β]
rw [Category.comp_id, Category.assoc]
have : cf.hom ≫ (PreservesPullback.iso _ _ _).hom ≫ pullback.fst ≫ adj.counit.app _ = 𝟙 _ := by
simp only [IsIso.inv_hom_id, Iso.inv_hom_id_assoc, Category.assoc, pullback.lift_fst_assoc]
@@ -393,7 +393,7 @@ theorem IsUniversalColimit.map_reflective
Functor.map_comp, pullback.lift_snd]
· intro j
apply IsPullback.of_right _ _ (IsPullback.of_hasPullback _ _)
- · dsimp
+ · dsimp [α']
simp only [Category.comp_id, Category.id_comp, Category.assoc, Functor.map_comp,
pullback.lift_fst]
rw [← Category.comp_id (Gr.map f)]
@@ -426,7 +426,7 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j := by
intro j
rw [← cancel_mono (adj.counit.app <| F.obj j)]
- dsimp
+ dsimp [α']
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
@@ -434,7 +434,7 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
let hr := isColimitOfPreserves Gl (colimit.isColimit <| F' ⋙ Gr)
have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map <| α'.app j) := by
rw [hα'']
- simp
+ simp [β]
rw [this]
have : f = (hl.coconePointUniqueUpToIso hr).hom ≫
Gl.map (colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩) := by
@@ -449,7 +449,7 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
apply hl.hom_ext
intro j
rw [hl.fac]
- dsimp
+ dsimp [β]
simp only [Category.comp_id, hα'', Category.assoc, Gl.map_comp]
congr 1
exact (NatTrans.congr_app h j).symm
@@ -550,26 +550,26 @@ theorem BinaryCofan.isVanKampen_mk {X Y : C} (c : BinaryCofan X Y)
constructor
· rintro ⟨h⟩
let e := h.coconePointUniqueUpToIso (colimits _ _)
- obtain ⟨hl, hr⟩ := h₁ αX αY (e.inv ≫ f) (by simp [hX]) (by simp [hY])
+ obtain ⟨hl, hr⟩ := h₁ αX αY (e.inv ≫ f) (by simp [e, hX]) (by simp [e, hY])
constructor
· rw [← Category.id_comp αX, ← Iso.hom_inv_id_assoc e f]
haveI : IsIso (𝟙 X') := inferInstance
have : c'.inl ≫ e.hom = 𝟙 X' ≫ (cofans X' Y').inl := by
- dsimp
+ dsimp [e]
simp
exact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hl
· rw [← Category.id_comp αY, ← Iso.hom_inv_id_assoc e f]
haveI : IsIso (𝟙 Y') := inferInstance
have : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr := by
- dsimp
+ dsimp [e]
simp
exact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hr
· rintro ⟨H₁, H₂⟩
refine' ⟨IsColimit.ofIsoColimit _ <| (isoBinaryCofanMk _).symm⟩
let e₁ : X' ≅ _ := H₁.isLimit.conePointUniqueUpToIso (limits _ _)
let e₂ : Y' ≅ _ := H₂.isLimit.conePointUniqueUpToIso (limits _ _)
- have he₁ : c'.inl = e₁.hom ≫ (cones f c.inl).fst := by simp
- have he₂ : c'.inr = e₂.hom ≫ (cones f c.inr).fst := by simp
+ have he₁ : c'.inl = e₁.hom ≫ (cones f c.inl).fst := by simp [e₁]
+ have he₂ : c'.inr = e₂.hom ≫ (cones f c.inr).fst := by simp [e₂]
rw [he₁, he₂]
apply BinaryCofan.isColimitCompRightIso (BinaryCofan.mk _ _)
apply BinaryCofan.isColimitCompLeftIso (BinaryCofan.mk _ _)
@@ -612,7 +612,7 @@ theorem isUniversalColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
apply Functor.hext
· exact fun i ↦ rfl
· rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
- simp
+ simp [F']
have t₁' := @t₁ (Discrete.functor (fun j ↦ F.obj ⟨j.succ⟩))
(Cofan.mk (pullback c₂.inr i) fun j ↦ pullback.lift (α.app _ ≫ c₁.inj _) (c.ι.app _) ?_)
(Discrete.natTrans fun i ↦ α.app _) pullback.fst ?_ (NatTrans.equifibered_of_discrete _) ?_
@@ -687,7 +687,7 @@ theorem isVanKampenColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
apply Functor.hext
· exact fun i ↦ rfl
· rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
- simp
+ simp [F']
clear_value F'
subst this
apply BinaryCofan.IsColimit.mk _ (fun {T} f₁ f₂ ↦ Hc.desc (Cofan.mk T (Fin.cases f₁
@@ -761,7 +761,7 @@ theorem isPullback_initial_to_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {
classical
let f : ι → C := F.obj ∘ Discrete.mk
have : F = Discrete.functor f :=
- Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
convert isPullback_of_cofan_isVanKampen hc i.as j.as
@@ -772,7 +772,7 @@ theorem mono_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {F : Discrete ι
classical
let f : ι → C := F.obj ∘ Discrete.mk
have : F = Discrete.functor f :=
- Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
refine' PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit _)
@@ -491,7 +491,7 @@ theorem FinitaryPreExtensive.isUniversal_finiteCoproducts_Fin [FinitaryPreExtens
{F : Discrete (Fin n) ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsUniversalColimit c := by
let f : Fin n → C := F.obj ∘ Discrete.mk
have : F = Discrete.functor f :=
- Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
induction' n with n IH
@@ -517,7 +517,7 @@ theorem FinitaryExtensive.isVanKampen_finiteCoproducts_Fin [FinitaryExtensive C]
{F : Discrete (Fin n) ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsVanKampenColimit c := by
let f : Fin n → C := F.obj ∘ Discrete.mk
have : F = Discrete.functor f :=
- Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
induction' n with n IH
@@ -545,7 +545,7 @@ lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C]
classical
let f : ι → C := F.obj ∘ Discrete.mk
have : F = Discrete.functor f :=
- Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp [f])
clear_value f
subst this
change Cofan f at c
@@ -565,7 +565,7 @@ lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C]
let e' : c.pt ≅ f i ⨿ (∐ fun j : ({i}ᶜ : Set ι) ↦ f j) :=
hc.coconePointUniqueUpToIso (getColimitCocone _).2 ≪≫ e
have : coprod.inl ≫ e'.inv = c.ι.app ⟨i⟩ := by
- simp only [Iso.trans_inv, coprod.desc_comp, colimit.ι_desc, BinaryCofan.mk_pt,
+ simp only [e', Iso.trans_inv, coprod.desc_comp, colimit.ι_desc, BinaryCofan.mk_pt,
BinaryCofan.ι_app_left, BinaryCofan.mk_inl]
exact colimit.comp_coconePointUniqueUpToIso_inv _ _
clear_value e'
In this pull request, I have systematically eliminated the leading whitespace preceding the colon (:
) within all unlabelled or unclassified porting notes. This adjustment facilitates a more efficient review process for the remaining notes by ensuring no entries are overlooked due to formatting inconsistencies.
@@ -288,7 +288,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) := by
section TopCat
/-- (Implementation) An auxiliary lemma for the proof that `TopCat` is finitary extensive. -/
--- Porting note : needs to add noncomputable modifier
+-- Porting note: needs to add noncomputable modifier
noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
(f : Z ⟶ TopCat.of (Sum PUnit.{u + 1} PUnit.{u + 1})) :
IsColimit (BinaryCofan.mk
@@ -318,7 +318,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
s.inl ⟨(x.1, PUnit.unit), x.2⟩
· ext ⟨x, hx⟩
exact dif_pos hx
- -- Porting note : this `(BinaryCofan.inl s).2` was unnecessary
+ -- Porting note: this `(BinaryCofan.inl s).2` was unnecessary
have := (BinaryCofan.inl s).2
continuity
· convert f.2.1 _ openEmbedding_inl.open_range
@@ -332,7 +332,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
s.inr ⟨(x.1, PUnit.unit), (this _).resolve_left x.2⟩
· ext ⟨x, hx⟩
exact dif_neg hx
- -- Porting note : this `(BinaryCofan.inr s).2` was unnecessary
+ -- Porting note: this `(BinaryCofan.inr s).2` was unnecessary
have := (BinaryCofan.inr s).2
continuity
· convert f.2.1 _ openEmbedding_inr.open_range
@@ -348,7 +348,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
change dite _ _ _ = _
split_ifs with h
· rfl
- · cases (h hx) -- Porting note : in Lean3 it is `rfl`
+ · cases (h hx) -- Porting note: in Lean3 it is `rfl`
· intro s
ext ⟨⟨x, ⟨⟩⟩, hx⟩
change dite _ _ _ = _
This was missing, but essentially what was proved in the analogous statement for Van Kampen colimits.
@@ -112,13 +112,18 @@ theorem IsVanKampenColimit.isUniversal {F : J ⥤ C} {c : Cocone F} (H : IsVanKa
fun _ c' α f h hα => (H c' α f h hα).mpr
#align category_theory.is_van_kampen_colimit.is_universal CategoryTheory.IsVanKampenColimit.isUniversal
-/-- A van Kampen colimit is a colimit. -/
-noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
- (h : IsVanKampenColimit c) : IsColimit c := by
- refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
- (NatTrans.equifibered_of_isIso _)).mpr fun j => _).some
+/-- A universal colimit is a colimit. -/
+noncomputable def IsUniversalColimit.isColimit {F : J ⥤ C} {c : Cocone F}
+ (h : IsUniversalColimit c) : IsColimit c := by
+ refine ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
+ (NatTrans.equifibered_of_isIso _)) fun j => ?_).some
haveI : IsIso (𝟙 c.pt) := inferInstance
exact IsPullback.of_vert_isIso ⟨by erw [NatTrans.id_app, Category.comp_id, Category.id_comp]⟩
+
+/-- A van Kampen colimit is a colimit. -/
+noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
+ (h : IsVanKampenColimit c) : IsColimit c :=
+ h.isUniversal.isColimit
#align category_theory.is_van_kampen_colimit.is_colimit CategoryTheory.IsVanKampenColimit.isColimit
theorem IsInitial.isVanKampenColimit [HasStrictInitialObjects C] {X : C} (h : IsInitial X) :
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -262,8 +262,9 @@ theorem IsVanKampenColimit.whiskerEquivalence {K : Type*} [Category K] (e : J
have : IsIso (𝟙 (Cocone.whisker e.functor c).pt) := inferInstance
exact IsPullback.of_vert_isIso ⟨by simp⟩
· intro H j
- have : α.app j = F'.map (e.unit.app _) ≫ α.app _ ≫ F.map (e.counit.app (e.functor.obj j))
- · simp [← Functor.map_comp]
+ have : α.app j
+ = F'.map (e.unit.app _) ≫ α.app _ ≫ F.map (e.counit.app (e.functor.obj j)) := by
+ simp [← Functor.map_comp]
rw [← Category.id_comp f, this]
refine IsPullback.paste_vert ?_ (H (e.functor.obj j))
exact IsPullback.of_vert_isIso ⟨by simp⟩
@@ -315,23 +316,23 @@ theorem IsUniversalColimit.map_reflective
(IsPullback.of_hasPullback _ _).isLimit⟩⟩
let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
- have hadj : ∀ X, Gl.map (adj.unit.app X) = inv (adj.counit.app _)
- · intro X
+ have hadj : ∀ X, Gl.map (adj.unit.app X) = inv (adj.counit.app _) := by
+ intro X
apply IsIso.eq_inv_of_inv_hom_id
exact adj.left_triangle_components _
haveI : ∀ X, IsIso (Gl.map (adj.unit.app X)) := by
simp_rw [hadj]
infer_instance
- have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j
- · intro j
+ have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j := by
+ intro j
rw [← cancel_mono (adj.counit.app <| F.obj j)]
dsimp
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
have hc'' : ∀ j, α.app j ≫ Gl.map (c.ι.app j) = c'.ι.app j ≫ f := NatTrans.congr_app h
let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
- let c'' : Cocone (F' ⋙ Gr)
- · refine
+ let c'' : Cocone (F' ⋙ Gr) := by
+ refine
{ pt := pullback (Gr.map f) (adj.unit.app _)
ι := { app := λ j ↦ pullback.lift (Gr.map <| c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
naturality := ?_ } }
@@ -352,8 +353,8 @@ theorem IsUniversalColimit.map_reflective
rw [adj.counit_naturality, ← Category.assoc, Gr.map_comp_assoc]
congr 1
exact c.w _
- let cf : (Cocones.precompose β.hom).obj c' ⟶ Gl.mapCocone c''
- · refine { hom := pullback.lift ?_ f ?_ ≫ (PreservesPullback.iso _ _ _).inv, w := ?_ }
+ let cf : (Cocones.precompose β.hom).obj c' ⟶ Gl.mapCocone c'' := by
+ refine { hom := pullback.lift ?_ f ?_ ≫ (PreservesPullback.iso _ _ _).inv, w := ?_ }
exact (inv <| adj.counit.app c'.pt)
· rw [IsIso.inv_comp_eq, ← adj.counit_naturality_assoc f, ← cancel_mono (adj.counit.app <|
Gl.obj c.pt), Category.assoc, Category.assoc, adj.left_triangle_components]
@@ -371,10 +372,10 @@ theorem IsUniversalColimit.map_reflective
· rw [Gl.map_comp, hα'', Category.assoc, hc'']
dsimp
rw [Category.comp_id, Category.assoc]
- have : cf.hom ≫ (PreservesPullback.iso _ _ _).hom ≫ pullback.fst ≫ adj.counit.app _ = 𝟙 _
- · simp only [IsIso.inv_hom_id, Iso.inv_hom_id_assoc, Category.assoc, pullback.lift_fst_assoc]
- have : IsIso cf
- · apply @Cocones.cocone_iso_of_hom_iso (i := ?_)
+ have : cf.hom ≫ (PreservesPullback.iso _ _ _).hom ≫ pullback.fst ≫ adj.counit.app _ = 𝟙 _ := by
+ simp only [IsIso.inv_hom_id, Iso.inv_hom_id_assoc, Category.assoc, pullback.lift_fst_assoc]
+ have : IsIso cf := by
+ apply @Cocones.cocone_iso_of_hom_iso (i := ?_)
rw [← IsIso.eq_comp_inv] at this
rw [this]
infer_instance
@@ -417,8 +418,8 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
intro ⟨hc'⟩ j
let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
- have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j
- · intro j
+ have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j := by
+ intro j
rw [← cancel_mono (adj.counit.app <| F.obj j)]
dsimp
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
@@ -426,13 +427,13 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
let hl := (IsColimit.precomposeHomEquiv β c').symm hc'
let hr := isColimitOfPreserves Gl (colimit.isColimit <| F' ⋙ Gr)
- have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map <| α'.app j)
- · rw [hα'']
+ have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map <| α'.app j) := by
+ rw [hα'']
simp
rw [this]
have : f = (hl.coconePointUniqueUpToIso hr).hom ≫
- Gl.map (colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩)
- · symm
+ Gl.map (colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩) := by
+ symm
convert @IsColimit.coconePointUniqueUpToIso_hom_desc _ _ _ _ ((F' ⋙ Gr) ⋙ Gl)
(Gl.mapCocone ⟨_, (whiskerRight α' Gr ≫ c.2 : _)⟩) _ _ hl hr using 2
· apply hr.hom_ext
@@ -480,8 +481,8 @@ theorem hasStrictInitial_of_isUniversal [HasInitial C]
theorem isVanKampenColimit_of_isEmpty [HasStrictInitialObjects C] [IsEmpty J] {F : J ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by
- have : IsInitial c.pt
- · have := (IsColimit.precomposeInvEquiv (Functor.uniqueFromEmpty _) _).symm
+ have : IsInitial c.pt := by
+ have := (IsColimit.precomposeInvEquiv (Functor.uniqueFromEmpty _) _).symm
(hc.whiskerEquivalence (equivalenceOfIsEmpty (Discrete PEmpty.{1}) J))
exact IsColimit.ofIsoColimit this (Cocones.ext (Iso.refl c.pt) (fun {X} ↦ isEmptyElim X))
replace this := IsInitial.isVanKampenColimit this
@@ -602,8 +603,8 @@ theorem isUniversalColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
IsUniversalColimit (extendCofan c₁ c₂) := by
intro F c α i e hα H
let F' : Fin (n + 1) → C := F.obj ∘ Discrete.mk
- have : F = Discrete.functor F'
- · apply Functor.hext
+ have : F = Discrete.functor F' := by
+ apply Functor.hext
· exact fun i ↦ rfl
· rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
simp
@@ -677,8 +678,8 @@ theorem isVanKampenColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
Category.assoc, extendCofan_pt, Functor.const_obj_obj, NatTrans.comp_app, extendCofan_ι_app,
Fin.cases_succ, Functor.const_map_app] using congr_app e ⟨j.succ⟩
· let F' : Fin (n + 1) → C := F.obj ∘ Discrete.mk
- have : F = Discrete.functor F'
- · apply Functor.hext
+ have : F = Discrete.functor F' := by
+ apply Functor.hext
· exact fun i ↦ rfl
· rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
simp
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -564,8 +564,8 @@ lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C]
exact dif_neg j.prop }
let e' : c.pt ≅ f i ⨿ (∐ fun j : ({i}ᶜ : Set ι) ↦ f j) :=
hc.coconePointUniqueUpToIso (getColimitCocone _).2 ≪≫ e
- have : coprod.inl ≫ e'.inv = c.ι.app ⟨i⟩
- · simp only [Iso.trans_inv, coprod.desc_comp, colimit.ι_desc, BinaryCofan.mk_pt,
+ have : coprod.inl ≫ e'.inv = c.ι.app ⟨i⟩ := by
+ simp only [Iso.trans_inv, coprod.desc_comp, colimit.ι_desc, BinaryCofan.mk_pt,
BinaryCofan.ι_app_left, BinaryCofan.mk_inl]
exact colimit.comp_coconePointUniqueUpToIso_inv _ _
clear_value e'
@@ -606,8 +606,8 @@ lemma FinitaryPreExtensive.sigma_desc_iso [FinitaryPreExtensive C] {α : Type} [
suffices IsColimit (Cofan.mk _ ((fun _ ↦ pullback.fst) : (a : α) → pullback f (π a) ⟶ _)) by
change IsIso (this.coconePointUniqueUpToIso (getColimitCocone _).2).inv
infer_instance
- let : IsColimit (Cofan.mk X π)
- · refine @IsColimit.ofPointIso (t := Cofan.mk X π) (P := coproductIsCoproduct Z) ?_
+ let this : IsColimit (Cofan.mk X π) := by
+ refine @IsColimit.ofPointIso (t := Cofan.mk X π) (P := coproductIsCoproduct Z) ?_
convert hπ
simp [coproductIsCoproduct]
refine (FinitaryPreExtensive.isUniversal_finiteCoproducts this
This PR contains various prerequisites in order to show that under suitable assumptions, a localized category of a category that has finite products also has finite products:
(J → C) ≌ (Discrete J ⥤ C)
C ⥤ (J ⥤ C)
.MorphismProperty.IsStableUnderFiniteProducts
@@ -318,7 +318,7 @@ theorem IsUniversalColimit.map_reflective
have hadj : ∀ X, Gl.map (adj.unit.app X) = inv (adj.counit.app _)
· intro X
apply IsIso.eq_inv_of_inv_hom_id
- exact adj.left_triangle_components
+ exact adj.left_triangle_components _
haveI : ∀ X, IsIso (Gl.map (adj.unit.app X)) := by
simp_rw [hadj]
infer_instance
Now we use letters X and Y for topological spaces, not Greek letters.
I didn't replace all letters; some lemmas need a large number of different letters. Volunteers for the last instances welcome.
@@ -387,7 +387,7 @@ instance finitaryExtensive_TopCat : FinitaryExtensive TopCat.{u} := by
refine' ⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _,
fun {l'} h₁ _ => ContinuousMap.ext fun x =>
hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩
- apply (embedding_inl (α := X') (β := Y')).toInducing.continuous_iff.mpr
+ apply (embedding_inl (X := X') (Y := Y')).toInducing.continuous_iff.mpr
convert s.fst.2 using 1
exact (funext hl).symm
· refine' ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ _⟩⟩
@@ -404,7 +404,7 @@ instance finitaryExtensive_TopCat : FinitaryExtensive TopCat.{u} := by
refine' ⟨⟨l, _⟩, ContinuousMap.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _,
fun {l'} h₁ _ =>
ContinuousMap.ext fun x => hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩
- apply (embedding_inr (α := X') (β := Y')).toInducing.continuous_iff.mpr
+ apply (embedding_inr (X := X') (Y := Y')).toInducing.continuous_iff.mpr
convert s.fst.2 using 1
exact (funext hl).symm
· intro Z f
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
+import Mathlib.CategoryTheory.Adjunction.Limits
import Mathlib.CategoryTheory.Limits.Shapes.CommSq
-import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProducts
$
with <|
(#9319)
See Zulip thread for the discussion.
@@ -322,9 +322,9 @@ theorem IsUniversalColimit.map_reflective
haveI : ∀ X, IsIso (Gl.map (adj.unit.app X)) := by
simp_rw [hadj]
infer_instance
- have hα'' : ∀ j, Gl.map (Gr.map $ α'.app j) = adj.counit.app _ ≫ α.app j
+ have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j
· intro j
- rw [← cancel_mono (adj.counit.app $ F.obj j)]
+ rw [← cancel_mono (adj.counit.app <| F.obj j)]
dsimp
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
@@ -333,7 +333,7 @@ theorem IsUniversalColimit.map_reflective
let c'' : Cocone (F' ⋙ Gr)
· refine
{ pt := pullback (Gr.map f) (adj.unit.app _)
- ι := { app := λ j ↦ pullback.lift (Gr.map $ c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
+ ι := { app := λ j ↦ pullback.lift (Gr.map <| c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
naturality := ?_ } }
· rw [← Gr.map_comp, ← hc'']
erw [← adj.unit_naturality]
@@ -354,8 +354,8 @@ theorem IsUniversalColimit.map_reflective
exact c.w _
let cf : (Cocones.precompose β.hom).obj c' ⟶ Gl.mapCocone c''
· refine { hom := pullback.lift ?_ f ?_ ≫ (PreservesPullback.iso _ _ _).inv, w := ?_ }
- exact (inv $ adj.counit.app c'.pt)
- · rw [IsIso.inv_comp_eq, ← adj.counit_naturality_assoc f, ← cancel_mono (adj.counit.app $
+ exact (inv <| adj.counit.app c'.pt)
+ · rw [IsIso.inv_comp_eq, ← adj.counit_naturality_assoc f, ← cancel_mono (adj.counit.app <|
Gl.obj c.pt), Category.assoc, Category.assoc, adj.left_triangle_components]
erw [Category.comp_id]
rfl
@@ -379,7 +379,7 @@ theorem IsUniversalColimit.map_reflective
rw [this]
infer_instance
have ⟨Hc''⟩ := H c'' (whiskerRight α' Gr) pullback.snd ?_ (hα'.whiskerRight Gr) ?_
- · exact ⟨IsColimit.precomposeHomEquiv β c' $
+ · exact ⟨IsColimit.precomposeHomEquiv β c' <|
(isColimitOfPreserves Gl Hc'').ofIsoColimit (asIso cf).symm⟩
· ext j
dsimp
@@ -417,16 +417,16 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
intro ⟨hc'⟩ j
let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
- have hα'' : ∀ j, Gl.map (Gr.map $ α'.app j) = adj.counit.app _ ≫ α.app j
+ have hα'' : ∀ j, Gl.map (Gr.map <| α'.app j) = adj.counit.app _ ≫ α.app j
· intro j
- rw [← cancel_mono (adj.counit.app $ F.obj j)]
+ rw [← cancel_mono (adj.counit.app <| F.obj j)]
dsimp
simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
let hl := (IsColimit.precomposeHomEquiv β c').symm hc'
- let hr := isColimitOfPreserves Gl (colimit.isColimit $ F' ⋙ Gr)
- have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map $ α'.app j)
+ let hr := isColimitOfPreserves Gl (colimit.isColimit <| F' ⋙ Gr)
+ have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map <| α'.app j)
· rw [hα'']
simp
rw [this]
@@ -448,9 +448,9 @@ theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
congr 1
exact (NatTrans.congr_app h j).symm
rw [this]
- have := ((H (colimit.cocone $ F' ⋙ Gr) (whiskerRight α' Gr)
+ have := ((H (colimit.cocone <| F' ⋙ Gr) (whiskerRight α' Gr)
(colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩) ?_ (hα'.whiskerRight Gr)).mp
- ⟨(getColimitCocone $ F' ⋙ Gr).2⟩ j).map Gl
+ ⟨(getColimitCocone <| F' ⋙ Gr).2⟩ j).map Gl
convert IsPullback.paste_vert _ this
refine IsPullback.of_vert_isIso ⟨?_⟩
rw [← IsIso.inv_comp_eq, ← Category.assoc, NatIso.inv_inv_app]
@@ -729,9 +729,9 @@ theorem isPullback_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {X : ι →
else eqToHom (if_neg h) ≫ initial.to (X j))
(Cofan.inj c i) (Cofan.inj c j) := by
refine (hc (Cofan.mk (X i) (f := fun k ↦ if k = i then X i else ⊥_ C)
- (fun k ↦ if h : k = i then (eqToHom $ if_pos h) else (eqToHom $ if_neg h) ≫ initial.to _))
- (Discrete.natTrans (fun k ↦ if h : k.1 = i then (eqToHom $ (if_pos h).trans
- (congr_arg X h.symm)) else (eqToHom $ if_neg h) ≫ initial.to _))
+ (fun k ↦ if h : k = i then (eqToHom <| if_pos h) else (eqToHom <| if_neg h) ≫ initial.to _))
+ (Discrete.natTrans (fun k ↦ if h : k.1 = i then (eqToHom <| (if_pos h).trans
+ (congr_arg X h.symm)) else (eqToHom <| if_neg h) ≫ initial.to _))
(c.inj i) ?_ (NatTrans.equifibered_of_discrete _)).mp ⟨?_⟩ ⟨j⟩
· ext ⟨k⟩
simp only [Discrete.functor_obj, Functor.const_obj_obj, NatTrans.comp_app,
$
with <|
(#9319)
See Zulip thread for the discussion.
@@ -434,7 +434,7 @@ theorem finitaryExtensive_of_reflective
· rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp
rw [this]
rintro Z ⟨_|_⟩ f <;> dsimp <;> infer_instance
- refine ((FinitaryExtensive.vanKampen _ (colimit.isColimit $ pair X Y ⋙ _)).map_reflective
+ refine ((FinitaryExtensive.vanKampen _ (colimit.isColimit <| pair X Y ⋙ _)).map_reflective
adj).of_iso (IsColimit.uniqueUpToIso ?_ ?_)
· exact isColimitOfPreserves Gl (colimit.isColimit _)
· exact (IsColimit.precomposeHomEquiv _ _).symm hc
@@ -608,8 +608,8 @@ theorem isUniversalColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
· rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
simp
have t₁' := @t₁ (Discrete.functor (fun j ↦ F.obj ⟨j.succ⟩))
- (Cofan.mk (pullback c₂.inr i) <| fun j ↦ pullback.lift (α.app _ ≫ c₁.inj _) (c.ι.app _) ?_)
- (Discrete.natTrans <| fun i ↦ α.app _) pullback.fst ?_ (NatTrans.equifibered_of_discrete _) ?_
+ (Cofan.mk (pullback c₂.inr i) fun j ↦ pullback.lift (α.app _ ≫ c₁.inj _) (c.ι.app _) ?_)
+ (Discrete.natTrans fun i ↦ α.app _) pullback.fst ?_ (NatTrans.equifibered_of_discrete _) ?_
rotate_left
· simpa only [Functor.const_obj_obj, pair_obj_right, Discrete.functor_obj, Category.assoc,
extendCofan_pt, Functor.const_obj_obj, NatTrans.comp_app, extendCofan_ι_app,
@@ -662,8 +662,8 @@ theorem isVanKampenColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
refine ⟨?_, isUniversalColimit_extendCofan f t₁.isUniversal t₂.isUniversal c α i e hα⟩
intro ⟨Hc⟩ ⟨j⟩
have t₂' := (@t₂ (pair (F.obj ⟨0⟩) (∐ fun (j : Fin n) ↦ F.obj ⟨j.succ⟩))
- (BinaryCofan.mk (P := c.pt) (c.ι.app _) (Sigma.desc <| fun b ↦ c.ι.app _))
- (mapPair (α.app _) (Sigma.desc <| fun b ↦ α.app _ ≫ c₁.inj _)) i ?_
+ (BinaryCofan.mk (P := c.pt) (c.ι.app _) (Sigma.desc fun b ↦ c.ι.app _))
+ (mapPair (α.app _) (Sigma.desc fun b ↦ α.app _ ≫ c₁.inj _)) i ?_
(mapPair_equifibered _)).mp ⟨?_⟩
rotate_left
· ext ⟨⟨⟩⟩
@@ -709,7 +709,7 @@ theorem isVanKampenColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
induction' j using Fin.inductionOn with j _
· exact t₂' ⟨WalkingPair.left⟩
· have t₁' := (@t₁ (Discrete.functor (fun j ↦ F.obj ⟨j.succ⟩)) (Cofan.mk _ _) (Discrete.natTrans
- <| fun i ↦ α.app _) (Sigma.desc (fun j ↦ α.app _ ≫ c₁.inj _)) ?_
+ fun i ↦ α.app _) (Sigma.desc (fun j ↦ α.app _ ≫ c₁.inj _)) ?_
(NatTrans.equifibered_of_discrete _)).mp ⟨coproductIsCoproduct _⟩ ⟨j⟩
rotate_left
· ext ⟨j⟩
@@ -553,7 +553,7 @@ lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C]
let e : ∐ f ≅ f i ⨿ (∐ fun j : ({i}ᶜ : Set ι) ↦ f j) :=
{ hom := Sigma.desc (fun j ↦ if h : j = i then eqToHom (congr_arg f h) ≫ coprod.inl else
Sigma.ι (fun j : ({i}ᶜ : Set ι) ↦ f j) ⟨j, h⟩ ≫ coprod.inr)
- inv := coprod.desc (Sigma.ι f i) (Sigma.desc <| fun j ↦ Sigma.ι f j)
+ inv := coprod.desc (Sigma.ι f i) (Sigma.desc fun j ↦ Sigma.ι f j)
hom_inv_id := by aesop_cat
inv_hom_id := by
ext j
@@ -612,7 +612,7 @@ lemma FinitaryPreExtensive.sigma_desc_iso [FinitaryPreExtensive C] {α : Type} [
simp [coproductIsCoproduct]
refine (FinitaryPreExtensive.isUniversal_finiteCoproducts this
(Cofan.mk _ ((fun _ ↦ pullback.fst) : (a : α) → pullback f (π a) ⟶ _))
- (Discrete.natTrans <| fun i ↦ pullback.snd) f ?_
+ (Discrete.natTrans fun i ↦ pullback.snd) f ?_
(NatTrans.equifibered_of_discrete _) ?_).some
· ext
simp [pullback.condition]
@@ -3,13 +3,12 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
+import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Limits.Shapes.CommSq
+import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
-import Mathlib.CategoryTheory.Limits.Shapes.Types
-import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProducts
-import Mathlib.CategoryTheory.Adjunction.FullyFaithful
#align_import category_theory.extensive from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
Only Prop
-values fields should be capitalized, not P
-valued fields where P
is Prop
-valued.
Rather than fixing Nonempty :=
in constructors, I just deleted the line as the instance can almost always be found automatically.
@@ -80,24 +80,24 @@ attribute [instance] PreservesPullbacksOfInclusions.preservesPullbackInl
and binary coproducts are universal. -/
class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
- [HasPullbacksOfInclusions : HasPullbacksOfInclusions C]
+ [hasPullbacksOfInclusions : HasPullbacksOfInclusions C]
/-- In a finitary extensive category, all coproducts are van Kampen-/
universal' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsUniversalColimit c
attribute [instance] FinitaryPreExtensive.hasFiniteCoproducts
-attribute [instance] FinitaryPreExtensive.HasPullbacksOfInclusions
+attribute [instance] FinitaryPreExtensive.hasPullbacksOfInclusions
/-- A category is (finitary) extensive if it has finite coproducts,
and binary coproducts are van Kampen. -/
class FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
- [HasPullbacksOfInclusions : HasPullbacksOfInclusions C]
+ [hasPullbacksOfInclusions : HasPullbacksOfInclusions C]
/-- In a finitary extensive category, all coproducts are van Kampen-/
van_kampen' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c
#align category_theory.finitary_extensive CategoryTheory.FinitaryExtensive
attribute [instance] FinitaryExtensive.hasFiniteCoproducts
-attribute [instance] FinitaryExtensive.HasPullbacksOfInclusions
+attribute [instance] FinitaryExtensive.hasPullbacksOfInclusions
theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by
I've also got a change to make this required, but I'd like to land this first.
@@ -310,7 +310,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
(fun h => s.inl <| eX.symm ⟨x, h⟩) fun h => s.inr <| eY.symm ⟨x, (this x).resolve_left h⟩, _⟩
rw [continuous_iff_continuousAt]
intro x
- by_cases f x = Sum.inl PUnit.unit
+ by_cases h : f x = Sum.inl PUnit.unit
· revert h x
apply (IsOpen.continuousOn_iff _).mp
· rw [continuousOn_iff_continuous_restrict]
@@ -85,7 +85,7 @@ theorem NatTrans.equifibered_of_discrete {ι : Type*} {F G : Discrete ι ⥤ C}
(α : F ⟶ G) : NatTrans.Equifibered α := by
rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩
simp only [Discrete.functor_map_id]
- refine IsPullback.of_horiz_isIso ⟨by rw [Category.id_comp, Category.comp_id]⟩
+ exact IsPullback.of_horiz_isIso ⟨by rw [Category.id_comp, Category.comp_id]⟩
end NatTrans
@@ -77,7 +77,7 @@ class PreservesPullbacksOfInclusions {C : Type*} [Category C] {D : Type*} [Categ
attribute [instance] PreservesPullbacksOfInclusions.preservesPullbackInl
/-- A category is (finitary) pre-extensive if it has finite coproducts,
-and binary coproducts are van Kampen. -/
+and binary coproducts are universal. -/
class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
[HasPullbacksOfInclusions : HasPullbacksOfInclusions C]
@@ -64,7 +64,8 @@ theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H
#align category_theory.nat_trans.equifibered.comp CategoryTheory.NatTrans.Equifibered.comp
theorem NatTrans.Equifibered.whiskerRight {F G : J ⥤ C} {α : F ⟶ G} (hα : Equifibered α)
- (H : C ⥤ D) [PreservesLimitsOfShape WalkingCospan H] : Equifibered (whiskerRight α H) :=
+ (H : C ⥤ D) [∀ (i j : J) (f : j ⟶ i), PreservesLimit (cospan (α.app i) (G.map f)) H] :
+ Equifibered (whiskerRight α H) :=
fun _ _ f => (hα f).map H
#align category_theory.nat_trans.equifibered.whisker_right CategoryTheory.NatTrans.Equifibered.whiskerRight
@@ -192,9 +193,20 @@ theorem IsVanKampenColimit.precompose_isIso_iff {F G : J ⥤ C} (α : F ⟶ G) [
(Cocones.ext (Iso.refl _) (by simp)),
IsVanKampenColimit.precompose_isIso α⟩
+theorem IsUniversalColimit.of_mapCocone (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
+ [PreservesLimitsOfShape WalkingCospan G] [ReflectsColimitsOfShape J G]
+ (hc : IsUniversalColimit (G.mapCocone c)) : IsUniversalColimit c :=
+ fun F' c' α f h hα H ↦
+ ⟨ReflectsColimit.reflects (hc (G.mapCocone c') (whiskerRight α G) (G.map f)
+ (by ext j; simpa using G.congr_map (NatTrans.congr_app h j))
+ (hα.whiskerRight G) (fun j ↦ (H j).map G)).some⟩
+
theorem IsVanKampenColimit.of_mapCocone (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
- [PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
- [PreservesColimitsOfShape J G] [ReflectsColimitsOfShape J G]
+ [∀ (i j : J) (X : C) (f : X ⟶ F.obj j) (g : i ⟶ j), PreservesLimit (cospan f (F.map g)) G]
+ [∀ (i : J) (X : C) (f : X ⟶ c.pt), PreservesLimit (cospan f (c.ι.app i)) G]
+ [ReflectsLimitsOfShape WalkingCospan G]
+ [PreservesColimitsOfShape J G]
+ [ReflectsColimitsOfShape J G]
(H : IsVanKampenColimit (G.mapCocone c)) : IsVanKampenColimit c := by
intro F' c' α f h hα
refine' (Iff.trans _ (H (G.mapCocone c') (whiskerRight α G) (G.map f)
@@ -290,14 +302,18 @@ end Functor
section reflective
theorem IsUniversalColimit.map_reflective
- [HasPullbacks C] [HasPullbacks D]
{Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
- [PreservesLimitsOfShape WalkingCospan Gl] {F : J ⥤ D} {c : Cocone (F ⋙ Gr)}
- (H : IsUniversalColimit c) :
+ {F : J ⥤ D} {c : Cocone (F ⋙ Gr)}
+ (H : IsUniversalColimit c)
+ [∀ X (f : X ⟶ Gl.obj c.pt), HasPullback (Gr.map f) (adj.unit.app c.pt)]
+ [∀ X (f : X ⟶ Gl.obj c.pt), PreservesLimit (cospan (Gr.map f) (adj.unit.app c.pt)) Gl] :
IsUniversalColimit (Gl.mapCocone c) := by
have := adj.rightAdjointPreservesLimits
have : PreservesColimitsOfSize.{u', v'} Gl := adj.leftAdjointPreservesColimits
intros F' c' α f h hα hc'
+ have : HasPullback (Gl.map (Gr.map f)) (Gl.map (adj.unit.app c.pt)) :=
+ ⟨⟨_, isLimitPullbackConeMapOfIsLimit _ pullback.condition
+ (IsPullback.of_hasPullback _ _).isLimit⟩⟩
let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
have hadj : ∀ X, Gl.map (adj.unit.app X) = inv (adj.counit.app _)
@@ -389,10 +405,11 @@ theorem IsUniversalColimit.map_reflective
pullback.lift_snd]
theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
- [HasPullbacks C] [HasPullbacks D]
{Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
- [PreservesLimitsOfShape WalkingCospan Gl]
- {F : J ⥤ D} {c : Cocone (F ⋙ Gr)} (H : IsVanKampenColimit c) :
+ {F : J ⥤ D} {c : Cocone (F ⋙ Gr)} (H : IsVanKampenColimit c)
+ [∀ X (f : X ⟶ Gl.obj c.pt), HasPullback (Gr.map f) (adj.unit.app c.pt)]
+ [∀ X (f : X ⟶ Gl.obj c.pt), PreservesLimit (cospan (Gr.map f) (adj.unit.app c.pt)) Gl]
+ [∀ X i (f : X ⟶ c.pt), PreservesLimit (cospan f (c.ι.app i)) Gl] :
IsVanKampenColimit (Gl.mapCocone c) := by
have := adj.rightAdjointPreservesLimits
have : PreservesColimitsOfSize.{u', v'} Gl := adj.leftAdjointPreservesColimits
@@ -61,26 +61,43 @@ section Extensive
variable {X Y : C}
+/-- A category has pullback of inclusions if it has all pullbacks along coproduct injections. -/
+class HasPullbacksOfInclusions (C : Type u) [Category.{v} C] [HasBinaryCoproducts C] : Prop where
+ [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+
+attribute [instance] HasPullbacksOfInclusions.hasPullbackInl
+
+/--
+A functor preserves pullback of inclusions if it preserves all pullbacks along coproduct injections.
+-/
+class PreservesPullbacksOfInclusions {C : Type*} [Category C] {D : Type*} [Category D]
+ (F : C ⥤ D) [HasBinaryCoproducts C] where
+ [preservesPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), PreservesLimit (cospan coprod.inl f) F]
+
+attribute [instance] PreservesPullbacksOfInclusions.preservesPullbackInl
+
/-- A category is (finitary) pre-extensive if it has finite coproducts,
and binary coproducts are van Kampen. -/
class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
- [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+ [HasPullbacksOfInclusions : HasPullbacksOfInclusions C]
/-- In a finitary extensive category, all coproducts are van Kampen-/
universal' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsUniversalColimit c
-attribute [instance] FinitaryPreExtensive.hasFiniteCoproducts FinitaryPreExtensive.hasPullbackInl
+attribute [instance] FinitaryPreExtensive.hasFiniteCoproducts
+attribute [instance] FinitaryPreExtensive.HasPullbacksOfInclusions
/-- A category is (finitary) extensive if it has finite coproducts,
and binary coproducts are van Kampen. -/
class FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
- [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+ [HasPullbacksOfInclusions : HasPullbacksOfInclusions C]
/-- In a finitary extensive category, all coproducts are van Kampen-/
van_kampen' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c
#align category_theory.finitary_extensive CategoryTheory.FinitaryExtensive
-attribute [instance] FinitaryExtensive.hasFiniteCoproducts FinitaryExtensive.hasPullbackInl
+attribute [instance] FinitaryExtensive.hasFiniteCoproducts
+attribute [instance] FinitaryExtensive.HasPullbacksOfInclusions
theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by
@@ -95,11 +112,14 @@ theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingP
exact FinitaryExtensive.van_kampen' c hc
#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.vanKampen
-namespace FinitaryPreExtensive
+namespace HasPullbacksOfInclusions
+
+instance (priority := 100) [HasBinaryCoproducts C] [HasPullbacks C] :
+ HasPullbacksOfInclusions C := ⟨⟩
-variable [FinitaryPreExtensive C] {X Y Z : C} (f : Z ⟶ X ⨿ Y)
+variable [HasBinaryCoproducts C] [HasPullbacksOfInclusions C] {X Y Z : C} (f : Z ⟶ X ⨿ Y)
-instance hasPullbackInl' :
+instance preservesPullbackInl' :
HasPullback f coprod.inl :=
hasPullback_symmetry _ _
@@ -116,7 +136,35 @@ instance hasPullbackInr :
HasPullback coprod.inr f :=
hasPullback_symmetry _ _
-end FinitaryPreExtensive
+end HasPullbacksOfInclusions
+
+namespace PreservesPullbacksOfInclusions
+
+variable {D : Type*} [Category D] [HasBinaryCoproducts C] (F : C ⥤ D)
+
+noncomputable
+instance (priority := 100) [PreservesLimitsOfShape WalkingCospan F] :
+ PreservesPullbacksOfInclusions F := ⟨⟩
+
+variable [PreservesPullbacksOfInclusions F] {X Y Z : C} (f : Z ⟶ X ⨿ Y)
+
+noncomputable
+instance preservesPullbackInl' :
+ PreservesLimit (cospan f coprod.inl) F :=
+ preservesPullbackSymmetry _ _ _
+
+noncomputable
+instance preservesPullbackInr' :
+ PreservesLimit (cospan f coprod.inr) F := by
+ apply preservesLimitOfIsoDiagram (K₁ := cospan (f ≫ (coprod.braiding X Y).hom) coprod.inl)
+ apply cospanExt (Iso.refl _) (Iso.refl _) (coprod.braiding X Y).symm <;> simp
+
+noncomputable
+instance preservesPullbackInr :
+ PreservesLimit (cospan coprod.inr f) F :=
+ preservesPullbackSymmetry _ _ _
+
+end PreservesPullbacksOfInclusions
instance (priority := 100) FinitaryExtensive.toFinitaryPreExtensive [FinitaryExtensive C] :
FinitaryPreExtensive C :=
@@ -153,7 +201,7 @@ instance (priority := 100) hasStrictInitialObjects_of_finitaryPreExtensive
#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryPreExtensive
theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
- [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+ [HasPullbacksOfInclusions C]
(T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
FinitaryExtensive C ↔ IsVanKampenColimit c₀ := by
refine' ⟨fun H => H.van_kampen' c₀ hc₀, fun H => _⟩
@@ -366,16 +414,26 @@ end TopCat
section Functor
-theorem finitaryExtensive_of_reflective [HasFiniteCoproducts D] [HasPullbacks D]
- [FinitaryExtensive C] [HasPullbacks C]
+theorem finitaryExtensive_of_reflective
+ [HasFiniteCoproducts D] [HasPullbacksOfInclusions D] [FinitaryExtensive C]
{Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
- [PreservesLimitsOfShape WalkingCospan Gl] :
+ [∀ X Y (f : X ⟶ Gl.obj Y), HasPullback (Gr.map f) (adj.unit.app Y)]
+ [∀ X Y (f : X ⟶ Gl.obj Y), PreservesLimit (cospan (Gr.map f) (adj.unit.app Y)) Gl]
+ [PreservesPullbacksOfInclusions Gl] :
FinitaryExtensive D := by
have : PreservesColimitsOfSize Gl := adj.leftAdjointPreservesColimits
constructor
intros X Y c hc
apply (IsVanKampenColimit.precompose_isIso_iff
(isoWhiskerLeft _ (asIso adj.counit) ≪≫ Functor.rightUnitor _).hom).mp
+ have : ∀ (Z : C) (i : Discrete WalkingPair) (f : Z ⟶ (colimit.cocone (pair X Y ⋙ Gr)).pt),
+ PreservesLimit (cospan f ((colimit.cocone (pair X Y ⋙ Gr)).ι.app i)) Gl := by
+ have : pair X Y ⋙ Gr = pair (Gr.obj X) (Gr.obj Y) := by
+ apply Functor.hext
+ · rintro ⟨⟨⟩⟩ <;> rfl
+ · rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp
+ rw [this]
+ rintro Z ⟨_|_⟩ f <;> dsimp <;> infer_instance
refine ((FinitaryExtensive.vanKampen _ (colimit.isColimit $ pair X Y ⋙ _)).map_reflective
adj).of_iso (IsColimit.uniqueUpToIso ?_ ?_)
· exact isColimitOfPreserves Gl (colimit.isColimit _)
@@ -387,12 +445,32 @@ instance finitaryExtensive_functor [HasPullbacks C] [FinitaryExtensive C] :
⟨fun c hc => isVanKampenColimit_of_evaluation _ c fun _ =>
FinitaryExtensive.vanKampen _ <| PreservesColimit.preserves hc⟩
+noncomputable
+instance {C} [Category C] {D} [Category D] (F : C ⥤ D)
+ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [IsIso f] : PreservesLimit (cospan f g) F :=
+ have := hasPullback_of_left_iso f g
+ preservesLimitOfPreservesLimitCone (IsPullback.of_hasPullback f g).isLimit
+ ((isLimitMapConePullbackConeEquiv _ pullback.condition).symm
+ (IsPullback.of_vert_isIso ⟨by simp only [← F.map_comp, pullback.condition]⟩).isLimit)
+
+noncomputable
+instance {C} [Category C] {D} [Category D] (F : C ⥤ D)
+ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [IsIso g] : PreservesLimit (cospan f g) F :=
+ preservesPullbackSymmetry _ _ _
+
theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExtensive D]
- [HasFiniteCoproducts C] [∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
- [PreservesLimitsOfShape WalkingCospan F]
+ [HasFiniteCoproducts C] [HasPullbacksOfInclusions C]
+ [PreservesPullbacksOfInclusions F]
[ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F]
- [ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C :=
- ⟨fun _ hc => (FinitaryExtensive.vanKampen _ (isColimitOfPreserves F hc)).of_mapCocone F⟩
+ [ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C := by
+ constructor
+ intros X Y c hc
+ refine IsVanKampenColimit.of_iso ?_ (hc.uniqueUpToIso (coprodIsCoprod X Y)).symm
+ have (i : Discrete WalkingPair) (Z : C) (f : Z ⟶ X ⨿ Y) :
+ PreservesLimit (cospan f ((BinaryCofan.mk coprod.inl coprod.inr).ι.app i)) F := by
+ rcases i with ⟨_|_⟩ <;> dsimp <;> infer_instance
+ refine (FinitaryExtensive.vanKampen _
+ (isColimitOfPreserves F (coprodIsCoprod X Y))).of_mapCocone F
#align category_theory.finitary_extensive_of_preserves_and_reflects CategoryTheory.finitaryExtensive_of_preserves_and_reflects
theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
@@ -133,6 +133,18 @@ theorem IsInitial.isVanKampenColimit [HasStrictInitialObjects C] {X : C} (h : Is
section Functor
+theorem IsUniversalColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (hc : IsUniversalColimit c)
+ (e : c ≅ c') : IsUniversalColimit c' := by
+ intro F' c'' α f h hα H
+ have : c'.ι ≫ (Functor.const J).map e.inv.hom = c.ι := by
+ ext j
+ exact e.inv.2 j
+ apply hc c'' α (f ≫ e.inv.1) (by rw [Functor.map_comp, ← reassoc_of% h, this]) hα
+ intro j
+ rw [← Category.comp_id (α.app j)]
+ have : IsIso e.inv.hom := Functor.map_isIso (Cocones.forget _) e.inv
+ exact (H j).paste_vert (IsPullback.of_vert_isIso ⟨by simp⟩)
+
theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKampenColimit c)
(e : c ≅ c') : IsVanKampenColimit c' := by
intro F' c'' α f h hα
@@ -162,6 +174,18 @@ theorem IsVanKampenColimit.precompose_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIs
rw [← IsPullback.paste_vert_iff this _, Category.comp_id]
exact (congr_app e j).symm
+theorem IsUniversalColimit.precompose_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α]
+ {c : Cocone G} (hc : IsUniversalColimit c) :
+ IsUniversalColimit ((Cocones.precompose α).obj c) := by
+ intros F' c' α' f e hα H
+ apply (hc c' (α' ≫ α) f ((Category.assoc _ _ _).trans e)
+ (hα.comp (NatTrans.equifibered_of_isIso _)))
+ intro j
+ simp only [Functor.const_obj_obj, NatTrans.comp_app,
+ Cocones.precompose_obj_pt, Cocones.precompose_obj_ι]
+ rw [← Category.comp_id f]
+ exact (H j).paste_vert (IsPullback.of_vert_isIso ⟨Category.comp_id _⟩)
+
theorem IsVanKampenColimit.precompose_isIso_iff {F G : J ⥤ C} (α : F ⟶ G) [IsIso α]
{c : Cocone G} : IsVanKampenColimit ((Cocones.precompose α).obj c) ↔ IsVanKampenColimit c :=
⟨fun hc ↦ IsVanKampenColimit.of_iso (IsVanKampenColimit.precompose_isIso (inv α) hc)
@@ -189,6 +213,28 @@ theorem IsVanKampenColimit.mapCocone_iff (G : C ⥤ D) {F : J ⥤ C} {c : Cocone
refine hc.of_iso (Cocones.ext (G.asEquivalence.unitIso.app c.pt) ?_)
simp [Functor.asEquivalence]⟩
+theorem IsUniversalColimit.whiskerEquivalence {K : Type*} [Category K] (e : J ≌ K)
+ {F : K ⥤ C} {c : Cocone F} (hc : IsUniversalColimit c) :
+ IsUniversalColimit (c.whisker e.functor) := by
+ intro F' c' α f e' hα H
+ convert hc (c'.whisker e.inverse) (whiskerLeft e.inverse α ≫ (e.invFunIdAssoc F).hom) f ?_
+ ((hα.whiskerLeft _).comp (NatTrans.equifibered_of_isIso _)) ?_ using 1
+ · exact (IsColimit.whiskerEquivalenceEquiv e.symm).nonempty_congr
+ · convert congr_arg (whiskerLeft e.inverse) e'
+ ext
+ simp
+ · intro k
+ rw [← Category.comp_id f]
+ refine (H (e.inverse.obj k)).paste_vert ?_
+ have : IsIso (𝟙 (Cocone.whisker e.functor c).pt) := inferInstance
+ exact IsPullback.of_vert_isIso ⟨by simp⟩
+
+theorem IsUniversalColimit.whiskerEquivalence_iff {K : Type*} [Category K] (e : J ≌ K)
+ {F : K ⥤ C} {c : Cocone F} :
+ IsUniversalColimit (c.whisker e.functor) ↔ IsUniversalColimit c :=
+ ⟨fun hc ↦ ((hc.whiskerEquivalence e.symm).precompose_isIso (e.invFunIdAssoc F).inv).of_iso
+ (Cocones.ext (Iso.refl _) (by simp)), IsUniversalColimit.whiskerEquivalence e⟩
+
theorem IsVanKampenColimit.whiskerEquivalence {K : Type*} [Category K] (e : J ≌ K)
{F : K ⥤ C} {c : Cocone F} (hc : IsVanKampenColimit c) :
IsVanKampenColimit (c.whisker e.functor) := by
@@ -659,6 +705,62 @@ theorem isVanKampenColimit_extendCofan {n : ℕ} (f : Fin (n + 1) → C)
BinaryCofan.ι_app_right, BinaryCofan.mk_inr, colimit.ι_desc,
Discrete.natTrans_app] using t₁'.paste_horiz (t₂' ⟨WalkingPair.right⟩)
+theorem isPullback_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {X : ι → C}
+ {c : Cofan X} (hc : IsVanKampenColimit c) (i j : ι) [DecidableEq ι] :
+ IsPullback (P := (if j = i then X i else ⊥_ C))
+ (if h : j = i then eqToHom (if_pos h) else eqToHom (if_neg h) ≫ initial.to (X i))
+ (if h : j = i then eqToHom ((if_pos h).trans (congr_arg X h.symm))
+ else eqToHom (if_neg h) ≫ initial.to (X j))
+ (Cofan.inj c i) (Cofan.inj c j) := by
+ refine (hc (Cofan.mk (X i) (f := fun k ↦ if k = i then X i else ⊥_ C)
+ (fun k ↦ if h : k = i then (eqToHom $ if_pos h) else (eqToHom $ if_neg h) ≫ initial.to _))
+ (Discrete.natTrans (fun k ↦ if h : k.1 = i then (eqToHom $ (if_pos h).trans
+ (congr_arg X h.symm)) else (eqToHom $ if_neg h) ≫ initial.to _))
+ (c.inj i) ?_ (NatTrans.equifibered_of_discrete _)).mp ⟨?_⟩ ⟨j⟩
+ · ext ⟨k⟩
+ simp only [Discrete.functor_obj, Functor.const_obj_obj, NatTrans.comp_app,
+ Discrete.natTrans_app, Cofan.mk_pt, Cofan.mk_ι_app, Functor.const_map_app]
+ split
+ · subst ‹k = i›; rfl
+ · simp
+ · refine mkCofanColimit _ (fun t ↦ (eqToHom (if_pos rfl).symm) ≫ t.inj i) ?_ ?_
+ · intro t j
+ simp only [Cofan.mk_pt, cofan_mk_inj]
+ split
+ · subst ‹j = i›; simp
+ · rw [Category.assoc, ← IsIso.eq_inv_comp]
+ exact initialIsInitial.hom_ext _ _
+ · intro t m hm
+ simp [← hm i]
+
+theorem isPullback_initial_to_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {F : Discrete ι ⥤ C}
+ {c : Cocone F} (hc : IsVanKampenColimit c) (i j : Discrete ι) (hi : i ≠ j) :
+ IsPullback (initial.to _) (initial.to _) (c.ι.app i) (c.ι.app j) := by
+ classical
+ let f : ι → C := F.obj ∘ Discrete.mk
+ have : F = Discrete.functor f :=
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ clear_value f
+ subst this
+ convert isPullback_of_cofan_isVanKampen hc i.as j.as
+ exact (if_neg (mt (Discrete.ext _ _) hi.symm)).symm
+
+theorem mono_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {F : Discrete ι ⥤ C}
+ {c : Cocone F} (hc : IsVanKampenColimit c) (i : Discrete ι) : Mono (c.ι.app i) := by
+ classical
+ let f : ι → C := F.obj ∘ Discrete.mk
+ have : F = Discrete.functor f :=
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ clear_value f
+ subst this
+ refine' PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit _)
+ nth_rw 1 [← Category.id_comp (c.ι.app i)]
+ convert IsPullback.paste_vert _ (isPullback_of_cofan_isVanKampen hc i.as i.as)
+ swap
+ · exact (eqToHom (if_pos rfl).symm)
+ · simp
+ · exact IsPullback.of_vert_isIso ⟨by simp⟩
+
end FiniteCoproducts
end CategoryTheory
@@ -8,6 +8,7 @@ import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
+import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProducts
import Mathlib.CategoryTheory.Limits.VanKampen
#align_import category_theory.extensive from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
@@ -31,7 +32,9 @@ import Mathlib.CategoryTheory.Limits.VanKampen
- `CategoryTheory.FinitaryExtensive_TopCat`:
The category `Top` is extensive.
- `CategoryTheory.FinitaryExtensive_functor`: The category `C ⥤ D` is extensive if `D`
- has all pullbacks and is extensive
+ has all pullbacks and is extensive.
+- `CategoryTheory.FinitaryExtensive.isVanKampen_finiteCoproducts`: Finite coproducts in a
+ finitary extensive category are van Kampen.
## TODO
Show that the following are finitary extensive:
@@ -58,17 +61,26 @@ section Extensive
variable {X Y : C}
-/-- A category is (finitary) extensive if it has finite coproducts,
-and binary coproducts are van Kampen.
+/-- A category is (finitary) pre-extensive if it has finite coproducts,
+and binary coproducts are van Kampen. -/
+class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
+ [hasFiniteCoproducts : HasFiniteCoproducts C]
+ [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+ /-- In a finitary extensive category, all coproducts are van Kampen-/
+ universal' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsUniversalColimit c
-TODO: Show that this is iff all finite coproducts are van Kampen. -/
+attribute [instance] FinitaryPreExtensive.hasFiniteCoproducts FinitaryPreExtensive.hasPullbackInl
+
+/-- A category is (finitary) extensive if it has finite coproducts,
+and binary coproducts are van Kampen. -/
class FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where
[hasFiniteCoproducts : HasFiniteCoproducts C]
+ [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
/-- In a finitary extensive category, all coproducts are van Kampen-/
van_kampen' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c
#align category_theory.finitary_extensive CategoryTheory.FinitaryExtensive
-attribute [instance] FinitaryExtensive.hasFiniteCoproducts
+attribute [instance] FinitaryExtensive.hasFiniteCoproducts FinitaryExtensive.hasPullbackInl
theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C}
(c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by
@@ -83,6 +95,33 @@ theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingP
exact FinitaryExtensive.van_kampen' c hc
#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.vanKampen
+namespace FinitaryPreExtensive
+
+variable [FinitaryPreExtensive C] {X Y Z : C} (f : Z ⟶ X ⨿ Y)
+
+instance hasPullbackInl' :
+ HasPullback f coprod.inl :=
+ hasPullback_symmetry _ _
+
+instance hasPullbackInr' :
+ HasPullback f coprod.inr := by
+ have : IsPullback (𝟙 _) (f ≫ (coprod.braiding X Y).hom) f (coprod.braiding Y X).hom :=
+ IsPullback.of_horiz_isIso ⟨by simp⟩
+ have := (IsPullback.of_hasPullback (f ≫ (coprod.braiding X Y).hom) coprod.inl).paste_horiz this
+ simp only [coprod.braiding_hom, Category.comp_id, colimit.ι_desc, BinaryCofan.mk_pt,
+ BinaryCofan.ι_app_left, BinaryCofan.mk_inl] at this
+ exact ⟨⟨⟨_, this.isLimit⟩⟩⟩
+
+instance hasPullbackInr :
+ HasPullback coprod.inr f :=
+ hasPullback_symmetry _ _
+
+end FinitaryPreExtensive
+
+instance (priority := 100) FinitaryExtensive.toFinitaryPreExtensive [FinitaryExtensive C] :
+ FinitaryPreExtensive C :=
+ ⟨fun c hc ↦ (FinitaryExtensive.van_kampen' c hc).isUniversal⟩
+
theorem FinitaryExtensive.mono_inr_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
(hc : IsColimit c) : Mono c.inr :=
BinaryCofan.mono_inr_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
@@ -105,18 +144,19 @@ theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C
BinaryCofan.isPullback_initial_to_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan
-instance (priority := 100) hasStrictInitialObjects_of_finitaryExtensive [FinitaryExtensive C] :
- HasStrictInitialObjects C :=
- hasStrictInitial_of_isUniversal (FinitaryExtensive.vanKampen _
+instance (priority := 100) hasStrictInitialObjects_of_finitaryPreExtensive
+ [FinitaryPreExtensive C] : HasStrictInitialObjects C :=
+ hasStrictInitial_of_isUniversal (FinitaryPreExtensive.universal' _
((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr (by
dsimp
- infer_instance)).some).isUniversal
-#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryExtensive
+ infer_instance)).some)
+#align category_theory.has_strict_initial_objects_of_finitary_extensive CategoryTheory.hasStrictInitialObjects_of_finitaryPreExtensive
theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
+ [hasPullbackInl : ∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
(T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
FinitaryExtensive C ↔ IsVanKampenColimit c₀ := by
- refine' ⟨fun H => H.2 c₀ hc₀, fun H => _⟩
+ refine' ⟨fun H => H.van_kampen' c₀ hc₀, fun H => _⟩
constructor
simp_rw [BinaryCofan.isVanKampen_iff] at H ⊢
intro X Y c hc X' Y' c' αX αY f hX hY
@@ -348,7 +388,8 @@ instance finitaryExtensive_functor [HasPullbacks C] [FinitaryExtensive C] :
FinitaryExtensive.vanKampen _ <| PreservesColimit.preserves hc⟩
theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExtensive D]
- [HasFiniteCoproducts C] [PreservesLimitsOfShape WalkingCospan F]
+ [HasFiniteCoproducts C] [∀ {X Y Z : C} (f : Z ⟶ X ⨿ Y), HasPullback coprod.inl f]
+ [PreservesLimitsOfShape WalkingCospan F]
[ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F]
[ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C :=
⟨fun _ hc => (FinitaryExtensive.vanKampen _ (isColimitOfPreserves F hc)).of_mapCocone F⟩
@@ -366,6 +407,141 @@ theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [F
end Functor
+section FiniteCoproducts
+
+theorem FinitaryPreExtensive.isUniversal_finiteCoproducts_Fin [FinitaryPreExtensive C] {n : ℕ}
+ {F : Discrete (Fin n) ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsUniversalColimit c := by
+ let f : Fin n → C := F.obj ∘ Discrete.mk
+ have : F = Discrete.functor f :=
+ Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ clear_value f
+ subst this
+ induction' n with n IH
+ · exact (isVanKampenColimit_of_isEmpty _ hc).isUniversal
+ · apply IsUniversalColimit.of_iso _
+ ((extendCofanIsColimit f (coproductIsCoproduct _) (coprodIsCoprod _ _)).uniqueUpToIso hc)
+ apply @isUniversalColimit_extendCofan _ _ _ _ _ _ _ _ ?_
+ · apply IH
+ exact coproductIsCoproduct _
+ · apply FinitaryPreExtensive.universal'
+ exact coprodIsCoprod _ _
+ · dsimp
+ infer_instance
+
+theorem FinitaryPreExtensive.isUniversal_finiteCoproducts [FinitaryPreExtensive C] {ι : Type*}
+ [Finite ι] {F : Discrete ι ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsUniversalColimit c := by
+ obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin ι
+ apply (IsUniversalColimit.whiskerEquivalence_iff (Discrete.equivalence e).symm).mp
+ apply FinitaryPreExtensive.isUniversal_finiteCoproducts_Fin
+ exact (IsColimit.whiskerEquivalenceEquiv (Discrete.equivalence e).symm) hc
+
+theorem FinitaryExtensive.isVanKampen_finiteCoproducts_Fin [FinitaryExtensive C] {n : ℕ}
+ {F : Discrete (Fin n) ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsVanKampenColimit c := by
+ let f : Fin n → C := F.obj ∘ Discrete.mk
+ have : F = Discrete.functor f :=
+ Functor.hext (fun _ ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ clear_value f
+ subst this
+ induction' n with n IH
+ · exact isVanKampenColimit_of_isEmpty _ hc
+ · apply IsVanKampenColimit.of_iso _
+ ((extendCofanIsColimit f (coproductIsCoproduct _) (coprodIsCoprod _ _)).uniqueUpToIso hc)
+ apply @isVanKampenColimit_extendCofan _ _ _ _ _ _ _ _ ?_
+ · apply IH
+ exact coproductIsCoproduct _
+ · apply FinitaryExtensive.van_kampen'
+ exact coprodIsCoprod _ _
+ · dsimp
+ infer_instance
+
+theorem FinitaryExtensive.isVanKampen_finiteCoproducts [FinitaryExtensive C] {ι : Type*}
+ [Finite ι] {F : Discrete ι ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsVanKampenColimit c := by
+ obtain ⟨n, ⟨e⟩⟩ := Finite.exists_equiv_fin ι
+ apply (IsVanKampenColimit.whiskerEquivalence_iff (Discrete.equivalence e).symm).mp
+ apply FinitaryExtensive.isVanKampen_finiteCoproducts_Fin
+ exact (IsColimit.whiskerEquivalenceEquiv (Discrete.equivalence e).symm) hc
+
+lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C] {ι : Type*}
+ [Finite ι] {F : Discrete ι ⥤ C} {c : Cocone F} (hc : IsColimit c) (i : Discrete ι) {X : C}
+ (g : X ⟶ _) : HasPullback g (c.ι.app i) := by
+ classical
+ let f : ι → C := F.obj ∘ Discrete.mk
+ have : F = Discrete.functor f :=
+ Functor.hext (fun i ↦ rfl) (by rintro ⟨i⟩ ⟨j⟩ ⟨⟨rfl : i = j⟩⟩; simp)
+ clear_value f
+ subst this
+ change Cofan f at c
+ obtain ⟨i⟩ := i
+ let e : ∐ f ≅ f i ⨿ (∐ fun j : ({i}ᶜ : Set ι) ↦ f j) :=
+ { hom := Sigma.desc (fun j ↦ if h : j = i then eqToHom (congr_arg f h) ≫ coprod.inl else
+ Sigma.ι (fun j : ({i}ᶜ : Set ι) ↦ f j) ⟨j, h⟩ ≫ coprod.inr)
+ inv := coprod.desc (Sigma.ι f i) (Sigma.desc <| fun j ↦ Sigma.ι f j)
+ hom_inv_id := by aesop_cat
+ inv_hom_id := by
+ ext j
+ · simp
+ · simp only [coprod.desc_comp, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app,
+ eqToHom_refl, Category.id_comp, dite_true, BinaryCofan.mk_pt, BinaryCofan.ι_app_right,
+ BinaryCofan.mk_inr, colimit.ι_desc_assoc, Discrete.functor_obj, Category.comp_id]
+ exact dif_neg j.prop }
+ let e' : c.pt ≅ f i ⨿ (∐ fun j : ({i}ᶜ : Set ι) ↦ f j) :=
+ hc.coconePointUniqueUpToIso (getColimitCocone _).2 ≪≫ e
+ have : coprod.inl ≫ e'.inv = c.ι.app ⟨i⟩
+ · simp only [Iso.trans_inv, coprod.desc_comp, colimit.ι_desc, BinaryCofan.mk_pt,
+ BinaryCofan.ι_app_left, BinaryCofan.mk_inl]
+ exact colimit.comp_coconePointUniqueUpToIso_inv _ _
+ clear_value e'
+ rw [← this]
+ have : IsPullback (𝟙 _) (g ≫ e'.hom) g e'.inv := IsPullback.of_horiz_isIso ⟨by simp⟩
+ exact ⟨⟨⟨_, ((IsPullback.of_hasPullback (g ≫ e'.hom) coprod.inl).paste_horiz this).isLimit⟩⟩⟩
+
+lemma FinitaryExtensive.mono_ι [FinitaryExtensive C] {ι : Type*} [Finite ι] {F : Discrete ι ⥤ C}
+ {c : Cocone F} (hc : IsColimit c) (i : Discrete ι) :
+ Mono (c.ι.app i) :=
+ mono_of_cofan_isVanKampen (isVanKampen_finiteCoproducts hc) _
+
+instance [FinitaryExtensive C] {ι : Type*} [Finite ι] (X : ι → C) (i : ι) :
+ Mono (Sigma.ι X i) :=
+ FinitaryExtensive.mono_ι (coproductIsCoproduct _) ⟨i⟩
+
+lemma FinitaryExtensive.isPullback_initial_to [FinitaryExtensive C]
+ {ι : Type*} [Finite ι] {F : Discrete ι ⥤ C}
+ {c : Cocone F} (hc : IsColimit c) (i j : Discrete ι) (e : i ≠ j) :
+ IsPullback (initial.to _) (initial.to _) (c.ι.app i) (c.ι.app j) :=
+ isPullback_initial_to_of_cofan_isVanKampen (isVanKampen_finiteCoproducts hc) i j e
+
+lemma FinitaryExtensive.isPullback_initial_to_sigma_ι [FinitaryExtensive C] {ι : Type*} [Finite ι]
+ (X : ι → C) (i j : ι) (e : i ≠ j) :
+ IsPullback (initial.to _) (initial.to _) (Sigma.ι X i) (Sigma.ι X j) :=
+ FinitaryExtensive.isPullback_initial_to (coproductIsCoproduct _) ⟨i⟩ ⟨j⟩
+ (ne_of_apply_ne Discrete.as e)
+
+instance FinitaryPreExtensive.hasPullbacks_of_inclusions [FinitaryPreExtensive C] {X Z : C}
+ {α : Type*} (f : X ⟶ Z) {Y : (a : α) → C} (i : (a : α) → Y a ⟶ Z) [Finite α]
+ [hi : IsIso (Sigma.desc i)] (a : α) : HasPullback f (i a) := by
+ apply FinitaryPreExtensive.hasPullbacks_of_is_coproduct (c := Cofan.mk Z i)
+ exact @IsColimit.ofPointIso (t := Cofan.mk Z i) (P := _) hi
+
+lemma FinitaryPreExtensive.sigma_desc_iso [FinitaryPreExtensive C] {α : Type} [Finite α] {X : C}
+ {Z : α → C} (π : (a : α) → Z a ⟶ X) {Y : C} (f : Y ⟶ X) (hπ : IsIso (Sigma.desc π)) :
+ IsIso (Sigma.desc ((fun _ ↦ pullback.fst) : (a : α) → pullback f (π a) ⟶ _)) := by
+ suffices IsColimit (Cofan.mk _ ((fun _ ↦ pullback.fst) : (a : α) → pullback f (π a) ⟶ _)) by
+ change IsIso (this.coconePointUniqueUpToIso (getColimitCocone _).2).inv
+ infer_instance
+ let : IsColimit (Cofan.mk X π)
+ · refine @IsColimit.ofPointIso (t := Cofan.mk X π) (P := coproductIsCoproduct Z) ?_
+ convert hπ
+ simp [coproductIsCoproduct]
+ refine (FinitaryPreExtensive.isUniversal_finiteCoproducts this
+ (Cofan.mk _ ((fun _ ↦ pullback.fst) : (a : α) → pullback f (π a) ⟶ _))
+ (Discrete.natTrans <| fun i ↦ pullback.snd) f ?_
+ (NatTrans.equifibered_of_discrete _) ?_).some
+ · ext
+ simp [pullback.condition]
+ · exact fun j ↦ IsPullback.of_hasPullback f (π j.as)
+
+end FiniteCoproducts
+
end Extensive
end CategoryTheory
Port of https://github.com/leanprover-community/mathlib/pull/17637
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
@@ -9,6 +9,7 @@ import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProducts
+import Mathlib.CategoryTheory.Adjunction.FullyFaithful
#align_import category_theory.extensive from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
@@ -25,7 +26,7 @@ import Mathlib.CategoryTheory.Limits.Constructions.FiniteProductsOfBinaryProduct
## References
- https://ncatlab.org/nlab/show/van+Kampen+colimit
-- *Adhesive categories*, Stephen Lack and Paweł Sobociński
+- [Stephen Lack and Paweł Sobociński, Adhesive Categories][adhesive2004]
-/
@@ -240,6 +241,164 @@ theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J
end Functor
+section reflective
+
+theorem IsUniversalColimit.map_reflective
+ [HasPullbacks C] [HasPullbacks D]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ [PreservesLimitsOfShape WalkingCospan Gl] {F : J ⥤ D} {c : Cocone (F ⋙ Gr)}
+ (H : IsUniversalColimit c) :
+ IsUniversalColimit (Gl.mapCocone c) := by
+ have := adj.rightAdjointPreservesLimits
+ have : PreservesColimitsOfSize.{u', v'} Gl := adj.leftAdjointPreservesColimits
+ intros F' c' α f h hα hc'
+ let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
+ have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
+ have hadj : ∀ X, Gl.map (adj.unit.app X) = inv (adj.counit.app _)
+ · intro X
+ apply IsIso.eq_inv_of_inv_hom_id
+ exact adj.left_triangle_components
+ haveI : ∀ X, IsIso (Gl.map (adj.unit.app X)) := by
+ simp_rw [hadj]
+ infer_instance
+ have hα'' : ∀ j, Gl.map (Gr.map $ α'.app j) = adj.counit.app _ ≫ α.app j
+ · intro j
+ rw [← cancel_mono (adj.counit.app $ F.obj j)]
+ dsimp
+ simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
+ Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
+ have hc'' : ∀ j, α.app j ≫ Gl.map (c.ι.app j) = c'.ι.app j ≫ f := NatTrans.congr_app h
+ let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
+ let c'' : Cocone (F' ⋙ Gr)
+ · refine
+ { pt := pullback (Gr.map f) (adj.unit.app _)
+ ι := { app := λ j ↦ pullback.lift (Gr.map $ c'.ι.app j) (Gr.map (α'.app j) ≫ c.ι.app j) ?_
+ naturality := ?_ } }
+ · rw [← Gr.map_comp, ← hc'']
+ erw [← adj.unit_naturality]
+ rw [Gl.map_comp, hα'']
+ dsimp
+ simp only [Category.assoc, Functor.map_comp, adj.right_triangle_components_assoc]
+ · intros i j g
+ dsimp
+ ext
+ all_goals simp only [Category.comp_id, Category.id_comp, Category.assoc,
+ ← Functor.map_comp, pullback.lift_fst, pullback.lift_snd, ← Functor.map_comp_assoc]
+ · congr 1
+ exact c'.w _
+ · rw [α.naturality_assoc]
+ dsimp
+ rw [adj.counit_naturality, ← Category.assoc, Gr.map_comp_assoc]
+ congr 1
+ exact c.w _
+ let cf : (Cocones.precompose β.hom).obj c' ⟶ Gl.mapCocone c''
+ · refine { hom := pullback.lift ?_ f ?_ ≫ (PreservesPullback.iso _ _ _).inv, w := ?_ }
+ exact (inv $ adj.counit.app c'.pt)
+ · rw [IsIso.inv_comp_eq, ← adj.counit_naturality_assoc f, ← cancel_mono (adj.counit.app $
+ Gl.obj c.pt), Category.assoc, Category.assoc, adj.left_triangle_components]
+ erw [Category.comp_id]
+ rfl
+ · intro j
+ rw [← Category.assoc, Iso.comp_inv_eq]
+ ext
+ all_goals simp only [PreservesPullback.iso_hom_fst, PreservesPullback.iso_hom_snd,
+ pullback.lift_fst, pullback.lift_snd, Category.assoc,
+ Functor.mapCocone_ι_app, ← Gl.map_comp]
+ · rw [IsIso.comp_inv_eq, adj.counit_naturality]
+ dsimp
+ rw [Category.comp_id]
+ · rw [Gl.map_comp, hα'', Category.assoc, hc'']
+ dsimp
+ rw [Category.comp_id, Category.assoc]
+ have : cf.hom ≫ (PreservesPullback.iso _ _ _).hom ≫ pullback.fst ≫ adj.counit.app _ = 𝟙 _
+ · simp only [IsIso.inv_hom_id, Iso.inv_hom_id_assoc, Category.assoc, pullback.lift_fst_assoc]
+ have : IsIso cf
+ · apply @Cocones.cocone_iso_of_hom_iso (i := ?_)
+ rw [← IsIso.eq_comp_inv] at this
+ rw [this]
+ infer_instance
+ have ⟨Hc''⟩ := H c'' (whiskerRight α' Gr) pullback.snd ?_ (hα'.whiskerRight Gr) ?_
+ · exact ⟨IsColimit.precomposeHomEquiv β c' $
+ (isColimitOfPreserves Gl Hc'').ofIsoColimit (asIso cf).symm⟩
+ · ext j
+ dsimp
+ simp only [Category.comp_id, Category.id_comp, Category.assoc,
+ Functor.map_comp, pullback.lift_snd]
+ · intro j
+ apply IsPullback.of_right _ _ (IsPullback.of_hasPullback _ _)
+ · dsimp
+ simp only [Category.comp_id, Category.id_comp, Category.assoc, Functor.map_comp,
+ pullback.lift_fst]
+ rw [← Category.comp_id (Gr.map f)]
+ refine ((hc' j).map Gr).paste_vert (IsPullback.of_vert_isIso ⟨?_⟩)
+ rw [← adj.unit_naturality, Category.comp_id, ← Category.assoc,
+ ← Category.id_comp (Gr.map ((Gl.mapCocone c).ι.app j))]
+ congr 1
+ rw [← cancel_mono (Gr.map (adj.counit.app (F.obj j)))]
+ dsimp
+ simp only [Category.comp_id, Adjunction.right_triangle_components, Category.id_comp,
+ Category.assoc]
+ · dsimp
+ simp only [Category.comp_id, Category.id_comp, Category.assoc, Functor.map_comp,
+ pullback.lift_snd]
+
+theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
+ [HasPullbacks C] [HasPullbacks D]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ [PreservesLimitsOfShape WalkingCospan Gl]
+ {F : J ⥤ D} {c : Cocone (F ⋙ Gr)} (H : IsVanKampenColimit c) :
+ IsVanKampenColimit (Gl.mapCocone c) := by
+ have := adj.rightAdjointPreservesLimits
+ have : PreservesColimitsOfSize.{u', v'} Gl := adj.leftAdjointPreservesColimits
+ intro F' c' α f h hα
+ refine ⟨?_, H.isUniversal.map_reflective adj c' α f h hα⟩
+ intro ⟨hc'⟩ j
+ let α' := α ≫ (Functor.associator _ _ _).hom ≫ whiskerLeft F adj.counit ≫ F.rightUnitor.hom
+ have hα' : NatTrans.Equifibered α' := hα.comp (NatTrans.equifibered_of_isIso _)
+ have hα'' : ∀ j, Gl.map (Gr.map $ α'.app j) = adj.counit.app _ ≫ α.app j
+ · intro j
+ rw [← cancel_mono (adj.counit.app $ F.obj j)]
+ dsimp
+ simp only [Category.comp_id, Adjunction.counit_naturality_assoc, Category.id_comp,
+ Adjunction.counit_naturality, Category.assoc, Functor.map_comp]
+ let β := isoWhiskerLeft F' (asIso adj.counit) ≪≫ F'.rightUnitor
+ let hl := (IsColimit.precomposeHomEquiv β c').symm hc'
+ let hr := isColimitOfPreserves Gl (colimit.isColimit $ F' ⋙ Gr)
+ have : α.app j = β.inv.app _ ≫ Gl.map (Gr.map $ α'.app j)
+ · rw [hα'']
+ simp
+ rw [this]
+ have : f = (hl.coconePointUniqueUpToIso hr).hom ≫
+ Gl.map (colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩)
+ · symm
+ convert @IsColimit.coconePointUniqueUpToIso_hom_desc _ _ _ _ ((F' ⋙ Gr) ⋙ Gl)
+ (Gl.mapCocone ⟨_, (whiskerRight α' Gr ≫ c.2 : _)⟩) _ _ hl hr using 2
+ · apply hr.hom_ext
+ intro j
+ rw [hr.fac, Functor.mapCocone_ι_app, ← Gl.map_comp, colimit.cocone_ι, colimit.ι_desc]
+ rfl
+ · clear_value α'
+ apply hl.hom_ext
+ intro j
+ rw [hl.fac]
+ dsimp
+ simp only [Category.comp_id, hα'', Category.assoc, Gl.map_comp]
+ congr 1
+ exact (NatTrans.congr_app h j).symm
+ rw [this]
+ have := ((H (colimit.cocone $ F' ⋙ Gr) (whiskerRight α' Gr)
+ (colimit.desc _ ⟨_, whiskerRight α' Gr ≫ c.2⟩) ?_ (hα'.whiskerRight Gr)).mp
+ ⟨(getColimitCocone $ F' ⋙ Gr).2⟩ j).map Gl
+ convert IsPullback.paste_vert _ this
+ refine IsPullback.of_vert_isIso ⟨?_⟩
+ rw [← IsIso.inv_comp_eq, ← Category.assoc, NatIso.inv_inv_app]
+ exact IsColimit.comp_coconePointUniqueUpToIso_hom hl hr _
+ · clear_value α'
+ ext j
+ simp
+
+end reflective
+
section Initial
theorem hasStrictInitial_of_isUniversal [HasInitial C]
Port of https://github.com/leanprover-community/mathlib/pull/17637
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
@@ -28,11 +28,13 @@ import Mathlib.CategoryTheory.Limits.VanKampen
- `CategoryTheory.BinaryCofan.isPullback_initial_to_of_isVanKampen`: In extensive categories,
sums are disjoint, i.e. the pullback of `X ⟶ X ⨿ Y` and `Y ⟶ X ⨿ Y` is the initial object.
- `CategoryTheory.types.finitaryExtensive`: The category of types is extensive.
-
+- `CategoryTheory.FinitaryExtensive_TopCat`:
+ The category `Top` is extensive.
+- `CategoryTheory.FinitaryExtensive_functor`: The category `C ⥤ D` is extensive if `D`
+ has all pullbacks and is extensive
## TODO
Show that the following are finitary extensive:
-- the categories of sheaves over a site
- `Scheme`
- `AffineScheme` (`CommRingᵒᵖ`)
@@ -47,9 +49,10 @@ open CategoryTheory.Limits
namespace CategoryTheory
-universe v' u' v u
+universe v' u' v u v'' u''
variable {J : Type v'} [Category.{u'} J] {C : Type u} [Category.{v} C]
+variable {D : Type u''} [Category.{v''} D]
section Extensive
@@ -275,7 +278,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
set_option linter.uppercaseLean3 false in
#align category_theory.finitary_extensive_Top_aux CategoryTheory.finitaryExtensiveTopCatAux
-instance : FinitaryExtensive TopCat.{u} := by
+instance finitaryExtensive_TopCat : FinitaryExtensive TopCat.{u} := by
rw [finitaryExtensive_iff_of_isTerminal TopCat.{u} _ TopCat.isTerminalPUnit _
(TopCat.binaryCofanIsColimit _ _)]
apply BinaryCofan.isVanKampen_mk _ _ (fun X Y => TopCat.binaryCofanIsColimit X Y) _
@@ -323,11 +326,23 @@ end TopCat
section Functor
-universe v'' u''
-
-variable {D : Type u''} [Category.{v''} D]
-
-instance [HasPullbacks C] [FinitaryExtensive C] : FinitaryExtensive (D ⥤ C) :=
+theorem finitaryExtensive_of_reflective [HasFiniteCoproducts D] [HasPullbacks D]
+ [FinitaryExtensive C] [HasPullbacks C]
+ {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Full Gr] [Faithful Gr]
+ [PreservesLimitsOfShape WalkingCospan Gl] :
+ FinitaryExtensive D := by
+ have : PreservesColimitsOfSize Gl := adj.leftAdjointPreservesColimits
+ constructor
+ intros X Y c hc
+ apply (IsVanKampenColimit.precompose_isIso_iff
+ (isoWhiskerLeft _ (asIso adj.counit) ≪≫ Functor.rightUnitor _).hom).mp
+ refine ((FinitaryExtensive.vanKampen _ (colimit.isColimit $ pair X Y ⋙ _)).map_reflective
+ adj).of_iso (IsColimit.uniqueUpToIso ?_ ?_)
+ · exact isColimitOfPreserves Gl (colimit.isColimit _)
+ · exact (IsColimit.precomposeHomEquiv _ _).symm hc
+
+instance finitaryExtensive_functor [HasPullbacks C] [FinitaryExtensive C] :
+ FinitaryExtensive (D ⥤ C) :=
haveI : HasFiniteCoproducts (D ⥤ C) := ⟨fun _ => Limits.functorCategoryHasColimitsOfShape⟩
⟨fun c hc => isVanKampenColimit_of_evaluation _ c fun _ =>
FinitaryExtensive.vanKampen _ <| PreservesColimit.preserves hc⟩
Also moves the definition of van Kampen colimits from CategoryTheory/Extensive.lean
into a new file.
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Also moves the definition of van Kampen colimits from CategoryTheory/Extensive.lean
into a new file.
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -8,6 +8,7 @@ import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
+import Mathlib.CategoryTheory.Limits.VanKampen
#align_import category_theory.extensive from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
@@ -16,9 +17,6 @@ import Mathlib.CategoryTheory.Limits.FunctorCategory
# Extensive categories
## Main definitions
-- `CategoryTheory.IsVanKampenColimit`: A (colimit) cocone over a diagram `F : J ⥤ C` is van
- Kampen if for every cocone `c'` over the pullback of the diagram `F' : J ⥤ C'`,
- `c'` is colimiting iff `c'` is the pullback of `c`.
- `CategoryTheory.FinitaryExtensive`: A category is (finitary) extensive if it has finite
coproducts, and binary coproducts are van Kampen.
@@ -53,70 +51,6 @@ universe v' u' v u
variable {J : Type v'} [Category.{u'} J] {C : Type u} [Category.{v} C]
-/-- A natural transformation is equifibered if every commutative square of the following form is
-a pullback.
-```
-F(X) → F(Y)
- ↓ ↓
-G(X) → G(Y)
-```
--/
-def NatTrans.Equifibered {F G : J ⥤ C} (α : F ⟶ G) : Prop :=
- ∀ ⦃i j : J⦄ (f : i ⟶ j), IsPullback (F.map f) (α.app i) (α.app j) (G.map f)
-#align category_theory.nat_trans.equifibered CategoryTheory.NatTrans.Equifibered
-
-theorem NatTrans.equifibered_of_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α] : Equifibered α :=
- fun _ _ f => IsPullback.of_vert_isIso ⟨NatTrans.naturality _ f⟩
-#align category_theory.nat_trans.equifibered_of_is_iso CategoryTheory.NatTrans.equifibered_of_isIso
-
-theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H} (hα : Equifibered α)
- (hβ : Equifibered β) : Equifibered (α ≫ β) :=
- fun _ _ f => (hα f).paste_vert (hβ f)
-#align category_theory.nat_trans.equifibered.comp CategoryTheory.NatTrans.Equifibered.comp
-
-/-- A (colimit) cocone over a diagram `F : J ⥤ C` is universal if it is stable under pullbacks. -/
-def IsUniversalColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
- ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.pt ⟶ c.pt)
- (_ : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (_ : NatTrans.Equifibered α),
- (∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)) → Nonempty (IsColimit c')
-#align category_theory.is_universal_colimit CategoryTheory.IsUniversalColimit
-
-/-- A (colimit) cocone over a diagram `F : J ⥤ C` is van Kampen if for every cocone `c'` over the
-pullback of the diagram `F' : J ⥤ C'`, `c'` is colimiting iff `c'` is the pullback of `c`.
-
-TODO: Show that this is iff the functor `C ⥤ Catᵒᵖ` sending `x` to `C/x` preserves it.
-TODO: Show that this is iff the inclusion functor `C ⥤ Span(C)` preserves it.
--/
-def IsVanKampenColimit {F : J ⥤ C} (c : Cocone F) : Prop :=
- ∀ ⦃F' : J ⥤ C⦄ (c' : Cocone F') (α : F' ⟶ F) (f : c'.pt ⟶ c.pt)
- (_ : α ≫ c.ι = c'.ι ≫ (Functor.const J).map f) (_ : NatTrans.Equifibered α),
- Nonempty (IsColimit c') ↔ ∀ j : J, IsPullback (c'.ι.app j) (α.app j) f (c.ι.app j)
-#align category_theory.is_van_kampen_colimit CategoryTheory.IsVanKampenColimit
-
-theorem IsVanKampenColimit.isUniversal {F : J ⥤ C} {c : Cocone F} (H : IsVanKampenColimit c) :
- IsUniversalColimit c :=
- fun _ c' α f h hα => (H c' α f h hα).mpr
-#align category_theory.is_van_kampen_colimit.is_universal CategoryTheory.IsVanKampenColimit.isUniversal
-
-/-- A van Kampen colimit is a colimit. -/
-noncomputable def IsVanKampenColimit.isColimit {F : J ⥤ C} {c : Cocone F}
- (h : IsVanKampenColimit c) : IsColimit c := by
- refine' ((h c (𝟙 F) (𝟙 c.pt : _) (by rw [Functor.map_id, Category.comp_id, Category.id_comp])
- (NatTrans.equifibered_of_isIso _)).mpr fun j => _).some
- haveI : IsIso (𝟙 c.pt) := inferInstance
- exact IsPullback.of_vert_isIso ⟨by erw [NatTrans.id_app, Category.comp_id, Category.id_comp]⟩
-#align category_theory.is_van_kampen_colimit.is_colimit CategoryTheory.IsVanKampenColimit.isColimit
-
-theorem IsInitial.isVanKampenColimit [HasStrictInitialObjects C] {X : C} (h : IsInitial X) :
- IsVanKampenColimit (asEmptyCocone X) := by
- intro F' c' α f hf hα
- have : F' = Functor.empty C := by apply Functor.hext <;> rintro ⟨⟨⟩⟩
- subst this
- haveI := h.isIso_to f
- refine' ⟨by rintro _ ⟨⟨⟩⟩,
- fun _ => ⟨IsColimit.ofIsoColimit h (Cocones.ext (asIso f).symm <| by rintro ⟨⟨⟩⟩)⟩⟩
-#align category_theory.is_initial.is_van_kampen_colimit CategoryTheory.IsInitial.isVanKampenColimit
-
section Extensive
variable {X Y : C}
@@ -146,98 +80,6 @@ theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingP
exact FinitaryExtensive.van_kampen' c hc
#align category_theory.finitary_extensive.van_kampen CategoryTheory.FinitaryExtensive.vanKampen
-theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
- NatTrans.Equifibered α := by
- rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
- all_goals
- dsimp; simp only [Discrete.functor_map_id]
- exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩
-#align category_theory.map_pair_equifibered CategoryTheory.mapPair_equifibered
-
-theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
- IsVanKampenColimit c ↔
- ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt)
- (_ : αX ≫ c.inl = c'.inl ≫ f) (_ : αY ≫ c.inr = c'.inr ≫ f),
- Nonempty (IsColimit c') ↔ IsPullback c'.inl αX f c.inl ∧ IsPullback c'.inr αY f c.inr := by
- constructor
- · introv H hαX hαY
- rw [H c' (mapPair αX αY) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> assumption) (mapPair_equifibered _)]
- constructor
- · intro H
- exact ⟨H _, H _⟩
- · rintro H ⟨⟨⟩⟩
- exacts [H.1, H.2]
- · introv H F' hα h
- let X' := F'.obj ⟨WalkingPair.left⟩
- let Y' := F'.obj ⟨WalkingPair.right⟩
- have : F' = pair X' Y' := by
- apply Functor.hext
- · rintro ⟨⟨⟩⟩ <;> rfl
- · rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp
- clear_value X' Y'
- subst this
- change BinaryCofan X' Y' at c'
- rw [H c' _ _ _ (NatTrans.congr_app hα ⟨WalkingPair.left⟩)
- (NatTrans.congr_app hα ⟨WalkingPair.right⟩)]
- constructor
- · rintro H ⟨⟨⟩⟩
- exacts [H.1, H.2]
- · intro H
- exact ⟨H _, H _⟩
-#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.isVanKampen_iff
-
-theorem BinaryCofan.isVanKampen_mk {X Y : C} (c : BinaryCofan X Y)
- (cofans : ∀ X Y : C, BinaryCofan X Y) (colimits : ∀ X Y, IsColimit (cofans X Y))
- (cones : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), PullbackCone f g)
- (limits : ∀ {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z), IsLimit (cones f g))
- (h₁ : ∀ {X' Y' : C} (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : (cofans X' Y').pt ⟶ c.pt)
- (_ : αX ≫ c.inl = (cofans X' Y').inl ≫ f) (_ : αY ≫ c.inr = (cofans X' Y').inr ≫ f),
- IsPullback (cofans X' Y').inl αX f c.inl ∧ IsPullback (cofans X' Y').inr αY f c.inr)
- (h₂ : ∀ {Z : C} (f : Z ⟶ c.pt),
- IsColimit (BinaryCofan.mk (cones f c.inl).fst (cones f c.inr).fst)) :
- IsVanKampenColimit c := by
- rw [BinaryCofan.isVanKampen_iff]
- introv hX hY
- constructor
- · rintro ⟨h⟩
- let e := h.coconePointUniqueUpToIso (colimits _ _)
- obtain ⟨hl, hr⟩ := h₁ αX αY (e.inv ≫ f) (by simp [hX]) (by simp [hY])
- constructor
- · rw [← Category.id_comp αX, ← Iso.hom_inv_id_assoc e f]
- haveI : IsIso (𝟙 X') := inferInstance
- have : c'.inl ≫ e.hom = 𝟙 X' ≫ (cofans X' Y').inl := by
- dsimp
- simp
- exact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hl
- · rw [← Category.id_comp αY, ← Iso.hom_inv_id_assoc e f]
- haveI : IsIso (𝟙 Y') := inferInstance
- have : c'.inr ≫ e.hom = 𝟙 Y' ≫ (cofans X' Y').inr := by
- dsimp
- simp
- exact (IsPullback.of_vert_isIso ⟨this⟩).paste_vert hr
- · rintro ⟨H₁, H₂⟩
- refine' ⟨IsColimit.ofIsoColimit _ <| (isoBinaryCofanMk _).symm⟩
- let e₁ : X' ≅ _ := H₁.isLimit.conePointUniqueUpToIso (limits _ _)
- let e₂ : Y' ≅ _ := H₂.isLimit.conePointUniqueUpToIso (limits _ _)
- have he₁ : c'.inl = e₁.hom ≫ (cones f c.inl).fst := by simp
- have he₂ : c'.inr = e₂.hom ≫ (cones f c.inr).fst := by simp
- rw [he₁, he₂]
- apply BinaryCofan.isColimitCompRightIso (BinaryCofan.mk _ _)
- apply BinaryCofan.isColimitCompLeftIso (BinaryCofan.mk _ _)
- exact h₂ f
-#align category_theory.binary_cofan.is_van_kampen_mk CategoryTheory.BinaryCofan.isVanKampen_mk
-
-theorem BinaryCofan.mono_inr_of_isVanKampen [HasInitial C] {X Y : C} {c : BinaryCofan X Y}
- (h : IsVanKampenColimit c) : Mono c.inr := by
- refine' PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit _)
- refine' (h (BinaryCofan.mk (initial.to Y) (𝟙 Y)) (mapPair (initial.to X) (𝟙 Y)) c.inr _
- (mapPair_equifibered _)).mp ⟨_⟩ ⟨WalkingPair.right⟩
- · ext ⟨⟨⟩⟩ <;> dsimp; simp
- · exact ((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr (by
- dsimp
- infer_instance)).some
-#align category_theory.binary_cofan.mono_inr_of_is_van_kampen CategoryTheory.BinaryCofan.mono_inr_of_isVanKampen
-
theorem FinitaryExtensive.mono_inr_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
(hc : IsColimit c) : Mono c.inr :=
BinaryCofan.mono_inr_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
@@ -254,37 +96,12 @@ instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inl : X ⟶ X ⨿ Y) :=
instance [FinitaryExtensive C] (X Y : C) : Mono (coprod.inr : Y ⟶ X ⨿ Y) :=
(FinitaryExtensive.mono_inr_of_isColimit (coprodIsCoprod X Y) : _)
-theorem BinaryCofan.isPullback_initial_to_of_isVanKampen [HasInitial C] {c : BinaryCofan X Y}
- (h : IsVanKampenColimit c) : IsPullback (initial.to _) (initial.to _) c.inl c.inr := by
- refine' ((h (BinaryCofan.mk (initial.to Y) (𝟙 Y)) (mapPair (initial.to X) (𝟙 Y)) c.inr _
- (mapPair_equifibered _)).mp ⟨_⟩ ⟨WalkingPair.left⟩).flip
- · ext ⟨⟨⟩⟩ <;> dsimp; simp
- · exact ((BinaryCofan.isColimit_iff_isIso_inr initialIsInitial _).mpr (by
- dsimp
- infer_instance)).some
-#align category_theory.binary_cofan.is_pullback_initial_to_of_is_van_kampen CategoryTheory.BinaryCofan.isPullback_initial_to_of_isVanKampen
-
theorem FinitaryExtensive.isPullback_initial_to_binaryCofan [FinitaryExtensive C]
{c : BinaryCofan X Y} (hc : IsColimit c) :
IsPullback (initial.to _) (initial.to _) c.inl c.inr :=
BinaryCofan.isPullback_initial_to_of_isVanKampen (FinitaryExtensive.vanKampen c hc)
#align category_theory.finitary_extensive.is_pullback_initial_to_binary_cofan CategoryTheory.FinitaryExtensive.isPullback_initial_to_binaryCofan
-theorem hasStrictInitial_of_isUniversal [HasInitial C]
- (H : IsUniversalColimit (BinaryCofan.mk (𝟙 (⊥_ C)) (𝟙 (⊥_ C)))) : HasStrictInitialObjects C :=
- hasStrictInitialObjects_of_initial_is_strict
- (by
- intro A f
- suffices IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A)) by
- obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)
- rcases (Category.id_comp _).symm.trans h₂ with rfl
- exact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩
- refine' (H (BinaryCofan.mk (𝟙 _) (𝟙 _)) (mapPair f f) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> simp)
- (mapPair_equifibered _) _).some
- rintro ⟨⟨⟩⟩ <;> dsimp <;>
- exact IsPullback.of_horiz_isIso ⟨(Category.id_comp _).trans (Category.comp_id _).symm⟩)
-#align category_theory.has_strict_initial_of_is_universal CategoryTheory.hasStrictInitial_of_isUniversal
-
instance (priority := 100) hasStrictInitialObjects_of_finitaryExtensive [FinitaryExtensive C] :
HasStrictInitialObjects C :=
hasStrictInitial_of_isUniversal (FinitaryExtensive.vanKampen _
@@ -510,57 +327,6 @@ universe v'' u''
variable {D : Type u''} [Category.{v''} D]
-theorem NatTrans.Equifibered.whiskerRight {F G : J ⥤ C} {α : F ⟶ G} (hα : Equifibered α)
- (H : C ⥤ D) [PreservesLimitsOfShape WalkingCospan H] : Equifibered (whiskerRight α H) :=
- fun _ _ f => (hα f).map H
-#align category_theory.nat_trans.equifibered.whisker_right CategoryTheory.NatTrans.Equifibered.whiskerRight
-
-theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKampenColimit c)
- (e : c ≅ c') : IsVanKampenColimit c' := by
- intro F' c'' α f h hα
- have : c'.ι ≫ (Functor.const J).map e.inv.hom = c.ι := by
- ext j
- exact e.inv.2 j
- rw [H c'' α (f ≫ e.inv.1) (by rw [Functor.map_comp, ← reassoc_of% h, this]) hα]
- apply forall_congr'
- intro j
- conv_lhs => rw [← Category.comp_id (α.app j)]
- haveI : IsIso e.inv.hom := Functor.map_isIso (Cocones.forget _) e.inv
- exact (IsPullback.of_vert_isIso ⟨by simp⟩).paste_vert_iff (NatTrans.congr_app h j).symm
-#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
-
-theorem IsVanKampenColimit.of_map {D : Type*} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
- [PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
- [PreservesColimitsOfShape J G] [ReflectsColimitsOfShape J G]
- (H : IsVanKampenColimit (G.mapCocone c)) : IsVanKampenColimit c := by
- intro F' c' α f h hα
- refine' (Iff.trans _ (H (G.mapCocone c') (whiskerRight α G) (G.map f)
- (by ext j; simpa using G.congr_map (NatTrans.congr_app h j))
- (hα.whiskerRight G))).trans (forall_congr' fun j => _)
- · exact ⟨fun h => ⟨isColimitOfPreserves G h.some⟩, fun h => ⟨isColimitOfReflects G h.some⟩⟩
- · exact IsPullback.map_iff G (NatTrans.congr_app h.symm j)
-#align category_theory.is_van_kampen_colimit.of_map CategoryTheory.IsVanKampenColimit.of_map
-
-theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J D] (F : J ⥤ C ⥤ D)
- (c : Cocone F) (hc : ∀ x : C, IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)) :
- IsVanKampenColimit c := by
- intro F' c' α f e hα
- have := fun x => hc x (((evaluation C D).obj x).mapCocone c') (whiskerRight α _)
- (((evaluation C D).obj x).map f)
- (by
- ext y
- dsimp
- exact NatTrans.congr_app (NatTrans.congr_app e y) x)
- (hα.whiskerRight _)
- constructor
- · rintro ⟨hc'⟩ j
- refine' ⟨⟨(NatTrans.congr_app e j).symm⟩, ⟨evaluationJointlyReflectsLimits _ _⟩⟩
- refine' fun x => (isLimitMapConePullbackConeEquiv _ _).symm _
- exact ((this x).mp ⟨PreservesColimit.preserves hc'⟩ _).isLimit
- · exact fun H => ⟨evaluationJointlyReflectsColimits _ fun x =>
- ((this x).mpr fun j => (H j).map ((evaluation C D).obj x)).some⟩
-#align category_theory.is_van_kampen_colimit_of_evaluation CategoryTheory.isVanKampenColimit_of_evaluation
-
instance [HasPullbacks C] [FinitaryExtensive C] : FinitaryExtensive (D ⥤ C) :=
haveI : HasFiniteCoproducts (D ⥤ C) := ⟨fun _ => Limits.functorCategoryHasColimitsOfShape⟩
⟨fun c hc => isVanKampenColimit_of_evaluation _ c fun _ =>
@@ -570,7 +336,7 @@ theorem finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExten
[HasFiniteCoproducts C] [PreservesLimitsOfShape WalkingCospan F]
[ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F]
[ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C :=
- ⟨fun _ hc => (FinitaryExtensive.vanKampen _ (isColimitOfPreserves F hc)).of_map F⟩
+ ⟨fun _ hc => (FinitaryExtensive.vanKampen _ (isColimitOfPreserves F hc)).of_mapCocone F⟩
#align category_theory.finitary_extensive_of_preserves_and_reflects CategoryTheory.finitaryExtensive_of_preserves_and_reflects
theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
rcases
, convert
and congrm
(#7725)
Replace rcases(
with rcases (
. Same thing for convert(
and congrm(
. No other change.
@@ -277,7 +277,7 @@ theorem hasStrictInitial_of_isUniversal [HasInitial C]
intro A f
suffices IsColimit (BinaryCofan.mk (𝟙 A) (𝟙 A)) by
obtain ⟨l, h₁, h₂⟩ := Limits.BinaryCofan.IsColimit.desc' this (f ≫ initial.to A) (𝟙 A)
- rcases(Category.id_comp _).symm.trans h₂ with rfl
+ rcases (Category.id_comp _).symm.trans h₂ with rfl
exact ⟨⟨_, ((Category.id_comp _).symm.trans h₁).symm, initialIsInitial.hom_ext _ _⟩⟩
refine' (H (BinaryCofan.mk (𝟙 _) (𝟙 _)) (mapPair f f) f (by ext ⟨⟨⟩⟩ <;> dsimp <;> simp)
(mapPair_equifibered _) _).some
@@ -518,14 +518,14 @@ theorem NatTrans.Equifibered.whiskerRight {F G : J ⥤ C} {α : F ⟶ G} (hα :
theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKampenColimit c)
(e : c ≅ c') : IsVanKampenColimit c' := by
intro F' c'' α f h hα
- have : c'.ι ≫ (Functor.const J).map e.inv.Hom = c.ι := by
+ have : c'.ι ≫ (Functor.const J).map e.inv.hom = c.ι := by
ext j
exact e.inv.2 j
rw [H c'' α (f ≫ e.inv.1) (by rw [Functor.map_comp, ← reassoc_of% h, this]) hα]
apply forall_congr'
intro j
conv_lhs => rw [← Category.comp_id (α.app j)]
- haveI : IsIso e.inv.Hom := Functor.map_isIso (Cocones.forget _) e.inv
+ haveI : IsIso e.inv.hom := Functor.map_isIso (Cocones.forget _) e.inv
exact (IsPullback.of_vert_isIso ⟨by simp⟩).paste_vert_iff (NatTrans.congr_app h j).symm
#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -529,7 +529,7 @@ theorem IsVanKampenColimit.of_iso {F : J ⥤ C} {c c' : Cocone F} (H : IsVanKamp
exact (IsPullback.of_vert_isIso ⟨by simp⟩).paste_vert_iff (NatTrans.congr_app h j).symm
#align category_theory.is_van_kampen_colimit.of_iso CategoryTheory.IsVanKampenColimit.of_iso
-theorem IsVanKampenColimit.of_map {D : Type _} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
+theorem IsVanKampenColimit.of_map {D : Type*} [Category D] (G : C ⥤ D) {F : J ⥤ C} {c : Cocone F}
[PreservesLimitsOfShape WalkingCospan G] [ReflectsLimitsOfShape WalkingCospan G]
[PreservesColimitsOfShape J G] [ReflectsColimitsOfShape J G]
(H : IsVanKampenColimit (G.mapCocone c)) : IsVanKampenColimit c := by
@@ -2,11 +2,6 @@
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-
-! This file was ported from Lean 3 source module category_theory.extensive
-! leanprover-community/mathlib commit 178a32653e369dce2da68dc6b2694e385d484ef1
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.CategoryTheory.Limits.Shapes.CommSq
import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
@@ -14,6 +9,8 @@ import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
import Mathlib.CategoryTheory.Limits.FunctorCategory
+#align_import category_theory.extensive from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1"
+
/-!
# Extensive categories
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -442,8 +442,8 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
ext ⟨⟨x, ⟨⟩⟩, (hx : f x = Sum.inl PUnit.unit)⟩
change dite _ _ _ = _
split_ifs with h
- . rfl
- . cases (h hx) -- Porting note : in Lean3 it is `rfl`
+ · rfl
+ · cases (h hx) -- Porting note : in Lean3 it is `rfl`
· intro s
ext ⟨⟨x, ⟨⟩⟩, hx⟩
change dite _ _ _ = _
at
and goals (#5387)
Changes are of the form
some_tactic at h⊢
-> some_tactic at h ⊢
some_tactic at h
-> some_tactic at h
@@ -301,7 +301,7 @@ theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFi
FinitaryExtensive C ↔ IsVanKampenColimit c₀ := by
refine' ⟨fun H => H.2 c₀ hc₀, fun H => _⟩
constructor
- simp_rw [BinaryCofan.isVanKampen_iff] at H⊢
+ simp_rw [BinaryCofan.isVanKampen_iff] at H ⊢
intro X Y c hc X' Y' c' αX αY f hX hY
obtain ⟨d, hd, hd'⟩ :=
Limits.BinaryCofan.IsColimit.desc' hc (HT.from _ ≫ c₀.inl) (HT.from _ ≫ c₀.inr)
@@ -326,7 +326,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) := by
cases' h : s.fst x with val val
· simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inl.injEq,
exists_unique_eq']
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαY val : _).symm
delta ExistsUnique at this
choose l hl hl' using this
@@ -337,7 +337,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) := by
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases' h : s.fst x with val val
- · apply_fun f at h
+ · apply_fun f at h
cases ((congr_fun s.condition x).symm.trans h).trans (congr_fun hαX val : _).symm
· simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inr.injEq,
exists_unique_eq']
@@ -474,7 +474,7 @@ instance : FinitaryExtensive TopCat.{u} := by
intro x
cases' h : s.fst x with val val
· exact ⟨val, rfl, fun y h => Sum.inl_injective h.symm⟩
- · apply_fun f at h
+ · apply_fun f at h
cases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans
(ConcreteCategory.congr_hom hαY val : _).symm
delta ExistsUnique at this
@@ -490,7 +490,7 @@ instance : FinitaryExtensive TopCat.{u} := by
have : ∀ x, ∃! y, s.fst x = Sum.inr y := by
intro x
cases' h : s.fst x with val val
- · apply_fun f at h
+ · apply_fun f at h
cases ((ConcreteCategory.congr_hom s.condition x).symm.trans h).trans
(ConcreteCategory.congr_hom hαX val : _).symm
· exact ⟨val, rfl, fun y h => Sum.inr_injective h.symm⟩
@@ -169,7 +169,7 @@ theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
· intro H
exact ⟨H _, H _⟩
· rintro H ⟨⟨⟩⟩
- exacts[H.1, H.2]
+ exacts [H.1, H.2]
· introv H F' hα h
let X' := F'.obj ⟨WalkingPair.left⟩
let Y' := F'.obj ⟨WalkingPair.right⟩
@@ -184,7 +184,7 @@ theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
(NatTrans.congr_app hα ⟨WalkingPair.right⟩)]
constructor
· rintro H ⟨⟨⟩⟩
- exacts[H.1, H.2]
+ exacts [H.1, H.2]
· intro H
exact ⟨H _, H _⟩
#align category_theory.binary_cofan.is_van_kampen_iff CategoryTheory.BinaryCofan.isVanKampen_iff
@@ -351,7 +351,7 @@ instance types.finitaryExtensive : FinitaryExtensive (Type u) := by
have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by
intro x
rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)
- exacts[Or.inl rfl, Or.inr rfl]
+ exacts [Or.inl rfl, Or.inr rfl]
let eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, by convert p.2⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext; rfl,
fun _ => by ext; rfl⟩
@@ -392,7 +392,7 @@ noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by
intro x
rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)
- exacts[Or.inl rfl, Or.inr rfl]
+ exacts [Or.inl rfl, Or.inr rfl]
letI eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩,
fun x => ⟨⟨_, PUnit.unit⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩
The unported dependencies are