The category of elements #
This file defines the category of elements, also known as (a special case of) the Grothendieck construction.
Given a functor F : C ⥤ Type
, an object of F.Elements
is a pair (X : C, x : F.obj X)
.
A morphism (X, x) ⟶ (Y, y)
is a morphism f : X ⟶ Y
in C
, so F.map f
takes x
to y
.
Implementation notes #
This construction is equivalent to a special case of a comma construction, so this is mostly just a
more convenient API. We prove the equivalence in
CategoryTheory.CategoryOfElements.structuredArrowEquivalence
.
References #
- [Emily Riehl, Category Theory in Context, Section 2.4][riehl2017]
- https://en.wikipedia.org/wiki/Category_of_elements
- https://ncatlab.org/nlab/show/category+of+elements
Tags #
category of elements, Grothendieck construction, comma category
The type of objects for the category of elements of a functor F : C ⥤ Type
is a pair (X : C, x : F.obj X)
.
Equations
- F.Elements = ((c : C) × F.obj c)
Instances For
Constructor for the type F.Elements
when F
is a functor to types.
Equations
- F.elementsMk X x = ⟨X, x⟩
Instances For
The category structure on F.Elements
, for F : C ⥤ Type
.
A morphism (X, x) ⟶ (Y, y)
is a morphism f : X ⟶ Y
in C
, so F.map f
takes x
to y
.
Equations
Natural transformations are mapped to functors between category of elements
Equations
- One or more equations did not get rendered due to their size.
Instances For
The functor mapping functors C ⥤ Type w
to their category of elements
Equations
- One or more equations did not get rendered due to their size.
Instances For
Constructor for morphisms in the category of elements of a functor to types.
Equations
- CategoryTheory.CategoryOfElements.homMk x y f hf = ⟨f, hf⟩
Instances For
Constructor for isomorphisms in the category of elements of a functor to types.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.groupoidOfElements F = CategoryTheory.Groupoid.mk (fun {p q : F.Elements} (f : p ⟶ q) => ⟨CategoryTheory.Groupoid.inv ↑f, ⋯⟩) ⋯ ⋯
The functor out of the category of elements which forgets the element.
Equations
- CategoryTheory.CategoryOfElements.π F = { obj := fun (X : F.Elements) => X.fst, map := fun {X Y : F.Elements} (f : X ⟶ Y) => ↑f, map_id := ⋯, map_comp := ⋯ }
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
A natural transformation between functors induces a functor between the categories of elements.
Equations
- CategoryTheory.CategoryOfElements.map α = { obj := fun (t : F₁.Elements) => ⟨t.fst, α.app t.fst t.snd⟩, map := fun {t₁ t₂ : F₁.Elements} (k : t₁ ⟶ t₂) => ⟨↑k, ⋯⟩, map_id := ⋯, map_comp := ⋯ }
Instances For
The forward direction of the equivalence F.Elements ≅ (*, F)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The reverse direction of the equivalence F.Elements ≅ (*, F)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence between the category of elements F.Elements
and the comma category (*, F)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The forward direction of the equivalence F.Elementsᵒᵖ ≅ (yoneda, F)
,
given by CategoryTheory.yonedaEquiv
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The reverse direction of the equivalence F.Elementsᵒᵖ ≅ (yoneda, F)
,
given by CategoryTheory.yonedaEquiv
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence F.Elementsᵒᵖ ≅ (yoneda, F)
given by yoneda lemma.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence (-.Elements)ᵒᵖ ≅ (yoneda, -)
of is actually a natural isomorphism of functors.
The equivalence F.elementsᵒᵖ ≌ (yoneda, F)
is compatible with the forgetful functors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence F.elementsᵒᵖ ≌ (yoneda, F)
is compatible with the forgetful functors.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The initial object in the category of elements for a representable functor. In isInitial
it is
shown that this is initial.
Equations
Instances For
Show that Elements.initial A
is initial in the category of elements for the yoneda
functor.
Equations
- One or more equations did not get rendered due to their size.