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) → CategoryTheory.FreeMonoidalCategory.Hom X X
- α_hom: {C : Type u} → (X Y Z : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor (CategoryTheory.FreeMonoidalCategory.tensor X Y) Z) (CategoryTheory.FreeMonoidalCategory.tensor X (CategoryTheory.FreeMonoidalCategory.tensor Y Z))
- α_inv: {C : Type u} → (X Y Z : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor X (CategoryTheory.FreeMonoidalCategory.tensor Y Z)) (CategoryTheory.FreeMonoidalCategory.tensor (CategoryTheory.FreeMonoidalCategory.tensor X Y) Z)
- l_hom: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor CategoryTheory.FreeMonoidalCategory.unit X) X
- l_inv: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom X (CategoryTheory.FreeMonoidalCategory.tensor CategoryTheory.FreeMonoidalCategory.unit X)
- ρ_hom: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor X CategoryTheory.FreeMonoidalCategory.unit) X
- ρ_inv: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom X (CategoryTheory.FreeMonoidalCategory.tensor X CategoryTheory.FreeMonoidalCategory.unit)
- comp: {C : Type u} → {X Y Z : CategoryTheory.FreeMonoidalCategory C} → CategoryTheory.FreeMonoidalCategory.Hom X Y → CategoryTheory.FreeMonoidalCategory.Hom Y Z → CategoryTheory.FreeMonoidalCategory.Hom X Z
- whiskerLeft: {C : Type u} → (X : CategoryTheory.FreeMonoidalCategory C) → {Y₁ Y₂ : CategoryTheory.FreeMonoidalCategory C} → CategoryTheory.FreeMonoidalCategory.Hom Y₁ Y₂ → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor X Y₁) (CategoryTheory.FreeMonoidalCategory.tensor X Y₂)
- whiskerRight: {C : Type u} → {X₁ X₂ : CategoryTheory.FreeMonoidalCategory C} → CategoryTheory.FreeMonoidalCategory.Hom X₁ X₂ → (Y : CategoryTheory.FreeMonoidalCategory C) → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor X₁ Y) (CategoryTheory.FreeMonoidalCategory.tensor X₂ Y)
- tensor: {C : Type u} → {W X Y Z : CategoryTheory.FreeMonoidalCategory C} → CategoryTheory.FreeMonoidalCategory.Hom W Y → CategoryTheory.FreeMonoidalCategory.Hom X Z → CategoryTheory.FreeMonoidalCategory.Hom (CategoryTheory.FreeMonoidalCategory.tensor W X) (CategoryTheory.FreeMonoidalCategory.tensor Y 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 : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv f f
- symm: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f g : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv f g → CategoryTheory.FreeMonoidalCategory.HomEquiv g f
- trans: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} {f g h : CategoryTheory.FreeMonoidalCategory.Hom X 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' : CategoryTheory.FreeMonoidalCategory.Hom X Y} {g g' : CategoryTheory.FreeMonoidalCategory.Hom Y Z}, CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv g g' → CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp f g) (CategoryTheory.FreeMonoidalCategory.Hom.comp f' g')
- whiskerLeft: ∀ {C : Type u} (X : CategoryTheory.FreeMonoidalCategory C) {Y Z : CategoryTheory.FreeMonoidalCategory C} (f f' : CategoryTheory.FreeMonoidalCategory.Hom Y 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' : CategoryTheory.FreeMonoidalCategory.Hom Y Z) (X : CategoryTheory.FreeMonoidalCategory C), CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight f X) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight f' X)
- tensor: ∀ {C : Type u} {W X Y Z : CategoryTheory.FreeMonoidalCategory C} {f f' : CategoryTheory.FreeMonoidalCategory.Hom W X} {g g' : CategoryTheory.FreeMonoidalCategory.Hom Y Z}, CategoryTheory.FreeMonoidalCategory.HomEquiv f f' → CategoryTheory.FreeMonoidalCategory.HomEquiv g g' → CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.tensor f g) (CategoryTheory.FreeMonoidalCategory.Hom.tensor f' g')
- tensorHom_def: ∀ {C : Type u} {X₁ Y₁ X₂ Y₂ : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X₁ Y₁) (g : CategoryTheory.FreeMonoidalCategory.Hom X₂ Y₂), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.tensor f g) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight f X₂) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft Y₁ g))
- comp_id: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp f (CategoryTheory.FreeMonoidalCategory.Hom.id Y)) f
- id_comp: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.id X) f) f
- assoc: ∀ {C : Type u} {X Y U V : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X U) (g : CategoryTheory.FreeMonoidalCategory.Hom U V) (h : CategoryTheory.FreeMonoidalCategory.Hom V Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.comp f g) h) (CategoryTheory.FreeMonoidalCategory.Hom.comp f (CategoryTheory.FreeMonoidalCategory.Hom.comp g h))
- tensor_id: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.tensor (CategoryTheory.FreeMonoidalCategory.Hom.id X) (CategoryTheory.FreeMonoidalCategory.Hom.id Y)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor X Y))
- tensor_comp: ∀ {C : Type u} {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : CategoryTheory.FreeMonoidalCategory C} (f₁ : CategoryTheory.FreeMonoidalCategory.Hom X₁ Y₁) (f₂ : CategoryTheory.FreeMonoidalCategory.Hom X₂ Y₂) (g₁ : CategoryTheory.FreeMonoidalCategory.Hom Y₁ Z₁) (g₂ : CategoryTheory.FreeMonoidalCategory.Hom Y₂ Z₂), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.tensor (CategoryTheory.FreeMonoidalCategory.Hom.comp f₁ g₁) (CategoryTheory.FreeMonoidalCategory.Hom.comp f₂ g₂)) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.tensor f₁ f₂) (CategoryTheory.FreeMonoidalCategory.Hom.tensor g₁ 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 (CategoryTheory.FreeMonoidalCategory.tensor X Y))
- id_whiskerRight: ∀ {C : Type u} (X Y : CategoryTheory.FreeMonoidalCategory C), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight (CategoryTheory.FreeMonoidalCategory.Hom.id X) Y) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor X Y))
- α_hom_inv: ∀ {C : Type u} {X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z) (CategoryTheory.FreeMonoidalCategory.Hom.α_inv X Y Z)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor (CategoryTheory.FreeMonoidalCategory.tensor X Y) Z))
- α_inv_hom: ∀ {C : Type u} {X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_inv X Y Z) (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor X (CategoryTheory.FreeMonoidalCategory.tensor Y Z)))
- associator_naturality: ∀ {C : Type u} {X₁ X₂ X₃ Y₁ Y₂ Y₃ : CategoryTheory.FreeMonoidalCategory C} (f₁ : CategoryTheory.FreeMonoidalCategory.Hom X₁ Y₁) (f₂ : CategoryTheory.FreeMonoidalCategory.Hom X₂ Y₂) (f₃ : CategoryTheory.FreeMonoidalCategory.Hom X₃ Y₃), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.tensor (CategoryTheory.FreeMonoidalCategory.Hom.tensor f₁ f₂) f₃) (CategoryTheory.FreeMonoidalCategory.Hom.α_hom Y₁ Y₂ Y₃)) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X₁ X₂ X₃) (CategoryTheory.FreeMonoidalCategory.Hom.tensor f₁ (CategoryTheory.FreeMonoidalCategory.Hom.tensor f₂ f₃)))
- ρ_hom_inv: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X) (CategoryTheory.FreeMonoidalCategory.Hom.ρ_inv X)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor X CategoryTheory.FreeMonoidalCategory.unit))
- ρ_inv_hom: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_inv X) (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X)) (CategoryTheory.FreeMonoidalCategory.Hom.id X)
- ρ_naturality: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight f CategoryTheory.FreeMonoidalCategory.unit) (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom Y)) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X) f)
- l_hom_inv: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.l_hom X) (CategoryTheory.FreeMonoidalCategory.Hom.l_inv X)) (CategoryTheory.FreeMonoidalCategory.Hom.id (CategoryTheory.FreeMonoidalCategory.tensor CategoryTheory.FreeMonoidalCategory.unit X))
- l_inv_hom: ∀ {C : Type u} {X : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.l_inv X) (CategoryTheory.FreeMonoidalCategory.Hom.l_hom X)) (CategoryTheory.FreeMonoidalCategory.Hom.id X)
- l_naturality: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C} (f : CategoryTheory.FreeMonoidalCategory.Hom X Y), CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft CategoryTheory.FreeMonoidalCategory.unit f) (CategoryTheory.FreeMonoidalCategory.Hom.l_hom Y)) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.l_hom X) f)
- pentagon: ∀ {C : Type u} {W X Y Z : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W X Y) Z) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W (CategoryTheory.FreeMonoidalCategory.tensor X Y) Z) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft W (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X Y Z)))) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom (CategoryTheory.FreeMonoidalCategory.tensor W X) Y Z) (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W X (CategoryTheory.FreeMonoidalCategory.tensor Y Z)))
- triangle: ∀ {C : Type u} {X Y : CategoryTheory.FreeMonoidalCategory C}, CategoryTheory.FreeMonoidalCategory.HomEquiv (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom X CategoryTheory.FreeMonoidalCategory.unit Y) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerLeft X (CategoryTheory.FreeMonoidalCategory.Hom.l_hom Y))) (CategoryTheory.FreeMonoidalCategory.Hom.whiskerRight (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X) 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
- CategoryTheory.FreeMonoidalCategory.setoidHom X Y = { r := CategoryTheory.FreeMonoidalCategory.HomEquiv, iseqv := ⋯ }
Equations
- CategoryTheory.FreeMonoidalCategory.categoryFreeMonoidalCategory = CategoryTheory.Category.mk ⋯ ⋯ ⋯
Equations
- CategoryTheory.FreeMonoidalCategory.instMonoidalCategoryFreeMonoidalCategoryCategoryFreeMonoidalCategory = 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
.
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.