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} →
• unit:
• tensor:
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 : ) → X.Hom X
• α_hom: {C : Type u} → (X Y Z : ) → ((X.tensor Y).tensor Z).Hom (X.tensor (Y.tensor Z))
• α_inv: {C : Type u} → (X Y Z : ) → (X.tensor (Y.tensor Z)).Hom ((X.tensor Y).tensor Z)
• l_hom: {C : Type u} → (X : ) → (CategoryTheory.FreeMonoidalCategory.unit.tensor X).Hom X
• l_inv: {C : Type u} → (X : ) → X.Hom (CategoryTheory.FreeMonoidalCategory.unit.tensor X)
• ρ_hom: {C : Type u} → (X : ) → (X.tensor CategoryTheory.FreeMonoidalCategory.unit).Hom X
• ρ_inv: {C : Type u} → (X : ) → X.Hom (X.tensor CategoryTheory.FreeMonoidalCategory.unit)
• comp: {C : Type u} → {X Y Z : } → X.Hom YY.Hom ZX.Hom Z
• whiskerLeft: {C : Type u} → (X : ) → {Y₁ Y₂ : } → Y₁.Hom Y₂(X.tensor Y₁).Hom (X.tensor Y₂)
• whiskerRight: {C : Type u} → {X₁ X₂ : } → X₁.Hom X₂(Y : ) → (X₁.tensor Y).Hom (X₂.tensor Y)
• tensor: {C : Type u} → {W X Y Z : } → W.Hom YX.Hom Z(W.tensor X).Hom (Y.tensor Z)
Instances For
inductive CategoryTheory.FreeMonoidalCategory.HomEquiv {C : Type u} :
X.Hom YX.Hom YProp

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
• X.setoidHom Y = { r := CategoryTheory.FreeMonoidalCategory.HomEquiv, iseqv := }
Equations
• CategoryTheory.FreeMonoidalCategory.categoryFreeMonoidalCategory =
Equations
@[simp]
theorem CategoryTheory.FreeMonoidalCategory.mk_comp {C : Type u} (f : X.Hom Y) (g : Y.Hom Z) :
f.comp g =
@[simp]
theorem CategoryTheory.FreeMonoidalCategory.mk_tensor {C : Type u} (f : X₁.Hom Y₁) (g : X₂.Hom Y₂) :
f.tensor g =
@[simp]
theorem CategoryTheory.FreeMonoidalCategory.mk_whiskerLeft {C : Type u} (f : Y₁.Hom Y₂) :
@[simp]
theorem CategoryTheory.FreeMonoidalCategory.mk_whiskerRight {C : Type u} (f : X₁.Hom X₂) :
f.whiskerRight Y =
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
theorem CategoryTheory.FreeMonoidalCategory.unit_eq_unit {C : Type u} :
CategoryTheory.FreeMonoidalCategory.unit =
@[reducible, inline]
abbrev CategoryTheory.FreeMonoidalCategory.homMk {C : Type u} (f : X.Hom Y) :
X Y

The abbreviation for ⟦f⟧.

Equations
Instances For
theorem CategoryTheory.FreeMonoidalCategory.Hom.inductionOn {C : Type u} {motive : {X Y : } → (X Y)Prop} (t : X Y) (id : ∀ (X : ), motive ) (α_hom : ∀ (X Y Z : ), motive .hom) (α_inv : ∀ (X Y Z : ), motive .inv) (l_hom : ∀ (X : ), motive ) (l_inv : ∀ (X : ), motive ) (ρ_hom : ∀ (X : ), motive ) (ρ_inv : ∀ (X : ), motive ) (comp : ∀ {X Y Z : } (f : X Y) (g : Y Z), motive fmotive gmotive ) (whiskerLeft : ∀ (X : ) {Y Z : } (f : Y Z), motive fmotive ) (whiskerRight : ∀ {X Y : } (f : X Y) (Z : ), motive fmotive ) :
motive t
def CategoryTheory.FreeMonoidalCategory.projectObj {C : Type u} {D : Type u'} [] (f : CD) :

Auxiliary definition for free_monoidal_category.project.

Equations
Instances For
def CategoryTheory.FreeMonoidalCategory.projectMapAux {C : Type u} {D : Type u'} [] (f : CD) :

Auxiliary definition for FreeMonoidalCategory.project.

Instances For
def CategoryTheory.FreeMonoidalCategory.projectMap {C : Type u} {D : Type u'} [] (f : CD) :

Auxiliary definition for FreeMonoidalCategory.project.

Equations
Instances For
def CategoryTheory.FreeMonoidalCategory.project {C : Type u} {D : Type u'} [] (f : CD) :

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.
Instances For