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
skeleton_skeletal : Skeletal (Skeleton C) := by rintro X Y ⟨h⟩ have : X.out ≈ Y.out := ⟨(fromSkeleton C).mapIso h⟩ simpa using Quotient.sound this
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
skeleton_skeletal
null
skeleton_isSkeleton : IsSkeletonOf C (Skeleton C) (fromSkeleton C) where skel := skeleton_skeletal C eqv := fromSkeleton.isEquivalence C variable {C D}
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
skeleton_isSkeleton
The `skeleton` of `C` given by choice is a skeleton of `C`.
toSkeleton_fromSkeleton_obj (X : Skeleton C) : toSkeleton ((fromSkeleton C).obj X) = X := Quotient.out_eq _
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toSkeleton_fromSkeleton_obj
null
toSkeleton_eq_toSkeleton_iff {X Y : C} : toSkeleton X = toSkeleton Y ↔ Nonempty (X ≅ Y) := Quotient.eq
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toSkeleton_eq_toSkeleton_iff
null
congr_toSkeleton_of_iso {X Y : C} (e : X ≅ Y) : toSkeleton X = toSkeleton Y := Quotient.sound ⟨e⟩
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
congr_toSkeleton_of_iso
null
noncomputable Skeleton.isoOfEq {X Y : C} (h : toSkeleton X = toSkeleton Y) : X ≅ Y := Quotient.exact h |>.some
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
Skeleton.isoOfEq
Provides a (noncomputable) isomorphism `X ≅ Y` given that `toSkeleton X = toSkeleton Y`.
toSkeleton_eq_iff {X : C} {Y : Skeleton C} : toSkeleton X = Y ↔ Nonempty (X ≅ (fromSkeleton C).obj Y) := Quotient.mk_eq_iff_out
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toSkeleton_eq_iff
null
noncomputable mapSkeleton (F : C ⥤ D) : Skeleton C ⥤ Skeleton D := (skeletonEquivalence C).functor ⋙ F ⋙ (skeletonEquivalence D).inverse variable (F : C ⥤ D)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
mapSkeleton
From a functor `C ⥤ D`, construct a map of skeletons `Skeleton C → Skeleton D`.
mapSkeleton_obj_toSkeleton (X : C) : F.mapSkeleton.obj (toSkeleton X) = toSkeleton (F.obj X) := congr_toSkeleton_of_iso <| F.mapIso <| preCounitIso X
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
mapSkeleton_obj_toSkeleton
null
noncomputable toSkeletonFunctorCompMapSkeletonIso : toSkeletonFunctor C ⋙ F.mapSkeleton ≅ F ⋙ toSkeletonFunctor D := NatIso.ofComponents (fun X ↦ (toSkeletonFunctor D).mapIso <| F.mapIso <| preCounitIso X) (fun {X Y} f ↦ show (_ ≫ _) ≫ _ = _ ≫ _ by simp [assoc])
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toSkeletonFunctorCompMapSkeletonIso
A natural isomorphism between `X ↦ ⟦X⟧ ↦ ⟦FX⟧` and `X ↦ FX ↦ ⟦FX⟧`. On the level of categories, these are `C ⥤ Skeleton C ⥤ Skeleton D` and `C ⥤ D ⥤ Skeleton D`. So this says that the square formed by these 4 objects and 4 functors commutes.
mapSkeleton_injective [F.Full] [F.Faithful] : Function.Injective F.mapSkeleton.obj := fun _ _ h ↦ skeleton_skeletal C ⟨F.mapSkeleton.preimageIso <| eqToIso h⟩
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
mapSkeleton_injective
null
mapSkeleton_surjective [F.EssSurj] : Function.Surjective F.mapSkeleton.obj := fun Y ↦ let ⟨X, h⟩ := EssSurj.mem_essImage Y; ⟨X, skeleton_skeletal D h⟩
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
mapSkeleton_surjective
null
noncomputable Equivalence.skeletonEquiv (e : C ≌ D) : Skeleton C ≃ Skeleton D := let f := ((skeletonEquivalence C).trans e).trans (skeletonEquivalence D).symm { toFun := f.functor.obj invFun := f.inverse.obj left_inv := fun X => skeleton_skeletal C ⟨(f.unitIso.app X).symm⟩ right_inv := fun Y => skeleton_skeletal D ⟨f.counitIso.app Y⟩ } variable (C D)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
Equivalence.skeletonEquiv
Two categories which are categorically equivalent have skeletons with equivalent objects.
ThinSkeleton : Type u₁ := Quotient (isIsomorphicSetoid C) variable {C} in
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
ThinSkeleton
Construct the skeleton category by taking the quotient of objects. This construction gives a preorder with nice definitional properties, but is only really appropriate for thin categories. If your original category is not thin, you probably want to be using `Skeleton` instead of this.
ThinSkeleton.mk (c : C) : ThinSkeleton C := Quotient.mk' c
abbrev
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
ThinSkeleton.mk
Convenience constructor for `ThinSkeleton`.
inhabitedThinSkeleton [Inhabited C] : Inhabited (ThinSkeleton C) := ⟨ThinSkeleton.mk default⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
inhabitedThinSkeleton
null
ThinSkeleton.preorder : Preorder (ThinSkeleton C) where le := @Quotient.lift₂ C C _ (isIsomorphicSetoid C) (isIsomorphicSetoid C) (fun X Y => Nonempty (X ⟶ Y)) (by rintro _ _ _ _ ⟨i₁⟩ ⟨i₂⟩ exact propext ⟨Nonempty.map fun f => i₁.inv ≫ f ≫ i₂.hom, Nonempty.map fun f => i₁.hom ≫ f ≫ i₂.inv⟩) le_refl := by refine Quotient.ind fun a => ?_ exact ⟨𝟙 _⟩ le_trans a b c := Quotient.inductionOn₃ a b c fun _ _ _ => Nonempty.map2 (· ≫ ·)
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
ThinSkeleton.preorder
null
@[simps] toThinSkeleton : C ⥤ ThinSkeleton C where obj := ThinSkeleton.mk map f := homOfLE (Nonempty.intro f) /-! The constructions here are intended to be used when the category `C` is thin, even though some of the statements can be shown without this assumption. -/
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toThinSkeleton
The functor from a category to its thin skeleton.
thin : Quiver.IsThin (ThinSkeleton C) := fun _ _ => ⟨by rintro ⟨⟨f₁⟩⟩ ⟨⟨_⟩⟩ rfl⟩ variable {C} {D}
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
thin
The thin skeleton is thin.
@[simps] map (F : C ⥤ D) : ThinSkeleton C ⥤ ThinSkeleton D where obj := Quotient.map F.obj fun _ _ ⟨hX⟩ => ⟨F.mapIso hX⟩ map {X} {Y} := Quotient.recOnSubsingleton₂ X Y fun _ _ k => homOfLE (k.le.elim fun t => ⟨F.map t⟩)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map
A functor `C ⥤ D` computably lowers to a functor `ThinSkeleton C ⥤ ThinSkeleton D`.
comp_toThinSkeleton (F : C ⥤ D) : F ⋙ toThinSkeleton D = toThinSkeleton C ⋙ map F := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
comp_toThinSkeleton
null
mapNatTrans {F₁ F₂ : C ⥤ D} (k : F₁ ⟶ F₂) : map F₁ ⟶ map F₂ where app X := Quotient.recOnSubsingleton X fun x => ⟨⟨⟨k.app x⟩⟩⟩ /- Porting note: `map₂ObjMap`, `map₂Functor`, and `map₂NatTrans` were all extracted from the original `map₂` proof. Lean needed an extensive amount explicit type annotations to figure things out. This also translated into repeated deterministic timeouts. The extracted defs allow for explicit motives for the multiple descents to the quotients. It would be better to prove that `ThinSkeleton (C × D) ≌ ThinSkeleton C × ThinSkeleton D` which is more immediate from comparing the preorders. Then one could get `map₂` by currying. -/
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
mapNatTrans
Given a natural transformation `F₁ ⟶ F₂`, induce a natural transformation `map F₁ ⟶ map F₂`.
map₂ObjMap (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D → ThinSkeleton E := fun x y => @Quotient.map₂ C D (isIsomorphicSetoid C) (isIsomorphicSetoid D) E (isIsomorphicSetoid E) (fun X Y => (F.obj X).obj Y) (fun X₁ _ ⟨hX⟩ _ Y₂ ⟨hY⟩ => ⟨(F.obj X₁).mapIso hY ≪≫ (F.mapIso hX).app Y₂⟩) x y
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map₂ObjMap
Given a bifunctor, we descend to a function on objects of `ThinSkeleton`
map₂Functor (F : C ⥤ D ⥤ E) : ThinSkeleton C → ThinSkeleton D ⥤ ThinSkeleton E := fun x => { obj := fun y => map₂ObjMap F x y map := fun {y₁} {y₂} => @Quotient.recOnSubsingleton C (isIsomorphicSetoid C) (fun x => (y₁ ⟶ y₂) → (map₂ObjMap F x y₁ ⟶ map₂ObjMap F x y₂)) _ x fun X => Quotient.recOnSubsingleton₂ y₁ y₂ fun _ _ hY => homOfLE (hY.le.elim fun g => ⟨(F.obj X).map g⟩) }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map₂Functor
For each `x : ThinSkeleton C`, we promote `map₂ObjMap F x` to a functor
map₂NatTrans (F : C ⥤ D ⥤ E) : {x₁ x₂ : ThinSkeleton C} → (x₁ ⟶ x₂) → (map₂Functor F x₁ ⟶ map₂Functor F x₂) := fun {x₁} {x₂} => @Quotient.recOnSubsingleton₂ C C (isIsomorphicSetoid C) (isIsomorphicSetoid C) (fun x x' : ThinSkeleton C => (x ⟶ x') → (map₂Functor F x ⟶ map₂Functor F x')) _ x₁ x₂ (fun X₁ X₂ f => { app := fun y => Quotient.recOnSubsingleton y fun Y => homOfLE (f.le.elim fun f' => ⟨(F.map f').app Y⟩) })
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map₂NatTrans
This provides natural transformations `map₂Functor F x₁ ⟶ map₂Functor F x₂` given `x₁ ⟶ x₂`
@[simps] map₂ (F : C ⥤ D ⥤ E) : ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E where obj := map₂Functor F map := map₂NatTrans F variable (C)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map₂
A functor `C ⥤ D ⥤ E` computably lowers to a functor `ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E`
toThinSkeleton_faithful : (toThinSkeleton C).Faithful where
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
toThinSkeleton_faithful
null
@[simps] noncomputable fromThinSkeleton : ThinSkeleton C ⥤ C where obj := Quotient.out map {x} {y} := Quotient.recOnSubsingleton₂ x y fun X Y f => (Nonempty.some (Quotient.mk_out X)).hom ≫ f.le.some ≫ (Nonempty.some (Quotient.mk_out Y)).inv
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
fromThinSkeleton
Use `Quotient.out` to create a functor out of the thin skeleton.
noncomputable equivalence : ThinSkeleton C ≌ C where functor := fromThinSkeleton C inverse := toThinSkeleton C counitIso := NatIso.ofComponents fun X => Nonempty.some (Quotient.mk_out X) unitIso := NatIso.ofComponents fun x => Quotient.recOnSubsingleton x fun X => eqToIso (Quotient.sound ⟨(Nonempty.some (Quotient.mk_out X)).symm⟩)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
equivalence
The equivalence between the thin skeleton and the category itself.
noncomputable fromThinSkeleton_isEquivalence : (fromThinSkeleton C).IsEquivalence := (equivalence C).isEquivalence_functor variable {C}
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
fromThinSkeleton_isEquivalence
null
equiv_of_both_ways {X Y : C} (f : X ⟶ Y) (g : Y ⟶ X) : X ≈ Y := ⟨iso_of_both_ways f g⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
equiv_of_both_ways
null
thinSkeletonPartialOrder : PartialOrder (ThinSkeleton C) := { CategoryTheory.ThinSkeleton.preorder C with le_antisymm := Quotient.ind₂ (by rintro _ _ ⟨f⟩ ⟨g⟩ apply Quotient.sound (equiv_of_both_ways f g)) }
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
thinSkeletonPartialOrder
null
skeletal : Skeletal (ThinSkeleton C) := fun X Y => Quotient.inductionOn₂ X Y fun _ _ h => h.elim fun i => i.1.le.antisymm i.2.le
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
skeletal
null
map_comp_eq (F : E ⥤ D) (G : D ⥤ C) : map (F ⋙ G) = map F ⋙ map G := Functor.eq_of_iso skeletal <| NatIso.ofComponents fun X => Quotient.recOnSubsingleton X fun _ => Iso.refl _
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map_comp_eq
null
map_id_eq : map (𝟭 C) = 𝟭 (ThinSkeleton C) := Functor.eq_of_iso skeletal <| NatIso.ofComponents fun X => Quotient.recOnSubsingleton X fun _ => Iso.refl _
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map_id_eq
null
map_iso_eq {F₁ F₂ : D ⥤ C} (h : F₁ ≅ F₂) : map F₁ = map F₂ := Functor.eq_of_iso skeletal { hom := mapNatTrans h.hom inv := mapNatTrans h.inv }
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
map_iso_eq
null
thinSkeleton_isSkeleton : IsSkeletonOf C (ThinSkeleton C) (fromThinSkeleton C) where skel := skeletal
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
thinSkeleton_isSkeleton
`fromThinSkeleton C` exhibits the thin skeleton as a skeleton.
isSkeletonOfInhabited : Inhabited (IsSkeletonOf C (ThinSkeleton C) (fromThinSkeleton C)) := ⟨thinSkeleton_isSkeleton⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
isSkeletonOfInhabited
null
lowerAdjunction (R : D ⥤ C) (L : C ⥤ D) (h : L ⊣ R) : ThinSkeleton.map L ⊣ ThinSkeleton.map R where unit := { app := fun X => by letI := isIsomorphicSetoid C exact Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.unit.app x⟩ } counit := { app := fun X => by letI := isIsomorphicSetoid D exact Quotient.recOnSubsingleton X fun x => homOfLE ⟨h.counit.app x⟩ }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
lowerAdjunction
An adjunction between thin categories gives an adjunction between their thin skeletons.
noncomputable Equivalence.thinSkeletonOrderIso [Quiver.IsThin C] (e : C ≌ α) : ThinSkeleton C ≃o α := ((ThinSkeleton.equivalence C).trans e).toOrderIso
def
CategoryTheory
[ "Mathlib.CategoryTheory.Adjunction.Basic", "Mathlib.CategoryTheory.Category.Preorder", "Mathlib.CategoryTheory.IsomorphismClasses", "Mathlib.CategoryTheory.Thin" ]
Mathlib/CategoryTheory/Skeletal.lean
Equivalence.thinSkeletonOrderIso
When `e : C ≌ α` is a categorical equivalence from a thin category `C` to some partial order `α`, the `ThinSkeleton C` is order isomorphic to `α`.
such that the type of objects and morphisms identify to subtypes of `Ω`. This allows to define a small family of small categories `SmallCategoryOfSet.categoryFamily : SmallCategoryOfSet Ω → Type w` which, up to equivalence, represents all categories such that types of objects and morphisms have cardinalities less than or equal to that of `Ω` (see `SmallCategoryOfSet.exists_equivalence`). -/ universe w v u
structure
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
such
null
SmallCategoryOfSet where /-- objects -/ obj : Set Ω /-- morphisms -/ hom (X Y : obj) : Set Ω /-- identity morphisms -/ id (X : obj) : hom X X /-- the composition of morphisms -/ comp {X Y Z : obj} (f : hom X Y) (g : hom Y Z) : hom X Z id_comp {X Y : obj} (f : hom X Y) : comp (id _) f = f := by cat_disch comp_id {X Y : obj} (f : hom X Y) : comp f (id _) = f := by cat_disch assoc {X Y Z T : obj} (f : hom X Y) (g : hom Y Z) (h : hom Z T) : comp (comp f g) h = comp f (comp g h) := by cat_disch
structure
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
SmallCategoryOfSet
Structure which allows to construct a category whose types of objects and morphisms are subtypes of a fixed type `Ω`.
categoryFamily : SmallCategoryOfSet Ω → Type w := fun S ↦ S.obj
abbrev
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
categoryFamily
The family of all categories such that the types of objects and morphisms are subtypes of a given type `Ω`.
CoreSmallCategoryOfSet where /-- objects -/ obj : Set Ω /-- morphisms -/ hom (X Y : obj) : Set Ω /-- a bijection between the types of objects -/ objEquiv : obj ≃ C /-- a bijection between the types of morphisms -/ homEquiv {X Y : obj} : hom X Y ≃ (objEquiv X ⟶ objEquiv Y)
structure
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
CoreSmallCategoryOfSet
Helper structure for the construction of a term in `SmallCategoryOfSet`. This involves the choice of bijections between types of objects and morphisms in a category `C` and subtypes of a type `Ω`.
@[simps] smallCategoryOfSet : SmallCategoryOfSet Ω where obj := h.obj hom := h.hom id X := h.homEquiv.symm (𝟙 _) comp f g := h.homEquiv.symm (h.homEquiv f ≫ h.homEquiv g)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
smallCategoryOfSet
The `SmallCategoryOfSet` structure induced by a `CoreSmallCategoryOfSet` structure.
@[simps!] functor : h.smallCategoryOfSet.obj ⥤ C where obj := h.objEquiv map := h.homEquiv map_id _ := by rw [SmallCategoryOfSet.id_def]; simp map_comp _ _ := by rw [SmallCategoryOfSet.comp_def]; simp
def
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
functor
Given `h : CoreSmallCategoryOfSet Ω C`, this is the obvious functor `h.smallCategoryOfSet.obj ⥤ C`.
fullyFaithfulFunctor : h.functor.FullyFaithful where preimage := h.homEquiv.symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
fullyFaithfulFunctor
Given `h : CoreSmallCategoryOfSet Ω C`, the obvious functor `h.smallCategoryOfSet.obj ⥤ C` is fully faithful.
noncomputable equivalence : h.smallCategoryOfSet.obj ≌ C := h.functor.asEquivalence
def
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
equivalence
Given `h : CoreSmallCategoryOfSet Ω C`, the obvious functor `h.smallCategoryOfSet.obj ⥤ C` is an equivalence.
exists_equivalence (C : Type u) [Category.{v} C] (h₁ : Cardinal.lift.{w} (Cardinal.mk C) ≤ Cardinal.lift.{u} (Cardinal.mk Ω)) (h₂ : ∀ (X Y : C), Cardinal.lift.{w} (Cardinal.mk (X ⟶ Y)) ≤ Cardinal.lift.{v} (Cardinal.mk Ω)) : ∃ (h : SmallCategoryOfSet Ω), Nonempty (categoryFamily Ω h ≌ C) := by let f₁ := (Cardinal.lift_mk_le'.1 h₁).some let f₂ (X Y) := (Cardinal.lift_mk_le'.1 (h₂ X Y)).some let e := Equiv.ofInjective _ f₁.injective let h : CoreSmallCategoryOfSet Ω C := { obj := Set.range f₁ hom X Y := Set.range (f₂ (e.symm X) (e.symm Y)) objEquiv := e.symm homEquiv {_ _} := by simpa using (Equiv.ofInjective _ ((f₂ _ _).injective)).symm } exact ⟨h.smallCategoryOfSet, ⟨h.equivalence⟩⟩
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Equivalence", "Mathlib.SetTheory.Cardinal.Order" ]
Mathlib/CategoryTheory/SmallRepresentatives.lean
exists_equivalence
null
Square where /-- the top-left object -/ {X₁ : C} /-- the top-right object -/ {X₂ : C} /-- the bottom-left object -/ {X₃ : C} /-- the bottom-right object -/ {X₄ : C} /-- the top morphism -/ f₁₂ : X₁ ⟶ X₂ /-- the left morphism -/ f₁₃ : X₁ ⟶ X₃ /-- the right morphism -/ f₂₄ : X₂ ⟶ X₄ /-- the bottom morphism -/ f₃₄ : X₃ ⟶ X₄ fac : f₁₂ ≫ f₂₄ = f₁₃ ≫ f₃₄
structure
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
Square
The category of commutative squares in a category.
commSq (sq : Square C) : CommSq sq.f₁₂ sq.f₁₃ sq.f₂₄ sq.f₃₄ where w := sq.fac
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
commSq
null
@[ext] Hom (sq₁ sq₂ : Square C) where /-- the top-left morphism -/ τ₁ : sq₁.X₁ ⟶ sq₂.X₁ /-- the top-right morphism -/ τ₂ : sq₁.X₂ ⟶ sq₂.X₂ /-- the bottom-left morphism -/ τ₃ : sq₁.X₃ ⟶ sq₂.X₃ /-- the bottom-right morphism -/ τ₄ : sq₁.X₄ ⟶ sq₂.X₄ comm₁₂ : sq₁.f₁₂ ≫ τ₂ = τ₁ ≫ sq₂.f₁₂ := by cat_disch comm₁₃ : sq₁.f₁₃ ≫ τ₃ = τ₁ ≫ sq₂.f₁₃ := by cat_disch comm₂₄ : sq₁.f₂₄ ≫ τ₄ = τ₂ ≫ sq₂.f₂₄ := by cat_disch comm₃₄ : sq₁.f₃₄ ≫ τ₄ = τ₃ ≫ sq₂.f₃₄ := by cat_disch
structure
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
Hom
A morphism between two commutative squares consists of 4 morphisms which extend these two squares into a commuting cube.
@[simps] id (sq : Square C) : Hom sq sq where τ₁ := 𝟙 _ τ₂ := 𝟙 _ τ₃ := 𝟙 _ τ₄ := 𝟙 _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
id
The identity of a commutative square.
@[simps] comp {sq₁ sq₂ sq₃ : Square C} (f : Hom sq₁ sq₂) (g : Hom sq₂ sq₃) : Hom sq₁ sq₃ where τ₁ := f.τ₁ ≫ g.τ₁ τ₂ := f.τ₂ ≫ g.τ₂ τ₃ := f.τ₃ ≫ g.τ₃ τ₄ := f.τ₄ ≫ g.τ₄
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
comp
The composition of morphisms of squares.
@[simps!] category : Category (Square C) where Hom := Hom id := Hom.id comp := Hom.comp @[ext]
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
category
null
hom_ext {sq₁ sq₂ : Square C} {f g : sq₁ ⟶ sq₂} (h₁ : f.τ₁ = g.τ₁) (h₂ : f.τ₂ = g.τ₂) (h₃ : f.τ₃ = g.τ₃) (h₄ : f.τ₄ = g.τ₄) : f = g := Hom.ext h₁ h₂ h₃ h₄
lemma
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
hom_ext
null
isoMk {sq₁ sq₂ : Square C} (e₁ : sq₁.X₁ ≅ sq₂.X₁) (e₂ : sq₁.X₂ ≅ sq₂.X₂) (e₃ : sq₁.X₃ ≅ sq₂.X₃) (e₄ : sq₁.X₄ ≅ sq₂.X₄) (comm₁₂ : sq₁.f₁₂ ≫ e₂.hom = e₁.hom ≫ sq₂.f₁₂) (comm₁₃ : sq₁.f₁₃ ≫ e₃.hom = e₁.hom ≫ sq₂.f₁₃) (comm₂₄ : sq₁.f₂₄ ≫ e₄.hom = e₂.hom ≫ sq₂.f₂₄) (comm₃₄ : sq₁.f₃₄ ≫ e₄.hom = e₃.hom ≫ sq₂.f₃₄) : sq₁ ≅ sq₂ where hom := { τ₁ := e₁.hom τ₂ := e₂.hom τ₃ := e₃.hom τ₄ := e₄.hom } inv := { τ₁ := e₁.inv τ₂ := e₂.inv τ₃ := e₃.inv τ₄ := e₄.inv comm₁₂ := by simp only [← cancel_mono e₂.hom, assoc, Iso.inv_hom_id, comp_id, comm₁₂, Iso.inv_hom_id_assoc] comm₁₃ := by simp only [← cancel_mono e₃.hom, assoc, Iso.inv_hom_id, comp_id, comm₁₃, Iso.inv_hom_id_assoc] comm₂₄ := by simp only [← cancel_mono e₄.hom, assoc, Iso.inv_hom_id, comp_id, comm₂₄, Iso.inv_hom_id_assoc] comm₃₄ := by simp only [← cancel_mono e₄.hom, assoc, Iso.inv_hom_id, comp_id, comm₃₄, Iso.inv_hom_id_assoc] }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
isoMk
Constructor for isomorphisms in `Square c`
@[simps] flip (sq : Square C) : Square C where f₁₂ := sq.f₁₃ f₁₃ := sq.f₁₂ f₂₄ := sq.f₃₄ f₃₄ := sq.f₂₄ fac := sq.fac.symm
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
flip
Flipping a square by switching the top-right and the bottom-left objects.
@[simps] flipFunctor : Square C ⥤ Square C where obj := flip map φ := { τ₁ := φ.τ₁ τ₂ := φ.τ₃ τ₃ := φ.τ₂ τ₄ := φ.τ₄ }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
flipFunctor
The functor which flips commutative squares.
@[simps] flipEquivalence : Square C ≌ Square C where functor := flipFunctor inverse := flipFunctor unitIso := Iso.refl _ counitIso := Iso.refl _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
flipEquivalence
Flipping commutative squares is an auto-equivalence.
@[simps!] toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C) where obj sq := Arrow.mk (Arrow.homMk _ _ sq.fac : Arrow.mk sq.f₁₃ ⟶ Arrow.mk sq.f₂₄) map φ := Arrow.homMk (Arrow.homMk _ _ φ.comm₁₃.symm) (Arrow.homMk _ _ φ.comm₂₄.symm)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
toArrowArrowFunctor
The functor `Square C ⥤ Arrow (Arrow C)` which sends a commutative square `sq` to the obvious arrow from the left morphism of `sq` to the right morphism of `sq`.
@[simps!] fromArrowArrowFunctor : Arrow (Arrow C) ⥤ Square C where obj f := { fac := f.hom.w, .. } map φ := { τ₁ := φ.left.left τ₂ := φ.right.left τ₃ := φ.left.right τ₄ := φ.right.right comm₁₂ := Arrow.leftFunc.congr_map φ.w.symm comm₁₃ := φ.left.w.symm comm₂₄ := φ.right.w.symm comm₃₄ := Arrow.rightFunc.congr_map φ.w.symm }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
fromArrowArrowFunctor
The functor `Arrow (Arrow C) ⥤ Square C` which sends a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square with `f` on the left side and `g` on the right side.
@[simps] arrowArrowEquivalence : Square C ≌ Arrow (Arrow C) where functor := toArrowArrowFunctor inverse := fromArrowArrowFunctor unitIso := Iso.refl _ counitIso := Iso.refl _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
arrowArrowEquivalence
The equivalence `Square C ≌ Arrow (Arrow C)` which sends a commutative square `sq` to the obvious arrow from the left morphism of `sq` to the right morphism of `sq`.
@[simps!] toArrowArrowFunctor' : Square C ⥤ Arrow (Arrow C) where obj sq := Arrow.mk (Arrow.homMk _ _ sq.fac.symm : Arrow.mk sq.f₁₂ ⟶ Arrow.mk sq.f₃₄) map φ := Arrow.homMk (Arrow.homMk _ _ φ.comm₁₂.symm) (Arrow.homMk _ _ φ.comm₃₄.symm)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
toArrowArrowFunctor'
The functor `Square C ⥤ Arrow (Arrow C)` which sends a commutative square `sq` to the obvious arrow from the top morphism of `sq` to the bottom morphism of `sq`.
@[simps!] fromArrowArrowFunctor' : Arrow (Arrow C) ⥤ Square C where obj f := { fac := f.hom.w.symm, .. } map φ := { τ₁ := φ.left.left τ₂ := φ.left.right τ₃ := φ.right.left τ₄ := φ.right.right comm₁₂ := φ.left.w.symm comm₁₃ := Arrow.leftFunc.congr_map φ.w.symm comm₂₄ := Arrow.rightFunc.congr_map φ.w.symm comm₃₄ := φ.right.w.symm }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
fromArrowArrowFunctor'
The functor `Arrow (Arrow C) ⥤ Square C` which sends a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square with `f` on the top side and `g` on the bottom side.
@[simps] arrowArrowEquivalence' : Square C ≌ Arrow (Arrow C) where functor := toArrowArrowFunctor' inverse := fromArrowArrowFunctor' unitIso := Iso.refl _ counitIso := Iso.refl _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
arrowArrowEquivalence'
The equivalence `Square C ≌ Arrow (Arrow C)` which sends a commutative square `sq` to the obvious arrow from the top morphism of `sq` to the bottom morphism of `sq`.
@[simps] evaluation₁ : Square C ⥤ C where obj sq := sq.X₁ map φ := φ.τ₁
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
evaluation₁
The top-left evaluation `Square C ⥤ C`.
@[simps] evaluation₂ : Square C ⥤ C where obj sq := sq.X₂ map φ := φ.τ₂
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
evaluation₂
The top-right evaluation `Square C ⥤ C`.
@[simps] evaluation₃ : Square C ⥤ C where obj sq := sq.X₃ map φ := φ.τ₃
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
evaluation₃
The bottom-left evaluation `Square C ⥤ C`.
@[simps] evaluation₄ : Square C ⥤ C where obj sq := sq.X₄ map φ := φ.τ₄
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
evaluation₄
The bottom-right evaluation `Square C ⥤ C`.
@[simps] protected op (sq : Square C) : Square Cᵒᵖ where f₁₂ := sq.f₂₄.op f₁₃ := sq.f₃₄.op f₂₄ := sq.f₁₂.op f₃₄ := sq.f₁₃.op fac := Quiver.Hom.unop_inj sq.fac
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
op
The map `Square C → Square Cᵒᵖ` which switches `X₁` and `X₃`, but does not move `X₂` and `X₃`.
@[simps] protected unop (sq : Square Cᵒᵖ) : Square C where f₁₂ := sq.f₂₄.unop f₁₃ := sq.f₃₄.unop f₂₄ := sq.f₁₂.unop f₃₄ := sq.f₁₃.unop fac := Quiver.Hom.op_inj sq.fac
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
unop
The map `Square Cᵒᵖ → Square C` which switches `X₁` and `X₃`, but does not move `X₂` and `X₃`.
@[simps] opFunctor : (Square C)ᵒᵖ ⥤ Square Cᵒᵖ where obj sq := sq.unop.op map φ := { τ₁ := φ.unop.τ₄.op τ₂ := φ.unop.τ₂.op τ₃ := φ.unop.τ₃.op τ₄ := φ.unop.τ₁.op comm₁₂ := Quiver.Hom.unop_inj (by simp) comm₁₃ := Quiver.Hom.unop_inj (by simp) comm₂₄ := Quiver.Hom.unop_inj (by simp) comm₃₄ := Quiver.Hom.unop_inj (by simp) }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
opFunctor
The functor `(Square C)ᵒᵖ ⥤ Square Cᵒᵖ`.
unopFunctor : (Square Cᵒᵖ)ᵒᵖ ⥤ Square C where obj sq := sq.unop.unop map φ := { τ₁ := φ.unop.τ₄.unop τ₂ := φ.unop.τ₂.unop τ₃ := φ.unop.τ₃.unop τ₄ := φ.unop.τ₁.unop comm₁₂ := Quiver.Hom.op_inj (by simp) comm₁₃ := Quiver.Hom.op_inj (by simp) comm₂₄ := Quiver.Hom.op_inj (by simp) comm₃₄ := Quiver.Hom.op_inj (by simp) }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
unopFunctor
The functor `(Square Cᵒᵖ)ᵒᵖ ⥤ Square Cᵒᵖ`.
opEquivalence : (Square C)ᵒᵖ ≌ Square Cᵒᵖ where functor := opFunctor inverse := unopFunctor.rightOp unitIso := Iso.refl _ counitIso := Iso.refl _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
opEquivalence
The equivalence `(Square C)ᵒᵖ ≌ Square Cᵒᵖ`.
@[simps] map (sq : Square C) (F : C ⥤ D) : Square D where f₁₂ := F.map sq.f₁₂ f₁₃ := F.map sq.f₁₃ f₂₄ := F.map sq.f₂₄ f₃₄ := F.map sq.f₃₄ fac := by simpa using F.congr_map sq.fac
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
map
The image of a commutative square by a functor.
@[simps] mapSquare (F : C ⥤ D) : Square C ⥤ Square D where obj sq := sq.map F map φ := { τ₁ := F.map φ.τ₁ τ₂ := F.map φ.τ₂ τ₃ := F.map φ.τ₃ τ₄ := F.map φ.τ₄ comm₁₂ := by simpa only [Functor.map_comp] using F.congr_map φ.comm₁₂ comm₁₃ := by simpa only [Functor.map_comp] using F.congr_map φ.comm₁₃ comm₂₄ := by simpa only [Functor.map_comp] using F.congr_map φ.comm₂₄ comm₃₄ := by simpa only [Functor.map_comp] using F.congr_map φ.comm₃₄ }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
mapSquare
The functor `Square C ⥤ Square D` induced by a functor `C ⥤ D`.
@[simps] NatTrans.mapSquare {F G : C ⥤ D} (τ : F ⟶ G) : F.mapSquare ⟶ G.mapSquare where app sq := { τ₁ := τ.app _ τ₂ := τ.app _ τ₃ := τ.app _ τ₄ := τ.app _ }
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
NatTrans.mapSquare
The natural transformation `F.mapSquare ⟶ G.mapSquare` induces by a natural transformation `F ⟶ G`.
@[simps] Square.mapFunctor : (C ⥤ D) ⥤ Square C ⥤ Square D where obj F := F.mapSquare map τ := NatTrans.mapSquare τ
def
CategoryTheory
[ "Mathlib.CategoryTheory.Comma.Arrow", "Mathlib.CategoryTheory.CommSq" ]
Mathlib/CategoryTheory/Square.lean
Square.mapFunctor
The functor `(C ⥤ D) ⥤ Square C ⥤ Square D`.
IsSubterminal (A : C) : Prop := ∀ ⦃Z : C⦄ (f g : Z ⟶ A), f = g
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal
An object `A` is subterminal iff for any `Z`, there is at most one morphism `Z ⟶ A`.
IsSubterminal.def : IsSubterminal A ↔ ∀ ⦃Z : C⦄ (f g : Z ⟶ A), f = g := Iff.rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal.def
null
IsSubterminal.mono_isTerminal_from (hA : IsSubterminal A) {T : C} (hT : IsTerminal T) : Mono (hT.from A) := { right_cancellation := fun _ _ _ => hA _ _ }
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal.mono_isTerminal_from
If `A` is subterminal, the unique morphism from it to a terminal object is a monomorphism. The converse of `isSubterminal_of_mono_isTerminal_from`.
IsSubterminal.mono_terminal_from [HasTerminal C] (hA : IsSubterminal A) : Mono (terminal.from A) := hA.mono_isTerminal_from terminalIsTerminal
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal.mono_terminal_from
If `A` is subterminal, the unique morphism from it to the terminal object is a monomorphism. The converse of `isSubterminal_of_mono_terminal_from`.
isSubterminal_of_mono_isTerminal_from {T : C} (hT : IsTerminal T) [Mono (hT.from A)] : IsSubterminal A := fun Z f g => by rw [← cancel_mono (hT.from A)] apply hT.hom_ext
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
isSubterminal_of_mono_isTerminal_from
If the unique morphism from `A` to a terminal object is a monomorphism, `A` is subterminal. The converse of `IsSubterminal.mono_isTerminal_from`.
isSubterminal_of_mono_terminal_from [HasTerminal C] [Mono (terminal.from A)] : IsSubterminal A := fun Z f g => by rw [← cancel_mono (terminal.from A)] subsingleton
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
isSubterminal_of_mono_terminal_from
If the unique morphism from `A` to the terminal object is a monomorphism, `A` is subterminal. The converse of `IsSubterminal.mono_terminal_from`.
isSubterminal_of_isTerminal {T : C} (hT : IsTerminal T) : IsSubterminal T := fun _ _ _ => hT.hom_ext _ _
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
isSubterminal_of_isTerminal
null
isSubterminal_of_terminal [HasTerminal C] : IsSubterminal (⊤_ C) := fun _ _ _ => by subsingleton
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
isSubterminal_of_terminal
null
IsSubterminal.isIso_diag (hA : IsSubterminal A) [HasBinaryProduct A A] : IsIso (diag A) := ⟨⟨Limits.prod.fst, ⟨by simp, by rw [IsSubterminal.def] at hA cat_disch⟩⟩⟩
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal.isIso_diag
If `A` is subterminal, its diagonal morphism is an isomorphism. The converse of `isSubterminal_of_isIso_diag`.
isSubterminal_of_isIso_diag [HasBinaryProduct A A] [IsIso (diag A)] : IsSubterminal A := fun Z f g => by have : (Limits.prod.fst : A ⨯ A ⟶ _) = Limits.prod.snd := by simp [← cancel_epi (diag A)] rw [← prod.lift_fst f g, this, prod.lift_snd]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
isSubterminal_of_isIso_diag
If the diagonal morphism of `A` is an isomorphism, then it is subterminal. The converse of `isSubterminal.isIso_diag`.
@[simps!] IsSubterminal.isoDiag (hA : IsSubterminal A) [HasBinaryProduct A A] : A ⨯ A ≅ A := by letI := IsSubterminal.isIso_diag hA apply (asIso (diag A)).symm variable (C)
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
IsSubterminal.isoDiag
If `A` is subterminal, it is isomorphic to `A ⨯ A`.
Subterminals (C : Type u₁) [Category.{v₁} C] := ObjectProperty.FullSubcategory fun A : C => IsSubterminal A
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
Subterminals
The (full sub)category of subterminal objects. TODO: If `C` is the category of sheaves on a topological space `X`, this category is equivalent to the lattice of open subsets of `X`. More generally, if `C` is a topos, this is the lattice of "external truth values".
@[simps!] subterminalInclusion : Subterminals C ⥤ C := ObjectProperty.ι _
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
subterminalInclusion
The inclusion of the subterminal objects into the original category.
subterminals_thin (X Y : Subterminals C) : Subsingleton (X ⟶ Y) := ⟨fun f g => Y.2 f g⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
subterminals_thin
null
@[simps] subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C) where functor := { obj := fun X => ⟨Over.mk (terminal.from X.1), X.2.mono_terminal_from⟩ map := fun f => MonoOver.homMk f (by ext1 ⟨⟨⟩⟩) } inverse := { obj := fun X => ⟨X.obj.left, fun Z f g => by rw [← cancel_mono X.arrow] subsingleton⟩ map := fun f => f.1 } unitIso := NatIso.ofComponents (fun X => Iso.refl X) (by subsingleton) counitIso := NatIso.ofComponents (fun X => MonoOver.isoMk (Iso.refl _)) (by subsingleton) functor_unitIso_comp := by subsingleton @[simp]
def
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
subterminalsEquivMonoOverTerminal
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal object (which is in turn equivalent to the subobjects of the terminal object).
subterminals_to_monoOver_terminal_comp_forget [HasTerminal C] : (subterminalsEquivMonoOverTerminal C).functor ⋙ MonoOver.forget _ ⋙ Over.forget _ = subterminalInclusion C := rfl @[simp]
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
subterminals_to_monoOver_terminal_comp_forget
null
monoOver_terminal_to_subterminals_comp [HasTerminal C] : (subterminalsEquivMonoOverTerminal C).inverse ⋙ subterminalInclusion C = MonoOver.forget _ ⋙ Over.forget _ := rfl
theorem
CategoryTheory
[ "Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts", "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "Mathlib.CategoryTheory.Subobject.MonoOver" ]
Mathlib/CategoryTheory/Subterminal.lean
monoOver_terminal_to_subterminals_comp
null
thin_category : Category C where
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.Category", "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/Thin.lean
thin_category
Construct a category instance from a category_struct, using the fact that hom spaces are subsingletons to prove the axioms.
functor_thin : Quiver.IsThin (D ⥤ C) := fun _ _ => ⟨fun α β => NatTrans.ext (by subsingleton)⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.Category", "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/Thin.lean
functor_thin
If `C` is a thin category, then `D ⥤ C` is a thin category.
iso_of_both_ways {X Y : C} (f : X ⟶ Y) (g : Y ⟶ X) : X ≅ Y where hom := f inv := g
def
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.Category", "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/Thin.lean
iso_of_both_ways
To show `X ≅ Y` in a thin category, it suffices to just give any morphism in each direction.
subsingleton_iso {X Y : C} : Subsingleton (X ≅ Y) := ⟨by intro i₁ i₂ ext1 subsingleton⟩
instance
CategoryTheory
[ "Mathlib.CategoryTheory.Functor.Category", "Mathlib.CategoryTheory.Iso" ]
Mathlib/CategoryTheory/Thin.lean
subsingleton_iso
null