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
.
- 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
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.
Instances For
Equations
- CategoryTheory.instInhabitedFreeMonoidalCategory = { default := CategoryTheory.FreeMonoidalCategory.Unit }
- 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
- 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)
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.
Instances For
- 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')
- 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')
- 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₂))
- α_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.tensor f (CategoryTheory.FreeMonoidalCategory.Hom.id 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.tensor (CategoryTheory.FreeMonoidalCategory.Hom.id 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.tensor (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W X Y) (CategoryTheory.FreeMonoidalCategory.Hom.id Z)) (CategoryTheory.FreeMonoidalCategory.Hom.comp (CategoryTheory.FreeMonoidalCategory.Hom.α_hom W (CategoryTheory.FreeMonoidalCategory.tensor X Y) Z) (CategoryTheory.FreeMonoidalCategory.Hom.tensor (CategoryTheory.FreeMonoidalCategory.Hom.id 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.tensor (CategoryTheory.FreeMonoidalCategory.Hom.id X) (CategoryTheory.FreeMonoidalCategory.Hom.l_hom Y))) (CategoryTheory.FreeMonoidalCategory.Hom.tensor (CategoryTheory.FreeMonoidalCategory.Hom.ρ_hom X) (CategoryTheory.FreeMonoidalCategory.Hom.id Y))
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.
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 := (_ : Equivalence CategoryTheory.FreeMonoidalCategory.HomEquiv) }
Equations
- CategoryTheory.FreeMonoidalCategory.categoryFreeMonoidalCategory = CategoryTheory.Category.mk
Equations
- One or more equations did not get rendered due to their size.
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 = CategoryTheory.MonoidalCategory.tensorUnit 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
- One or more equations did not get rendered due to their size.
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.