The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V24. Category theory

Mathlib.CategoryTheory.FintypeCat

59 declarations. Mathlib docs · Source

abbrev FintypeCat E3 #

Type (u_1 + 1)

The category of finite types.

abbrev FintypeCat.of E1 #

(X : Type u_1) → [Finite X] → FintypeCat

Construct a term of FintypeCat from a type endowed with a Finite instance.

def FintypeCat.delabOf E1 #

Lean.PrettyPrinter.Delaborator.Delab

This prints FintypeCat.of X as ↧X.

instance FintypeCat.instCoeSort E0 #

CoeSort FintypeCat (Type u_1)

instance FintypeCat.instInhabited E0 #

Inhabited FintypeCat

instance FintypeCat.instFiniteObj E0 #

∀ {X : FintypeCat}, Finite X.obj

def FintypeCat.fintype E1 #

{X : FintypeCat} → Fintype X.obj

A Fintype instance on objects on FintypeCat, that should be turned on as needed. Prefer the Finite instance if possible.

abbrev FintypeCat.incl E1 #

CategoryTheory.Functor FintypeCat (Type u_1)

The fully faithful embedding of FintypeCat into the category of types.

theorem FintypeCat.incl_map E0 #

∀ {X Y : CategoryTheory.InducedCategory (Type u_1) CategoryTheory.ObjectProperty.FullSubcategory.obj} (f : X ⟶ Y),
  FintypeCat.incl.map f = f.hom

theorem FintypeCat.incl_obj E0 #

∀ (self : CategoryTheory.ObjectProperty.FullSubcategory Finite), FintypeCat.incl.obj self = self.obj

instance FintypeCat.instFullIncl E0 #

FintypeCat.incl.Full

instance FintypeCat.instFaithfulIncl E0 #

FintypeCat.incl.Faithful

instance FintypeCat.instFullForgetFunObjFinite E0 #

(CategoryTheory.forget FintypeCat).Full

Help typeclass inference infer fullness of forgetful functor.

theorem FintypeCat.id_apply E0 #

∀ (X : FintypeCat) (x : X.obj), (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.id X)) x = x

theorem FintypeCat.comp_apply E0 #

∀ {X Y Z : FintypeCat} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X.obj),
  (CategoryTheory.ConcreteCategory.hom (CategoryTheory.CategoryStruct.comp f g)) x =
    (CategoryTheory.ConcreteCategory.hom g) ((CategoryTheory.ConcreteCategory.hom f) x)

theorem FintypeCat.hom_apply E0 #

∀ {X Y : FintypeCat} (f : X ⟶ Y) (x : X.obj),
  (CategoryTheory.ConcreteCategory.hom f.hom) x = (CategoryTheory.ConcreteCategory.hom f) x

theorem FintypeCat.hom_inv_id_apply E0 #

∀ {X Y : FintypeCat} (f : X ≅ Y) (x : X.obj),
  (CategoryTheory.ConcreteCategory.hom f.inv) ((CategoryTheory.ConcreteCategory.hom f.hom) x) = x

theorem FintypeCat.inv_hom_id_apply E0 #

∀ {X Y : FintypeCat} (f : X ≅ Y) (y : Y.obj),
  (CategoryTheory.ConcreteCategory.hom f.hom) ((CategoryTheory.ConcreteCategory.hom f.inv) y) = y

theorem FintypeCat.hom_ext_iff E0 #

