The areas / V24. Category theory
Mathlib.CategoryTheory.Category.RelCat
32 declarations. Mathlib docs · Source
theorem CategoryTheory.RelCat.Hom.ofRel.inj E1 #
∀ {X Y : CategoryTheory.RelCat} {rel rel_1 : SetRel X Y}, { rel := rel } = { rel := rel_1 } → rel = rel_1
theorem CategoryTheory.RelCat.Hom.ofRel.injEq E0 #
∀ {X Y : CategoryTheory.RelCat} (rel rel_1 : SetRel X Y), ({ rel := rel } = { rel := rel_1 }) = (rel = rel_1)
def CategoryTheory.RelCat.Hom.ctorIdx E1 #
{X Y : CategoryTheory.RelCat} → X.Hom Y → ℕ
def CategoryTheory.RelCat E1 #
Type (u + 1)
A type synonym for Type u, which carries the category instance for which
morphisms are binary relations.
instance CategoryTheory.instInhabitedRelCat E0 #
Inhabited CategoryTheory.RelCat
structure CategoryTheory.RelCat.Hom E1 #
CategoryTheory.RelCat → CategoryTheory.RelCat → Type u
The morphisms in the relation category are relations.
ctor CategoryTheory.RelCat.Hom.ofRel E0 #
{X Y : CategoryTheory.RelCat} → SetRel X Y → X.Hom Y
Build a morphism X ⟶ Y for X Y : RelCat from a relation between X and Y.
abbrev CategoryTheory.RelCat.Hom.rel E1 #
{X Y : CategoryTheory.RelCat} → X.Hom Y → SetRel X Y
The underlying relation between X and Y of a morphism X ⟶ Y for X Y : RelCat.
instance CategoryTheory.RelCat.instLargeCategory E0 #
CategoryTheory.LargeCategory CategoryTheory.RelCat
The category of types with binary relations as morphisms.
theorem CategoryTheory.RelCat.Hom.ext E1 #
∀ {X Y : CategoryTheory.RelCat} (f g : X ⟶ Y), f.rel = g.rel → f = g
theorem CategoryTheory.RelCat.Hom.ext_iff E0 #
∀ {X Y : CategoryTheory.RelCat} {f g : X ⟶ Y}, f = g ↔ f.rel = g.rel
theorem CategoryTheory.RelCat.Hom.rel_id E0 #
∀ (X : CategoryTheory.RelCat), (CategoryTheory.CategoryStruct.id X).rel = SetRel.id
theorem CategoryTheory.RelCat.Hom.rel_comp E0 #
∀ {X Y Z : CategoryTheory.RelCat} (f : X ⟶ Y) (g : Y ⟶ Z),
(CategoryTheory.CategoryStruct.comp f g).rel = f.rel.comp g.rel
theorem CategoryTheory.RelCat.Hom.rel_id_apply₂ E1 #
∀ {X : CategoryTheory.RelCat} (x y : X), (x, y) ∈ (CategoryTheory.CategoryStruct.id X).rel ↔ x = y
theorem CategoryTheory.RelCat.Hom.rel_comp_apply₂ E1 #
∀ {X Y Z : CategoryTheory.RelCat} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) (z : Z),
(x, z) ∈ (CategoryTheory.CategoryStruct.comp f g).rel ↔ ∃ y, (x, y) ∈ f.rel ∧ (y, z) ∈ g.rel
def CategoryTheory.RelCat.graphFunctor E1 #
CategoryTheory.Functor (Type u) CategoryTheory.RelCat
The essentially surjective faithful embedding from the category of types and functions into the category of types and relations.
theorem CategoryTheory.RelCat.rel_graphFunctor_map E0 #
∀ {X Y : Type u} (f : X ⟶ Y),
(CategoryTheory.RelCat.graphFunctor.map f).rel = Function.graph ⇑(CategoryTheory.ConcreteCategory.hom f)
theorem CategoryTheory.RelCat.graphFunctor_obj E0 #
∀ (X : Type u), CategoryTheory.RelCat.graphFunctor.obj X = X
instance CategoryTheory.RelCat.graphFunctor_faithful E0 #
CategoryTheory.RelCat.graphFunctor.Faithful
instance CategoryTheory.RelCat.graphFunctor_essSurj E0 #
CategoryTheory.RelCat.graphFunctor.EssSurj
theorem CategoryTheory.RelCat.rel_iso_iff E0 #
∀ {X Y : CategoryTheory.RelCat} (r : X ⟶ Y),
CategoryTheory.IsIso r ↔ ∃ f, CategoryTheory.RelCat.graphFunctor.map f.hom = r
A relation is an isomorphism in RelCat iff it is the image of an isomorphism in
Type u.
def CategoryTheory.RelCat.opFunctor E1 #
CategoryTheory.Functor CategoryTheory.RelCat CategoryTheory.RelCatᵒᵖ
The argument-swap isomorphism from RelCat to its opposite.
def CategoryTheory.RelCat.unopFunctor E1 #
CategoryTheory.Functor CategoryTheory.RelCatᵒᵖ CategoryTheory.RelCat
The other direction of opFunctor.
theorem CategoryTheory.RelCat.opFunctor_comp_unopFunctor_eq E0 #
CategoryTheory.RelCat.opFunctor.comp CategoryTheory.RelCat.unopFunctor = CategoryTheory.Functor.id CategoryTheory.RelCat
theorem CategoryTheory.RelCat.unopFunctor_comp_opFunctor_eq E0 #
CategoryTheory.RelCat.unopFunctor.comp CategoryTheory.RelCat.opFunctor =
CategoryTheory.Functor.id CategoryTheory.RelCatᵒᵖ
def CategoryTheory.RelCat.opEquivalence E1 #
CategoryTheory.RelCat ≌ CategoryTheory.RelCatᵒᵖ
RelCat is self-dual: The map that swaps the argument order of a
relation induces an equivalence between RelCat and its opposite.
theorem CategoryTheory.RelCat.opEquivalence_functor E0 #
CategoryTheory.RelCat.opEquivalence.functor = CategoryTheory.RelCat.opFunctor
theorem CategoryTheory.RelCat.opEquivalence_counitIso E0 #
CategoryTheory.RelCat.opEquivalence.counitIso =
CategoryTheory.Iso.refl (CategoryTheory.RelCat.unopFunctor.comp CategoryTheory.RelCat.opFunctor)
theorem CategoryTheory.RelCat.opEquivalence_inverse E0 #
CategoryTheory.RelCat.opEquivalence.inverse = CategoryTheory.RelCat.unopFunctor
theorem CategoryTheory.RelCat.opEquivalence_unitIso E0 #
CategoryTheory.RelCat.opEquivalence.unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id CategoryTheory.RelCat)
instance CategoryTheory.RelCat.instIsEquivalenceOppositeOpFunctor E0 #
CategoryTheory.RelCat.opFunctor.IsEquivalence
instance CategoryTheory.RelCat.instIsEquivalenceOppositeUnopFunctor E0 #
CategoryTheory.RelCat.unopFunctor.IsEquivalence