The free monoidal category over a type #
Given a type C
, the free monoidal category over C
has as objects formal expressions built from
(formal) tensor products of terms of C
and a formal unit. Its morphisms are compositions and
tensor products of identities, unitors and associators.
In this file, we construct the free monoidal category and prove that it is a monoidal category. If
D
is a monoidal category, we construct the functor FreeMonoidalCategory C ⥤ D
associated to
a function C → D
.
The free monoidal category has two important properties: it is a groupoid and it is thin. The former
is obvious from the construction, and the latter is what is commonly known as the monoidal coherence
theorem. Both of these properties are proved in the file Coherence.lean
.
Given a type C
, the free monoidal category over C
has as objects formal expressions built from
(formal) tensor products of terms of C
and a formal unit. Its morphisms are compositions and
tensor products of identities, unitors and associators.
- of: {C : Type u} → C → CategoryTheory.FreeMonoidalCategory C
- unit: {C : Type u} → CategoryTheory.FreeMonoidalCategory C
- tensor: {C : Type u} → CategoryTheory.FreeMonoidalCategory C → CategoryTheory.FreeMonoidalCategory C → CategoryTheory.FreeMonoidalCategory C
Instances For
Equations
- CategoryTheory.instInhabitedFreeMonoidalCategory = { default := CategoryTheory.FreeMonoidalCategory.unit }
Formal compositions and tensor products of identities, unitors and associators. The morphisms of the free monoidal category are obtained as a quotient of these formal morphisms by the relations defining a monoidal category.
- id: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → X.Hom X
- α_hom: {C : Type u} → (X Y Z : CategoryTheory.FreeMonoidalCategory C) → ((X.tensor Y).tensor Z).Hom (X.tensor (Y.tensor Z))
- α_inv: {C : Type u} → (X Y Z : CategoryTheory.FreeMonoidalCategory C) → (X.tensor (Y.tensor Z)).Hom ((X.tensor Y).tensor Z)
- l_hom: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → (CategoryTheory.FreeMonoidalCategory.unit.tensor X).Hom X
- l_inv: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → X.Hom (CategoryTheory.FreeMonoidalCategory.unit.tensor X)
- ρ_hom: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → (X.tensor CategoryTheory.FreeMonoidalCategory.unit).Hom X
- ρ_inv: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → X.Hom (X.tensor CategoryTheory.FreeMonoidalCategory.unit)
- comp: {C : Type u} → {X Y Z : CategoryTheory.FreeMonoidalCategory C} → X.Hom Y → Y.Hom Z → X.Hom Z
- whiskerLeft: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → {Y₁ Y₂ : CategoryTheory.FreeMonoidalCategory C} → Y₁.Hom Y₂ → (X.tensor Y₁).Hom (X.tensor Y₂)
- whiskerRight: {C : Type u} → {X₁ X₂ : CategoryTheory.FreeMonoidalCategory C} → X₁.Hom X₂ → (Y : CategoryTheory.FreeMonoidalCategory C) → (X₁.tensor Y).Hom (X₂.tensor Y)
- tensor: {C : Type u} → {W X Y Z : CategoryTheory.FreeMonoidalCategory C} → W.Hom Y → X.Hom Z → (W.tensor X).Hom (Y.tensor Z)
Instances For
The morphisms of the free monoidal category satisfy 21 relations ensuring that the resulting category is in fact a category and that it is monoidal.
- refl: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv f f
- symm: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f g : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv f g → CategoryTheory.FreeMonoidalCategory.HomEquiv g f
- trans: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} {f g h : X.Hom Y}, CategoryTheory.FreeMonoidalCategory.HomEquiv f g → CategoryTheory.FreeMonoidalCategory.HomEquiv g h → CategoryTheory.FreeMonoidalCategory.HomEquiv f h
- comp: ∀ {C : Type u} {X Y Z : CategoryTheory.FreeMonoidalCategory C} {f f' : X.Hom Y} {g g' : Y.Hom Z}, CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv g g' → CategoryTheory.FreeMonoidalCategory.HomEquiv (f.comp g) (f'.comp g')
- whiskerLeft: ∀ {C : Type u} (X : CategoryTheory.FreeMonoidalCategory C) {Y Z : CategoryTheory.FreeMonoidalCategory C} (f f' : Y.Hom Z), CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft X f) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft X f')
- whiskerRight: ∀ {C : Type u} {Y Z : CategoryTheory.FreeMonoidalCategory C} (f f' : Y.Hom Z) (X : CategoryTheory.FreeMonoidalCategory C), CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv (f.whiskerRight X) (f'.whiskerRight X)
- tensor: ∀ {C : Type u} {W X Y Z : CategoryTheory.FreeMonoidalCategory C} {f f' : W.Hom X} {g g' : Y.Hom Z}, CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv g g' → CategoryTheory.FreeMonoidalCategory.HomEquiv (f.tensor g) (f'.tensor g')
- tensorHom_def: ∀ {C : Type u} {X₁ Y₁ X₂ Y₂ : CategoryTheory.FreeMonoidalCategory C} (f : X₁.Hom Y₁) (g : X₂.Hom Y₂), CategoryTheory.FreeMonoidalCategory.HomEquiv (f.tensor g) ((f.whiskerRight X₂).comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft Y₁ g))
- comp_id: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (f.comp (CategoryTheory.FreeMonoidalCategory.Hom.id Y)) f
- id_comp: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.id X).comp f) f
- assoc: ∀ {C : Type u} {X Y U V : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom U) (g : U.Hom V) (h : V.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv ((f.comp g).comp h) (f.comp (g.comp h))
- tensor_id: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.id X).tensor (CategoryTheory.FreeMonoidalCategory.Hom.id Y)) (CategoryTheory.FreeMonoidalCategory.Hom.id (X.tensor Y))
- tensor_comp: ∀ {C : Type u} {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : CategoryTheory.FreeMonoidalCategory C} (f₁ : X₁.Hom Y₁) (f₂ : X₂.Hom Y₂) (g₁ : Y₁.Hom Z₁) (g₂ : Y₂.Hom Z₂), CategoryTheory.FreeMonoidalCategory.HomEquiv ((f₁.comp g₁).tensor (f₂.comp g₂)) ((f₁.tensor f₂).comp (g₁.tensor g₂))
- whiskerLeft_id: ∀ {C : Type u} (X Y : CategoryTheory.FreeMonoidalCategory C), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft X (CategoryTheory.FreeMonoidalCategory.Hom.id Y)) (CategoryTheory.FreeMonoidalCategory.Hom.id (X.tensor Y))
- id_whiskerRight: ∀ {C : Type u} (X Y : CategoryTheory.FreeMonoidalCategory C), CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.id X).whiskerRight Y) (CategoryTheory.FreeMonoidalCategory.Hom.id (X.tensor Y))
- α_hom_inv: ∀ {C : Type u} {X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z).comp (CategoryTheory.FreeMonoidalCategory.Hom.α_inv X Y Z)) (CategoryTheory.FreeMonoidalCategory.Hom.id ((X.tensor Y).tensor Z))
- α_inv_hom: ∀ {C : Type u} {X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.α_inv X Y Z).comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z)) (CategoryTheory.FreeMonoidalCategory.Hom.id (X.tensor (Y.tensor Z)))
- associator_naturality: ∀ {C : Type u} {X₁ X₂ X₃ Y₁ Y₂ Y₃ : CategoryTheory.FreeMonoidalCategory C} (f₁ : X₁.Hom Y₁) (f₂ : X₂.Hom Y₂) (f₃ : X₃.Hom Y₃), CategoryTheory.FreeMonoidalCategory.HomEquiv (((f₁.tensor f₂).tensor f₃).comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom Y₁ Y₂ Y₃)) ((CategoryTheory.FreeMonoidalCategory.Hom.α_hom X₁ X₂ X₃).comp (f₁.tensor (f₂.tensor f₃)))
- ρ_hom_inv: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X).comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_inv X)) (CategoryTheory.FreeMonoidalCategory.Hom.id (X.tensor CategoryTheory.FreeMonoidalCategory.unit))
- ρ_inv_hom: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.ρ_inv X).comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X)) (CategoryTheory.FreeMonoidalCategory.Hom.id X)
- ρ_naturality: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv ((f.whiskerRight CategoryTheory.FreeMonoidalCategory.unit).comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom Y)) ((CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X).comp f)
- l_hom_inv: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.l_hom X).comp (CategoryTheory.FreeMonoidalCategory.Hom.l_inv X)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.unit.tensor X))
- l_inv_hom: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.l_inv X).comp (CategoryTheory.FreeMonoidalCategory.Hom.l_hom X)) (CategoryTheory.FreeMonoidalCategory.Hom.id X)
- l_naturality: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : X.Hom Y), CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft CategoryTheory.FreeMonoidalCategory.unit f).comp (CategoryTheory.FreeMonoidalCategory.Hom.l_hom Y)) ((CategoryTheory.FreeMonoidalCategory.Hom.l_hom X).comp f)
- pentagon: ∀ {C : Type u} {W X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (((CategoryTheory.FreeMonoidalCategory.Hom.α_hom W X Y).whiskerRight Z).comp ((CategoryTheory.FreeMonoidalCategory.Hom.α_hom W (X.tensor Y) Z).comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft W (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z)))) ((CategoryTheory.FreeMonoidalCategory.Hom.α_hom (W.tensor X) Y Z).comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W X (Y.tensor Z)))
- triangle: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv ((CategoryTheory.FreeMonoidalCategory.Hom.α_hom X CategoryTheory.FreeMonoidalCategory.unit Y).comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft X (CategoryTheory.FreeMonoidalCategory.Hom.l_hom Y))) ((CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X).whiskerRight Y)
Instances For
We say that two formal morphisms in the free monoidal category are equivalent if they become equal if we apply the relations that are true in a monoidal category. Note that we will prove that there is only one equivalence class -- this is the monoidal coherence theorem.
Equations
- X.setoidHom Y = { r := CategoryTheory.FreeMonoidalCategory.HomEquiv, iseqv := ⋯ }
Equations
- CategoryTheory.FreeMonoidalCategory.categoryFreeMonoidalCategory = CategoryTheory.Category.mk ⋯ ⋯ ⋯
Equations
- CategoryTheory.FreeMonoidalCategory.instMonoidalCategory = CategoryTheory.MonoidalCategory.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
The abbreviation for ⟦f⟧
.
Equations
Instances For
Auxiliary definition for free_monoidal_category.project
.
Equations
- One or more equations did not get rendered due to their size.
- CategoryTheory.FreeMonoidalCategory.projectObj f (CategoryTheory.FreeMonoidalCategory.of X) = f X
- CategoryTheory.FreeMonoidalCategory.projectObj f CategoryTheory.FreeMonoidalCategory.unit = 𝟙_ D
Instances For
Auxiliary definition for FreeMonoidalCategory.project
.
Equations
- One or more equations did not get rendered due to their size.
- CategoryTheory.FreeMonoidalCategory.projectMapAux f (CategoryTheory.FreeMonoidalCategory.Hom.id x) = CategoryTheory.CategoryStruct.id (CategoryTheory.FreeMonoidalCategory.projectObj f x)
Instances For
Auxiliary definition for FreeMonoidalCategory.project
.
Equations
Instances For
If D
is a monoidal category and we have a function C → D
, then we have a functor from the
free monoidal category over C
to the category D
.
Equations
- One or more equations did not get rendered due to their size.