fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
noncomputable equivSmallModel (C : Type u) [Category.{v} C] [EssentiallySmall.{w} C] : C ≌ SmallModel C := Nonempty.some (Classical.choose_spec (Classical.choose_spec (@EssentiallySmall.equiv_smallCategory C _ _)))
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
equivSmallModel
The (noncomputable) categorical equivalence between an essentially small category and its small model.
essentiallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D] (e : C ≌ D) : EssentiallySmall.{w} C ↔ EssentiallySmall.{w} D := by fconstructor · rintro ⟨S, 𝒮, ⟨f⟩⟩ exact EssentiallySmall.mk' (e.symm.trans f) · rintro ⟨S, 𝒮, ⟨f⟩⟩ exact EssentiallySmall.mk' (e.trans f)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_congr
null
Discrete.essentiallySmallOfSmall {α : Type u} [Small.{w} α] : EssentiallySmall.{w} (Discrete α) := ⟨⟨Discrete (Shrink α), ⟨inferInstance, ⟨Discrete.equivalence (equivShrink _)⟩⟩⟩⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
Discrete.essentiallySmallOfSmall
null
essentiallySmallSelf : EssentiallySmall.{max w v u} C := EssentiallySmall.mk' (AsSmall.equiv : C ≌ AsSmall.{w} C)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmallSelf
null
@[pp_with_univ] LocallySmall (C : Type u) [Category.{v} C] : Prop where /-- A locally small category has small hom-types. -/ hom_small : ∀ X Y : C, Small.{w} (X ⟶ Y) := by infer_instance
class
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
LocallySmall
A category is `w`-locally small if every hom set is `w`-small. See `ShrinkHoms C` for a category instance where every hom set has been replaced by a small model.
locallySmall_of_faithful {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D] (F : C ⥤ D) [F.Faithful] [LocallySmall.{w} D] : LocallySmall.{w} C where hom_small {_ _} := small_of_injective F.map_injective
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
locallySmall_of_faithful
null
locallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D] (e : C ≌ D) : LocallySmall.{w} C ↔ LocallySmall.{w} D := ⟨fun _ => locallySmall_of_faithful e.inverse, fun _ => locallySmall_of_faithful e.functor⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
locallySmall_congr
null
locallySmall_max {C : Type u} [Category.{v} C] : LocallySmall.{max v w} C where hom_small _ _ := small_max.{w} _
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
locallySmall_max
null
@[pp_with_univ] ShrinkHoms (C : Type u) := C
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
ShrinkHoms
We define a type alias `ShrinkHoms C` for `C`. When we have `LocallySmall.{w} C`, we'll put a `Category.{w}` instance on `ShrinkHoms C`.
toShrinkHoms {C' : Type*} (X : C') : ShrinkHoms C' := X
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
toShrinkHoms
Help the typechecker by explicitly translating from `C` to `ShrinkHoms C`.
fromShrinkHoms {C' : Type*} (X : ShrinkHoms C') : C' := X @[simp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
fromShrinkHoms
Help the typechecker by explicitly translating from `ShrinkHoms C` to `C`.
to_from (X : C') : fromShrinkHoms (toShrinkHoms X) = X := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
to_from
null
from_to (X : ShrinkHoms C') : toShrinkHoms (fromShrinkHoms X) = X := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
from_to
null
@[simps] noncomputable functor : C ⥤ ShrinkHoms C where obj X := toShrinkHoms X map {X Y} f := equivShrink (X ⟶ Y) f
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
functor
Implementation of `ShrinkHoms.equivalence`.
@[simps] noncomputable inverse : ShrinkHoms C ⥤ C where obj X := fromShrinkHoms X map {X Y} f := (equivShrink (fromShrinkHoms X ⟶ fromShrinkHoms Y)).symm f
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
inverse
Implementation of `ShrinkHoms.equivalence`.
@[simps] noncomputable equivalence : C ≌ ShrinkHoms C where functor := functor C inverse := inverse C unitIso := NatIso.ofComponents (fun _ ↦ Iso.refl _) counitIso := NatIso.ofComponents (fun _ ↦ Iso.refl _)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
equivalence
The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
noncomputable equivalence [Small.{w} C] : C ≌ Shrink.{w} C := (Equivalence.induced _).symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
equivalence
The categorical equivalence between `C` and `Shrink C`, when `C` is small.
essentiallySmall_iff (C : Type u) [Category.{v} C] : EssentiallySmall.{w} C ↔ Small.{w} (Skeleton C) ∧ LocallySmall.{w} C := by fconstructor · intro h fconstructor · rcases h with ⟨S, 𝒮, ⟨e⟩⟩ refine ⟨⟨Skeleton S, ⟨?_⟩⟩⟩ exact e.skeletonEquiv · infer_instance · rintro ⟨⟨S, ⟨e⟩⟩, L⟩ let e' := (ShrinkHoms.equivalence C).skeletonEquiv.symm letI : Category S := InducedCategory.category (e'.trans e).symm refine ⟨⟨S, this, ⟨?_⟩⟩⟩ refine (ShrinkHoms.equivalence C).trans <| (skeletonEquivalence (ShrinkHoms C)).symm.trans ((inducedFunctor (e'.trans e).symm).asEquivalence.symm)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_iff
A category is essentially small if and only if the underlying type of its skeleton (i.e. the "set" of isomorphism classes) is small, and it is locally small.
essentiallySmall_of_small_of_locallySmall [Small.{w} C] [LocallySmall.{w} C] : EssentiallySmall.{w} C := (essentiallySmall_iff C).2 ⟨small_of_surjective Quotient.exists_rep, by infer_instance⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_of_small_of_locallySmall
null
small_skeleton_of_essentiallySmall [h : EssentiallySmall.{w} C] : Small.{w} (Skeleton C) := essentiallySmall_iff C |>.1 h |>.1 variable {C} in
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
small_skeleton_of_essentiallySmall
null
essentiallySmall_of_fully_faithful {D : Type u'} [Category.{v'} D] (F : C ⥤ D) [F.Full] [F.Faithful] [EssentiallySmall.{w} D] : EssentiallySmall.{w} C := (essentiallySmall_iff C).2 ⟨small_of_injective F.mapSkeleton_injective, locallySmall_of_faithful F⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_of_fully_faithful
null
locallySmall_fullSubcategory [LocallySmall.{w} C] (P : ObjectProperty C) : LocallySmall.{w} P.FullSubcategory := locallySmall_of_faithful <| P.ι
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
locallySmall_fullSubcategory
null
essentiallySmall_fullSubcategory_mem (s : Set C) [Small.{w} s] [LocallySmall.{w} C] : EssentiallySmall.{w} (ObjectProperty.FullSubcategory (· ∈ s)) := suffices Small.{w} (ObjectProperty.FullSubcategory (· ∈ s)) from essentiallySmall_of_small_of_locallySmall _ small_of_injective (f := fun x => (⟨x.1, x.2⟩ : s)) (by cat_disch)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_fullSubcategory_mem
null
essentiallySmall_iff_of_thin {C : Type u} [Category.{v} C] [Quiver.IsThin C] : EssentiallySmall.{w} C ↔ Small.{w} (Skeleton C) := by simp [essentiallySmall_iff, CategoryTheory.locallySmall_of_thin]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Category.ULift", "Mathlib.CategoryTheory.EqToHom", "Mathlib.CategoryTheory.Skeletal", "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.Logic.UnivLE", "Mathlib.Logic.Small.Basic" ]
Mathlib/CategoryTheory/EssentiallySmall.lean
essentiallySmall_iff_of_thin
Any thin category is locally small. -/ instance (priority := 100) locallySmall_of_thin {C : Type u} [Category.{v} C] [Quiver.IsThin C] : LocallySmall.{w} C where /-- A thin category is essentially small if and only if the underlying type of its skeleton is small.
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
class
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
HasPullbacksOfInclusions
A category has pullback of inclusions if it has all pullbacks along coproduct injections.
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
class
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
PreservesPullbacksOfInclusions
A functor preserves pullback of inclusions if it preserves all pullbacks along coproduct injections.
FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where [hasFiniteCoproducts : HasFiniteCoproducts 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
class
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive
A category is (finitary) pre-extensive if it has finite coproducts, and binary coproducts are universal.
FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where [hasFiniteCoproducts : HasFiniteCoproducts 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 attribute [instance] FinitaryExtensive.hasFiniteCoproducts attribute [instance] FinitaryExtensive.hasPullbacksOfInclusions
class
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive
A category is (finitary) extensive if it has finite coproducts, and binary coproducts are van Kampen.
FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair ⥤ C} (c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by 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 [X, Y] clear_value X Y subst this exact FinitaryExtensive.van_kampen' c hc
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.vanKampen
null
preservesPullbackInl' : HasPullback f coprod.inl := hasPullback_symmetry _ _
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
preservesPullbackInl'
null
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
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
hasPullbackInr'
null
hasPullbackInr : HasPullback coprod.inr f := hasPullback_symmetry _ _
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
hasPullbackInr
null
noncomputable preservesPullbackInl' : PreservesLimit (cospan f coprod.inl) F := preservesPullback_symmetry _ _ _
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
preservesPullbackInl'
null
noncomputable preservesPullbackInr' : PreservesLimit (cospan f coprod.inr) F := by apply preservesLimit_of_iso_diagram (K₁ := cospan (f ≫ (coprod.braiding X Y).hom) coprod.inl) apply cospanExt (Iso.refl _) (Iso.refl _) (coprod.braiding X Y).symm <;> simp
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
preservesPullbackInr'
null
noncomputable preservesPullbackInr : PreservesLimit (cospan coprod.inr f) F := preservesPullback_symmetry _ _ _
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
preservesPullbackInr
null
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)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.mono_inr_of_isColimit
null
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)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.mono_inl_of_isColimit
null
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)
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.isPullback_initial_to_binaryCofan
null
finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C] [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 => ?_⟩ constructor 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) rw [H c' (αX ≫ HT.from _) (αY ≫ HT.from _) (f ≫ d) (by rw [← reassoc_of% hX, hd, Category.assoc]) (by rw [← reassoc_of% hY, hd', Category.assoc])] 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]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_iff_of_isTerminal
null
types.finitaryExtensive : FinitaryExtensive (Type u) := by classical rw [finitaryExtensive_iff_of_isTerminal (Type u) PUnit Types.isTerminalPunit _ (Types.binaryCoproductColimit _ _)] apply BinaryCofan.isVanKampen_mk _ _ (fun X Y => Types.binaryCoproductColimit X Y) _ fun f g => (Limits.Types.pullbackLimitCone f g).2 · intro _ _ _ _ f hαX hαY constructor · refine ⟨⟨hαX.symm⟩, ⟨PullbackCone.isLimitAux' _ ?_⟩⟩ intro s have : ∀ x, ∃! y, s.fst x = Sum.inl y := by intro x rcases h : s.fst x with val | val · simp only [Types.binaryCoproductCocone_pt, Functor.const_obj_obj, Sum.inl.injEq, existsUnique_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 choose l hl hl' using this exact ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ => funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩ · refine ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ ?_⟩⟩ intro s have : ∀ x, ∃! y, s.fst x = Sum.inr y := by intro x rcases h : s.fst x with val | val · 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, existsUnique_eq'] delta ExistsUnique at this choose l hl hl' using this exact ⟨l, (funext hl).symm, Types.isTerminalPunit.hom_ext _ _, fun {l'} h₁ _ => funext fun x => hl' x (l' x) (congr_fun h₁ x).symm⟩ · intro Z f dsimp [Limits.Types.binaryCoproductCocone] delta Types.PullbackObj 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⟩ let eY : { p : Z × PUnit // f p.fst = Sum.inr p.snd } ≃ { x : Z // f x = Sum.inr PUnit.unit } := ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩, fun x => ⟨⟨_, _⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩ fapply BinaryCofan.isColimitMk · 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 ...
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
types.finitaryExtensive
null
noncomputable finitaryExtensiveTopCatAux (Z : TopCat.{u}) (f : Z ⟶ TopCat.of (PUnit.{u + 1} ⊕ PUnit.{u + 1})) : IsColimit (BinaryCofan.mk (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 h₁ : Set.range (TopCat.pullbackFst f (TopCat.binaryCofan (.of PUnit) (.of PUnit)).inl) = f ⁻¹' Set.range Sum.inl := by apply le_antisymm · rintro _ ⟨x, rfl⟩; exact ⟨PUnit.unit, x.2.symm⟩ · rintro x ⟨⟨⟩, hx⟩; refine ⟨⟨⟨x, PUnit.unit⟩, hx.symm⟩, rfl⟩ have h₂ : Set.range (TopCat.pullbackFst f (TopCat.binaryCofan (.of PUnit) (.of PUnit)).inr) = f ⁻¹' Set.range Sum.inr := by apply le_antisymm · rintro _ ⟨x, rfl⟩; exact ⟨PUnit.unit, x.2.symm⟩ · rintro x ⟨⟨⟩, hx⟩; refine ⟨⟨⟨x, PUnit.unit⟩, hx.symm⟩, rfl⟩ refine ((TopCat.binaryCofan_isColimit_iff _).mpr ⟨?_, ?_, ?_⟩).some · refine ⟨(Homeomorph.prodPUnit Z).isEmbedding.comp .subtypeVal, ?_⟩ convert f.hom.2.1 _ isOpen_range_inl · refine ⟨(Homeomorph.prodPUnit Z).isEmbedding.comp .subtypeVal, ?_⟩ convert f.hom.2.1 _ isOpen_range_inr · convert Set.isCompl_range_inl_range_inr.preimage f
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensiveTopCatAux
(Implementation) An auxiliary lemma for the proof that `TopCat` is finitary extensive.
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) _ fun f g => TopCat.pullbackConeIsLimit f g · intro X' Y' αX αY f hαX hαY constructor · refine ⟨⟨hαX.symm⟩, ⟨PullbackCone.isLimitAux' _ ?_⟩⟩ intro s have : ∀ x, ∃! y, s.fst x = Sum.inl y := by intro x rcases h : s.fst x with val | val · exact ⟨val, rfl, fun y h => Sum.inl_injective h.symm⟩ · 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 choose l hl hl' using this refine ⟨TopCat.ofHom ⟨l, ?_⟩, TopCat.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _, fun {l'} h₁ _ => TopCat.ext fun x => hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩ apply (IsEmbedding.inl (X := X') (Y := Y')).isInducing.continuous_iff.mpr convert s.fst.hom.2 using 1 exact (funext hl).symm · refine ⟨⟨hαY.symm⟩, ⟨PullbackCone.isLimitAux' _ ?_⟩⟩ intro s have : ∀ x, ∃! y, s.fst x = Sum.inr y := by intro x rcases h : s.fst x with val | val · 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⟩ delta ExistsUnique at this choose l hl hl' using this refine ⟨TopCat.ofHom ⟨l, ?_⟩, TopCat.ext fun a => (hl a).symm, TopCat.isTerminalPUnit.hom_ext _ _, fun {l'} h₁ _ => TopCat.ext fun x => hl' x (l' x) (ConcreteCategory.congr_hom h₁ x).symm⟩ apply (IsEmbedding.inr (X := X') (Y := Y')).isInducing.continuous_iff.mpr convert s.fst.hom.2 using 1 exact (funext hl).symm · intro Z f exact finitaryExtensiveTopCatAux Z f
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_TopCat
null
finitaryExtensive_of_reflective [HasFiniteCoproducts D] [HasPullbacksOfInclusions D] [FinitaryExtensive C] {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] : FinitaryExtensive D := by have : PreservesColimitsOfSize Gl := adj.leftAdjoint_preservesColimits constructor intro X Y c hc apply (IsVanKampenColimit.precompose_isIso_iff (Functor.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 _) · exact (IsColimit.precomposeHomEquiv _ _).symm hc
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_of_reflective
null
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 _ <| isColimitOfPreserves _ hc⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_functor
null
finitaryExtensive_of_preserves_and_reflects (F : C ⥤ D) [FinitaryExtensive D] [HasFiniteCoproducts C] [HasPullbacksOfInclusions C] [PreservesPullbacksOfInclusions F] [ReflectsLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F] [ReflectsColimitsOfShape (Discrete WalkingPair) F] : FinitaryExtensive C := by constructor intro 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
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_of_preserves_and_reflects
null
finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D] [HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F] [PreservesColimitsOfShape (Discrete WalkingPair) F] [F.ReflectsIsomorphisms] : FinitaryExtensive C := by haveI : ReflectsLimitsOfShape WalkingCospan F := reflectsLimitsOfShape_of_reflectsIsomorphisms haveI : ReflectsColimitsOfShape (Discrete WalkingPair) F := reflectsColimitsOfShape_of_reflectsIsomorphisms exact finitaryExtensive_of_preserves_and_reflects F
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
finitaryExtensive_of_preserves_and_reflects_isomorphism
null
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 [f]) clear_value f subst this induction n with | zero => exact (isVanKampenColimit_of_isEmpty _ hc).isUniversal | succ n IH => refine IsUniversalColimit.of_iso (@isUniversalColimit_extendCofan _ _ _ _ _ _ (IH _ (coproductIsCoproduct _)) (FinitaryPreExtensive.universal' _ (coprodIsCoprod _ _)) ?_) ((extendCofanIsColimit f (coproductIsCoproduct _) (coprodIsCoprod _ _)).uniqueUpToIso hc) · dsimp infer_instance
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.isUniversal_finiteCoproducts_Fin
null
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
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.isUniversal_finiteCoproducts
null
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 [f]) clear_value f subst this induction n with | zero => exact isVanKampenColimit_of_isEmpty _ hc | succ n IH => 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
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.isVanKampen_finiteCoproducts_Fin
null
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
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.isVanKampen_finiteCoproducts
null
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 [f]) 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 cat_disch 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⟩ := by simp only [e, 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' 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
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.hasPullbacks_of_is_coproduct
null
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) _
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.mono_ι
null
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
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.isPullback_initial_to
null
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)
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryExtensive.isPullback_initial_to_sigma_ι
null
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 := _) (i := hi)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.hasPullbacks_of_inclusions
null
FinitaryPreExtensive.isIso_sigmaDesc_fst [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 let c := (Cofan.mk _ ((fun _ ↦ pullback.fst _ _) : (a : α) → pullback f (π a) ⟶ _)) apply c.isColimit_iff_isIso_sigmaDesc.mpr have hau : IsUniversalColimit (Cofan.mk X π) := FinitaryPreExtensive.isUniversal_finiteCoproducts ((Cofan.isColimit_iff_isIso_sigmaDesc _).mp hπ).some refine hau.nonempty_isColimit_of_pullbackCone_left _ (𝟙 _) _ _ (fun i ↦ ?_) (PullbackCone.mk (𝟙 _) f (by simp)) (IsPullback.id_horiz f).isLimit _ (Iso.refl _) (by simp) (by simp [c]) (by simp [pullback.condition, c]) exact pullback.isLimit _ _ @[deprecated (since := "2025-06-20")] alias FinitaryPreExtensive.sigma_desc_iso := FinitaryPreExtensive.isIso_sigmaDesc_fst
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.isIso_sigmaDesc_fst
null
FinitaryPreExtensive.isIso_sigmaDesc_map [HasPullbacks C] [FinitaryPreExtensive C] {ι ι' : Type*} [Finite ι] [Finite ι'] {S : C} {X : ι → C} {Y : ι' → C} (f : ∀ i, X i ⟶ S) (g : ∀ i, Y i ⟶ S) : IsIso (Sigma.desc fun (p : ι × ι') ↦ pullback.map (f p.1) (g p.2) (Sigma.desc f) (Sigma.desc g) (Sigma.ι _ p.1) (Sigma.ι _ p.2) (𝟙 S) (by simp) (by simp)) := by let c : Cofan _ := Cofan.mk _ <| fun (p : ι × ι') ↦ pullback.map (f p.1) (g p.2) (Sigma.desc f) (Sigma.desc g) (Sigma.ι _ p.1) (Sigma.ι _ p.2) (𝟙 S) (by simp) (by simp) apply c.isColimit_iff_isIso_sigmaDesc.mpr refine IsUniversalColimit.nonempty_isColimit_prod_of_pullbackCone (a := Cofan.mk _ <| fun i ↦ Sigma.ι _ i) (b := Cofan.mk _ <| fun i ↦ Sigma.ι _ i) ?_ ?_ f g (Sigma.desc f) (Sigma.desc g) (fun i j ↦ (pullback.cone (f i) (g j))) (fun i j ↦ pullback.isLimit (f i) (g j)) (pullback.cone _ _) ?_ (Iso.refl _) · exact FinitaryPreExtensive.isUniversal_finiteCoproducts (coproductIsCoproduct X) · exact FinitaryPreExtensive.isUniversal_finiteCoproducts (coproductIsCoproduct Y) · exact pullback.isLimit (Sigma.desc f) (Sigma.desc g)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.isIso_sigmaDesc_map
If `C` has pullbacks and is finitary (pre-)extensive, pullbacks distribute over finite coproducts, i.e., `∐ (Xᵢ ×[S] Xⱼ) ≅ (∐ Xᵢ) ×[S] (∐ Xⱼ)`. For an `IsPullback` version, see `FinitaryPreExtensive.isPullback_sigmaDesc`.
FinitaryPreExtensive.isPullback_sigmaDesc [HasPullbacks C] [FinitaryPreExtensive C] {ι ι' : Type*} [Finite ι] [Finite ι'] {S : C} {X : ι → C} {Y : ι' → C} (f : ∀ i, X i ⟶ S) (g : ∀ i, Y i ⟶ S) : IsPullback (Limits.Sigma.desc fun (p : ι × ι') ↦ pullback.fst (f p.1) (g p.2) ≫ Sigma.ι X p.1) (Limits.Sigma.desc fun (p : ι × ι') ↦ pullback.snd (f p.1) (g p.2) ≫ Sigma.ι Y p.2) (Limits.Sigma.desc f) (Limits.Sigma.desc g) := by let c : Cofan _ := Cofan.mk _ <| fun (p : ι × ι') ↦ pullback.map (f p.1) (g p.2) (Sigma.desc f) (Sigma.desc g) (Sigma.ι _ p.1) (Sigma.ι _ p.2) (𝟙 S) (by simp) (by simp) convert IsUniversalColimit.isPullback_prod_of_isColimit (d := Cofan.mk _ (Sigma.ι fun (p : ι × ι') ↦ pullback (f p.1) (g p.2))) (hd := coproductIsCoproduct (fun (p : ι × ι') ↦ pullback (f p.1) (g p.2))) (a := Cofan.mk _ <| fun i ↦ Sigma.ι _ i) (b := Cofan.mk _ <| fun i ↦ Sigma.ι _ i) ?_ ?_ f g (Sigma.desc f) (Sigma.desc g) (fun i j ↦ IsPullback.of_hasPullback (f i) (g j)) · ext simp [Cofan.IsColimit.desc, Sigma.ι, coproductIsCoproduct] · ext simp [Cofan.IsColimit.desc, Sigma.ι, coproductIsCoproduct] · exact FinitaryPreExtensive.isUniversal_finiteCoproducts (coproductIsCoproduct X) · exact FinitaryPreExtensive.isUniversal_finiteCoproducts (coproductIsCoproduct Y)
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq", "Mathlib.CategoryTheory.Limits.Shapes.StrictInitial", "Mathlib.CategoryTheory.Limits.Types.Shapes", "Mathlib.Topology.Category.TopCat.Limits.Pullbacks", "Mathlib.CategoryTheory.Limits.FunctorCategory.Basic", "Mathlib.CategoryTheory.Limits.Constructio...
Mathlib/CategoryTheory/Extensive.lean
FinitaryPreExtensive.isPullback_sigmaDesc
If `C` has pullbacks and is finitary (pre-)extensive, pullbacks distribute over finite coproducts, i.e., `∐ (Xᵢ ×[S] Xⱼ) ≅ (∐ Xᵢ) ×[S] (∐ Xⱼ)`. For a variant, see `FinitaryPreExtensive.isIso_sigmaDesc_map`.
FintypeCat where /-- The underlying type. -/ carrier : Type* [str : Fintype carrier] attribute [instance] FintypeCat.str
structure
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
FintypeCat
The category of finite types.
instCoeSort : CoeSort FintypeCat Type* := ⟨carrier⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
instCoeSort
null
of (X : Type*) [Fintype X] : FintypeCat where carrier := X
abbrev
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
of
Construct a bundled `FintypeCat` from the underlying type and typeclass.
@[simps!] incl : FintypeCat ⥤ Type* := inducedFunctor _
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
incl
The fully faithful embedding of `FintypeCat` into the category of types.
concreteCategoryFintype : ConcreteCategory FintypeCat (· ⟶ ·) where hom f := f ofHom f := f /- Help typeclass inference infer fullness of forgetful functor. -/
instance
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
concreteCategoryFintype
null
@[simp] id_apply (X : FintypeCat) (x : X) : (𝟙 X : X → X) x = x := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
id_apply
null
comp_apply {X Y Z : FintypeCat} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) : (f ≫ g) x = g (f x) := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
comp_apply
null
hom_inv_id_apply {X Y : FintypeCat} (f : X ≅ Y) (x : X) : f.inv (f.hom x) = x := congr_fun f.hom_inv_id x
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
hom_inv_id_apply
null
inv_hom_id_apply {X Y : FintypeCat} (f : X ≅ Y) (y : Y) : f.hom (f.inv y) = y := congr_fun f.inv_hom_id y @[ext]
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
inv_hom_id_apply
null
hom_ext {X Y : FintypeCat} (f g : X ⟶ Y) (h : ∀ x, f x = g x) : f = g := by funext apply h
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
hom_ext
null
@[simps] equivEquivIso {A B : FintypeCat} : A ≃ B ≃ (A ≅ B) where toFun e := { hom := e inv := e.symm } invFun i := { toFun := i.hom invFun := i.inv left_inv := congr_fun i.hom_inv_id right_inv := congr_fun i.inv_hom_id } left_inv := by cat_disch right_inv := by cat_disch
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
equivEquivIso
Equivalences between finite types are the same as isomorphisms in `FintypeCat`.
Skeleton : Type u := ULift ℕ
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
Skeleton
The "standard" skeleton for `FintypeCat`. This is the full subcategory of `FintypeCat` spanned by objects of the form `ULift (Fin n)` for `n : ℕ`. We parameterize the objects of `Fintype.Skeleton` directly as `ULift ℕ`, as the type `ULift (Fin m) ≃ ULift (Fin n)` is nonempty if and only if `n = m`. Specifying universes, `Skeleton : Type u` is a small skeletal category equivalent to `Fintype.{u}`.
mk : ℕ → Skeleton := ULift.up
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
mk
Given any natural number `n`, this creates the associated object of `Fintype.Skeleton`.
len : Skeleton → ℕ := ULift.down @[ext]
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
len
Given any object of `Fintype.Skeleton`, this returns the associated natural number.
ext (X Y : Skeleton) : X.len = Y.len → X = Y := ULift.ext _ _
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
ext
null
is_skeletal : Skeletal Skeleton.{u} := fun X Y ⟨h⟩ => ext _ _ <| Fin.equiv_iff_eq.mp <| Nonempty.intro <| { toFun := fun x => (h.hom ⟨x⟩).down invFun := fun x => (h.inv ⟨x⟩).down left_inv := by intro a change ULift.down _ = _ rw [ULift.up_down] change ((h.hom ≫ h.inv) _).down = _ simp rfl right_inv := by intro a change ULift.down _ = _ rw [ULift.up_down] change ((h.inv ≫ h.hom) _).down = _ simp rfl }
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
is_skeletal
null
incl : Skeleton.{u} ⥤ FintypeCat.{u} where obj X := FintypeCat.of (ULift (Fin X.len)) map f := f
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
incl
The canonical fully faithful embedding of `Fintype.Skeleton` into `FintypeCat`.
noncomputable equivalence : Skeleton ≌ FintypeCat := incl.asEquivalence @[simp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
equivalence
The equivalence between `Fintype.Skeleton` and `Fintype`.
incl_mk_nat_card (n : ℕ) : Fintype.card (incl.obj (mk n)) = n := by convert Finset.card_fin n apply Fintype.ofEquiv_card
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
incl_mk_nat_card
null
isSkeleton : IsSkeletonOf FintypeCat Skeleton Skeleton.incl where skel := Skeleton.is_skeletal eqv := by infer_instance
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
isSkeleton
`Fintype.Skeleton` is a skeleton of `Fintype`.
noncomputable uSwitch : FintypeCat.{u} ⥤ FintypeCat.{v} where obj X := FintypeCat.of <| ULift.{v} (Fin (Fintype.card X)) map {X Y} f x := ULift.up <| (Fintype.equivFin Y) (f ((Fintype.equivFin X).symm x.down)) map_comp {X Y Z} f g := by funext; simp
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitch
If `u` and `v` are two arbitrary universes, we may construct a functor `uSwitch.{u, v} : FintypeCat.{u} ⥤ FintypeCat.{v}` by sending `X : FintypeCat.{u}` to `ULift.{v} (Fin (Fintype.card X))`.
noncomputable uSwitchEquiv (X : FintypeCat.{u}) : uSwitch.{u, v}.obj X ≃ X := Equiv.ulift.trans (Fintype.equivFin X).symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitchEquiv
Switching the universe of an object `X : FintypeCat.{u}` does not change `X` up to equivalence of types. This is natural in the sense that it commutes with `uSwitch.map f` for any `f : X ⟶ Y` in `FintypeCat.{u}`.
uSwitchEquiv_naturality {X Y : FintypeCat.{u}} (f : X ⟶ Y) (x : uSwitch.{u, v}.obj X) : f (X.uSwitchEquiv x) = Y.uSwitchEquiv (uSwitch.map f x) := by simp only [uSwitch, uSwitchEquiv, Equiv.trans_apply, Equiv.ulift_apply, Equiv.symm_apply_apply]
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitchEquiv_naturality
null
uSwitchEquiv_symm_naturality {X Y : FintypeCat.{u}} (f : X ⟶ Y) (x : X) : uSwitch.map f (X.uSwitchEquiv.symm x) = Y.uSwitchEquiv.symm (f x) := by rw [← Equiv.apply_eq_iff_eq_symm_apply, ← uSwitchEquiv_naturality f, Equiv.apply_symm_apply]
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitchEquiv_symm_naturality
null
uSwitch_map_uSwitch_map {X Y : FintypeCat.{u}} (f : X ⟶ Y) : uSwitch.map (uSwitch.map f) = (equivEquivIso ((uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv)).hom ≫ f ≫ (equivEquivIso ((uSwitch.obj Y).uSwitchEquiv.trans Y.uSwitchEquiv)).inv := rfl
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitch_map_uSwitch_map
null
noncomputable uSwitchEquivalence : FintypeCat.{u} ≌ FintypeCat.{v} where functor := uSwitch inverse := uSwitch unitIso := NatIso.ofComponents (fun X ↦ (equivEquivIso <| (uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv).symm) <| by simp [uSwitch_map_uSwitch_map] counitIso := NatIso.ofComponents (fun X ↦ equivEquivIso <| (uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv) <| by simp [uSwitch_map_uSwitch_map] functor_unitIso_comp X := by ext x simp [← uSwitchEquiv_naturality]
def
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
uSwitchEquivalence
`uSwitch.{u, v}` is an equivalence of categories with quasi-inverse `uSwitch.{v, u}`.
naturality (σ : F ⟶ G) (f : X ⟶ Y) (x : F.obj X) : σ.app Y (F.map f x) = G.map f (σ.app X x) := congr_fun (σ.naturality f) x
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.ConcreteCategory.Basic", "Mathlib.CategoryTheory.Endomorphism", "Mathlib.CategoryTheory.Skeletal", "Mathlib.Data.Finite.Prod" ]
Mathlib/CategoryTheory/FintypeCat.lean
naturality
null
GlueData where /-- The index type `J` of a gluing datum -/ J : Type v /-- For each `i : J`, an object `U i` -/ U : J → C /-- For each `i j : J`, an object `V i j` -/ V : J × J → C /-- For each `i j : J`, a monomorphism `f i j : V i j ⟶ U i` -/ f : ∀ i j, V (i, j) ⟶ U i f_mono : ∀ i j, Mono (f i j) := by infer_instance f_hasPullback : ∀ i j k, HasPullback (f i j) (f i k) := by infer_instance f_id : ∀ i, IsIso (f i i) := by infer_instance /-- For each `i j : J`, a transition map `t i j : V i j ⟶ V j i` -/ t : ∀ i j, V (i, j) ⟶ V (j, i) t_id : ∀ i, t i i = 𝟙 _ /-- The morphism via which `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` -/ t' : ∀ i j k, pullback (f i j) (f i k) ⟶ pullback (f j k) (f j i) t_fac : ∀ i j k, t' i j k ≫ pullback.snd _ _ = pullback.fst _ _ ≫ t i j cocycle : ∀ i j k, t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _ attribute [simp] GlueData.t_id attribute [instance] GlueData.f_id GlueData.f_mono GlueData.f_hasPullback attribute [reassoc] GlueData.t_fac GlueData.cocycle
structure
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
GlueData
A gluing datum consists of 1. An index type `J` 2. An object `U i` for each `i : J`. 3. An object `V i j` for each `i j : J`. 4. A monomorphism `f i j : V i j ⟶ U i` for each `i j : J`. 5. A transition map `t i j : V i j ⟶ V j i` for each `i j : J`. such that 6. `f i i` is an isomorphism. 7. `t i i` is the identity. 8. The pullback for `f i j` and `f i k` exists. 9. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`. 10. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.
@[simp] t'_iij (i j : D.J) : D.t' i i j = (pullbackSymmetry _ _).hom := by have eq₁ := D.t_fac i i j have eq₂ := (IsIso.eq_comp_inv (D.f i i)).mpr (@pullback.condition _ _ _ _ _ _ (D.f i j) _) rw [D.t_id, Category.comp_id, eq₂] at eq₁ have eq₃ := (IsIso.eq_comp_inv (D.f i i)).mp eq₁ rw [Category.assoc, ← pullback.condition, ← Category.assoc] at eq₃ exact Mono.right_cancellation _ _ ((Mono.right_cancellation _ _ eq₃).trans (pullbackSymmetry_hom_comp_fst _ _).symm)
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_iij
null
t'_jii (i j : D.J) : D.t' j i i = pullback.fst _ _ ≫ D.t j i ≫ inv (pullback.snd _ _) := by rw [← Category.assoc, ← D.t_fac] simp
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_jii
null
t'_iji (i j : D.J) : D.t' i j i = pullback.fst _ _ ≫ D.t i j ≫ inv (pullback.snd _ _) := by rw [← Category.assoc, ← D.t_fac] simp @[reassoc, elementwise (attr := simp)]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_iji
null
t_inv (i j : D.J) : D.t i j ≫ D.t j i = 𝟙 _ := by have eq : (pullbackSymmetry (D.f i i) (D.f i j)).hom = pullback.snd _ _ ≫ inv (pullback.fst _ _) := by simp have := D.cocycle i j i rw [D.t'_iij, D.t'_jii, D.t'_iji, fst_eq_snd_of_mono_eq, eq] at this simp only [Category.assoc, IsIso.inv_hom_id_assoc] at this rw [← IsIso.eq_inv_comp, ← Category.assoc, IsIso.comp_inv_eq] at this simpa using this
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t_inv
null
t'_inv (i j k : D.J) : D.t' i j k ≫ (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom = 𝟙 _ := by rw [← cancel_mono (pullback.fst (D.f i j) (D.f i k))] simp [t_fac, t_fac_assoc]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_inv
null
t_isIso (i j : D.J) : IsIso (D.t i j) := ⟨⟨D.t j i, D.t_inv _ _, D.t_inv _ _⟩⟩
instance
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t_isIso
null
t'_isIso (i j k : D.J) : IsIso (D.t' i j k) := ⟨⟨D.t' j k i ≫ D.t' k i j, D.cocycle _ _ _, by simpa using D.cocycle _ _ _⟩⟩ @[reassoc]
instance
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_isIso
null
t'_comp_eq_pullbackSymmetry (i j k : D.J) : D.t' j k i ≫ D.t' k i j = (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom := by trans inv (D.t' i j k) · exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _) · rw [← cancel_mono (pullback.fst (D.f i j) (D.f i k))] simp [t_fac, t_fac_assoc]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
t'_comp_eq_pullbackSymmetry
null
sigmaOpens [HasCoproduct D.U] : C := ∐ D.U
def
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
sigmaOpens
(Implementation) The disjoint union of `U i`.
diagram : MultispanIndex (.prod D.J) C where left := D.V right := D.U fst := fun ⟨i, j⟩ => D.f i j snd := fun ⟨i, j⟩ => D.t i j ≫ D.f j i @[simp]
def
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
diagram
(Implementation) The diagram to take colimit of.
diagram_fst (i j : D.J) : D.diagram.fst ⟨i, j⟩ = D.f i j := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
diagram_fst
null
diagram_snd (i j : D.J) : D.diagram.snd ⟨i, j⟩ = D.t i j ≫ D.f j i := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
diagram_snd
null
diagram_left : D.diagram.left = D.V := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
diagram_left
null
diagram_right : D.diagram.right = D.U := rfl
theorem
CategoryTheory
[ "Mathlib.Tactic.CategoryTheory.Elementwise", "Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer", "Mathlib.CategoryTheory.Limits.Constructions.EpiMono", "Mathlib.CategoryTheory.Limits.Preserves.Limits", "Mathlib.CategoryTheory.Limits.Types.Shapes" ]
Mathlib/CategoryTheory/GlueData.lean
diagram_right
null