∀ {X Y : FintypeCat} {f g : X ⟶ Y},
  f = g ↔
    ∀ (x : (fun X ↦ X.obj) X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x

theorem FintypeCat.hom_ext E1 #

∀ {X Y : FintypeCat} (f g : X ⟶ Y),
  (∀ (x : (fun X ↦ X.obj) X), (CategoryTheory.ConcreteCategory.hom f) x = (CategoryTheory.ConcreteCategory.hom g) x) →
    f = g

def FintypeCat.homMk E1 #

{X Y : FintypeCat} → (X.obj → Y.obj) → (X ⟶ Y)

Constructor for morphisms in FintypeCat.

theorem FintypeCat.homMk_apply E0 #

∀ {X Y : FintypeCat} (f : X.obj → Y.obj) (x : X.obj), (CategoryTheory.ConcreteCategory.hom (FintypeCat.homMk f)) x = f x

theorem FintypeCat.id_hom E0 #

∀ (X : FintypeCat), CategoryTheory.CategoryStruct.id X.obj = TypeCat.ofHom id

theorem FintypeCat.comp_hom E0 #

∀ {X Y Z : FintypeCat} (f : X ⟶ Y) (g : Y ⟶ Z),
  CategoryTheory.CategoryStruct.comp f.hom g.hom =
    TypeCat.ofHom (⇑(CategoryTheory.ConcreteCategory.hom g.hom) ∘ ⇑(CategoryTheory.ConcreteCategory.hom f.hom))

theorem FintypeCat.comp_hom_assoc E1 #

∀ {X Y Z : FintypeCat} (f : X ⟶ Y) (g : Y ⟶ Z) {Z_1 : Type u_1} (h : Z.obj ⟶ Z_1),
  CategoryTheory.CategoryStruct.comp f.hom (CategoryTheory.CategoryStruct.comp g.hom h) =
    CategoryTheory.CategoryStruct.comp
      (TypeCat.ofHom (⇑(CategoryTheory.ConcreteCategory.hom g.hom) ∘ ⇑(CategoryTheory.ConcreteCategory.hom f.hom))) h

theorem FintypeCat.homMk_eq_id_iff E0 #

∀ {X : FintypeCat} (f : X.obj → X.obj), FintypeCat.homMk f = CategoryTheory.CategoryStruct.id X ↔ f = id

theorem FintypeCat.homMk_eq_comp_iff E0 #

∀ {X Y Z : FintypeCat} (f : X.obj → Y.obj) (g : Y.obj → Z.obj) (h : X.obj → Z.obj),
  FintypeCat.homMk h = CategoryTheory.CategoryStruct.comp (FintypeCat.homMk f) (FintypeCat.homMk g) ↔ h = g ∘ f

def FintypeCat.equivEquivIso E1 #

{A B : FintypeCat} → A.obj ≃ B.obj ≃ (A ≅ B)

Equivalences between finite types are the same as isomorphisms in FintypeCat.

theorem FintypeCat.equivEquivIso_apply_hom E0 #

∀ {A B : FintypeCat} (e : A.obj ≃ B.obj), (FintypeCat.equivEquivIso e).hom = FintypeCat.homMk ⇑e

theorem FintypeCat.equivEquivIso_symm_apply_symm_apply E0 #

∀ {A B : FintypeCat} (i : A ≅ B) (a : B.obj),
  (FintypeCat.equivEquivIso.symm i).symm a = (CategoryTheory.ConcreteCategory.hom i.inv) a

theorem FintypeCat.equivEquivIso_apply_inv E0 #

∀ {A B : FintypeCat} (e : A.obj ≃ B.obj), (FintypeCat.equivEquivIso e).inv = FintypeCat.homMk ⇑e.symm

theorem FintypeCat.equivEquivIso_symm_apply_apply E0 #

∀ {A B : FintypeCat} (i : A ≅ B) (a : A.obj),
  (FintypeCat.equivEquivIso.symm i) a = (CategoryTheory.ConcreteCategory.hom i.hom) a

instance FintypeCat.instFiniteHom E0 #

∀ (X Y : FintypeCat), Finite (X ⟶ Y)

instance FintypeCat.instFiniteIso E0 #

∀ (X Y : FintypeCat), Finite (X ≅ Y)

instance FintypeCat.instFiniteAut E0 #

∀ (X : FintypeCat), Finite (CategoryTheory.Aut X)

def FintypeCat.Skeleton E1 #

Type u

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 FintypeCat.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 FintypeCat.{u}.

def FintypeCat.Skeleton.mk E1 #

ℕ → FintypeCat.Skeleton

Given any natural number n, this creates the associated object of FintypeCat.Skeleton.

instance FintypeCat.Skeleton.instInhabited E0 #

Inhabited FintypeCat.Skeleton

def FintypeCat.Skeleton.len E1 #

FintypeCat.Skeleton → ℕ

Given any object of FintypeCat.Skeleton, this returns the associated natural number.

theorem FintypeCat.Skeleton.ext_iff E0 #

∀ {X Y : FintypeCat.Skeleton}, X = Y ↔ X.len = Y.len

theorem FintypeCat.Skeleton.ext E1 #

∀ (X Y : FintypeCat.Skeleton), X.len = Y.len → X = Y

instance FintypeCat.Skeleton.instSmallCategory E0 #

CategoryTheory.SmallCategory FintypeCat.Skeleton

theorem FintypeCat.Skeleton.is_skeletal E1 #

CategoryTheory.Skeletal FintypeCat.Skeleton

def FintypeCat.Skeleton.incl E1 #

CategoryTheory.Functor FintypeCat.Skeleton FintypeCat

The canonical fully faithful embedding of FintypeCat.Skeleton into FintypeCat.

instance FintypeCat.Skeleton.instFullIncl E0 #

FintypeCat.Skeleton.incl.Full

instance FintypeCat.Skeleton.instFaithfulIncl E0 #

FintypeCat.Skeleton.incl.Faithful

instance FintypeCat.Skeleton.instEssSurjIncl E0 #

FintypeCat.Skeleton.incl.EssSurj

instance FintypeCat.Skeleton.instIsEquivalenceIncl E0 #

FintypeCat.Skeleton.incl.IsEquivalence

def FintypeCat.Skeleton.equivalence E1 #

FintypeCat.Skeleton ≌ FintypeCat

The equivalence between FintypeCat.Skeleton and FintypeCat.

theorem FintypeCat.Skeleton.incl_mk_nat_card E0 #

∀ (n : ℕ), Fintype.card (FintypeCat.Skeleton.incl.obj (FintypeCat.Skeleton.mk n)).obj = n

theorem FintypeCat.isSkeleton E1 #

CategoryTheory.IsSkeletonOf FintypeCat FintypeCat.Skeleton FintypeCat.Skeleton.incl

FintypeCat.Skeleton is a skeleton of FintypeCat.

def FintypeCat.uSwitch E1 #

CategoryTheory.Functor FintypeCat FintypeCat

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)).

def FintypeCat.uSwitchEquiv E1 #

(X : FintypeCat) → (FintypeCat.uSwitch.obj X).obj ≃ X.obj

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}.

theorem FintypeCat.uSwitchEquiv_naturality E1 #

∀ {X Y : FintypeCat} (f : X ⟶ Y) (x : (FintypeCat.uSwitch.obj X).obj),
  (CategoryTheory.ConcreteCategory.hom f) (X.uSwitchEquiv x) =
    Y.uSwitchEquiv ((CategoryTheory.ConcreteCategory.hom (FintypeCat.uSwitch.map f)) x)

theorem FintypeCat.uSwitchEquiv_symm_naturality E1 #

∀ {X Y : FintypeCat} (f : X ⟶ Y) (x : X.obj),
  (CategoryTheory.ConcreteCategory.hom (FintypeCat.uSwitch.map f)) (X.uSwitchEquiv.symm x) =
    Y.uSwitchEquiv.symm ((CategoryTheory.ConcreteCategory.hom f) x)

theorem FintypeCat.uSwitch_map_uSwitch_map E1 #

∀ {X Y : FintypeCat} (f : X ⟶ Y),
  FintypeCat.uSwitch.map (FintypeCat.uSwitch.map f) =
    CategoryTheory.CategoryStruct.comp
      (FintypeCat.equivEquivIso ((FintypeCat.uSwitch.obj X).uSwitchEquiv.trans X.uSwitchEquiv)).hom
      (CategoryTheory.CategoryStruct.comp f
        (FintypeCat.equivEquivIso ((FintypeCat.uSwitch.obj Y).uSwitchEquiv.trans Y.uSwitchEquiv)).inv)

def FintypeCat.uSwitchEquivalence E1 #

FintypeCat ≌ FintypeCat

uSwitch.{u, v} is an equivalence of categories with quasi-inverse uSwitch.{v, u}.

instance FintypeCat.instIsEquivalenceUSwitch E0 #

FintypeCat.uSwitch.IsEquivalence

theorem FunctorToFintypeCat.naturality E1 #

∀ {C : Type u} [inst : CategoryTheory.Category.{v, u} C] (F G : CategoryTheory.Functor C FintypeCat) {X Y : C}
  (σ : F ⟶ G) (f : X ⟶ Y) (x : (F.obj X).obj),
  (CategoryTheory.ConcreteCategory.hom (σ.app Y)) ((CategoryTheory.ConcreteCategory.hom (F.map f)) x) =
    (CategoryTheory.ConcreteCategory.hom (G.map f)) ((CategoryTheory.ConcreteCategory.hom (σ.app X)) x)