File: Mathlib/CategoryTheory/Bicategory/Coherence.lean

full_name: CategoryTheory.FreeBicategory.inclusionPathAux
code: /-- Auxiliary definition for `inclusionPath`. -/
@[simp]
def inclusionPathAux {a : B} : ∀ {b : B}, Path a b → Hom a b
  
goal: Quiver.Path a b → CategoryTheory.FreeBicategory.Hom a b

full_name: CategoryTheory.FreeBicategory.homCategory'
code: /-- Category structure on `Hom a b`. In this file, we will use `Hom a b` for `a b : B`
(precisely, `FreeBicategory.Hom a b`) instead of the definitionally equal expression
`a ⟶ b` for `a b : FreeBicategory B`. The main reason is that we have to annoyingly write
`@Quiver.Hom (FreeBicategory B) _ a b` to get the latter expression when given `a b : B`. -/
local instance homCategory' (a b : B) : Category (Hom a b) 
goal: CategoryTheory.Category.{max u v, max u v} (CategoryTheory.FreeBicategory.Hom a b)

full_name: CategoryTheory.FreeBicategory.inclusionPath
code: /-- The discrete category on the paths includes into the category of 1-morphisms in the free
bicategory.
-/
def inclusionPath (a b : B) : Discrete (Path.{v + 1} a b) ⥤ Hom a b 
goal: CategoryTheory.Functor (CategoryTheory.Discrete (Quiver.Path a b)) (CategoryTheory.FreeBicategory.Hom a b)

full_name: CategoryTheory.FreeBicategory.preinclusion
code: /-- The inclusion from the locally discrete bicategory on the path category into the free bicategory
as a prelax functor. This will be promoted to a pseudofunctor after proving the coherence theorem.
See `inclusion`.
-/
def preinclusion (B : Type u) [Quiver.{v + 1} B] :
    PrelaxFunctor (LocallyDiscrete (Paths B)) (FreeBicategory B) 
goal: CategoryTheory.PrelaxFunctor (CategoryTheory.LocallyDiscrete (CategoryTheory.Paths B)) (CategoryTheory.FreeBicategory B)

full_name: CategoryTheory.FreeBicategory.preinclusion_obj
code: @[simp]
theorem preinclusion_obj (a : B) : (preinclusion B).obj ⟨a⟩ = a 
goal: (CategoryTheory.FreeBicategory.preinclusion B).obj { as := a } = a

full_name: CategoryTheory.FreeBicategory.preinclusion_map₂
code: @[simp]
theorem preinclusion_map₂ {a b : B} (f g : Discrete (Path.{v + 1} a b)) (η : f ⟶ g) :
    (preinclusion B).map₂ η = eqToHom (congr_arg _ (Discrete.ext _ _ (Discrete.eq_of_hom η))) 
goal: (CategoryTheory.FreeBicategory.preinclusion B).map₂ η = CategoryTheory.eqToHom ⋯

full_name: CategoryTheory.FreeBicategory.normalizeAux
code: /-- The normalization of the composition of `p : Path a b` and `f : Hom b c`.
`p` will eventually be taken to be `nil` and we then get the normalization
of `f` alone, but the auxiliary `p` is necessary for Lean to accept the definition of
`normalizeIso` and the `whisker_left` case of `normalizeAux_congr` and `normalize_naturality`.
-/
@[simp]
def normalizeAux {a : B} : ∀ {b c : B}, Path a b → Hom b c → Path a c
  
goal: Quiver.Path a b → CategoryTheory.FreeBicategory.Hom b c → Quiver.Path a c

full_name: CategoryTheory.FreeBicategory.normalizeIso
code: /-- A 2-isomorphism between a partially-normalized 1-morphism in the free bicategory to the
fully-normalized 1-morphism.
-/
@[simp]
def normalizeIso {a : B} :
    ∀ {b c : B} (p : Path a b) (f : Hom b c),
      (preinclusion B).map ⟨p⟩ ≫ f ≅ (preinclusion B).map ⟨normalizeAux p f⟩
  
goal: CategoryTheory.CategoryStruct.comp ((CategoryTheory.FreeBicategory.preinclusion B).map { as := p }) f ≅
  (CategoryTheory.FreeBicategory.preinclusion B).map { as := CategoryTheory.FreeBicategory.normalizeAux p f }

full_name: CategoryTheory.FreeBicategory.normalizeAux_congr
code: /-- Given a 2-morphism between `f` and `g` in the free bicategory, we have the equality
`normalizeAux p f = normalizeAux p g`.
-/
theorem normalizeAux_congr {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    normalizeAux p f = normalizeAux p g 
goal: CategoryTheory.FreeBicategory.normalizeAux p f = CategoryTheory.FreeBicategory.normalizeAux p g

full_name: CategoryTheory.FreeBicategory.normalize_naturality
code: /-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) 
goal: CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerLeft ((CategoryTheory.FreeBicategory.preinclusion B).map { as := p }) η)
    (CategoryTheory.FreeBicategory.normalizeIso p g).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.FreeBicategory.normalizeIso p f).hom
    ((CategoryTheory.FreeBicategory.preinclusion B).map₂ (CategoryTheory.eqToHom ⋯))

full_name: CategoryTheory.FreeBicategory.normalizeAux_nil_comp
code: theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) 
goal: CategoryTheory.FreeBicategory.normalizeAux Quiver.Path.nil (f.comp g) =
  (CategoryTheory.FreeBicategory.normalizeAux Quiver.Path.nil f).comp
    (CategoryTheory.FreeBicategory.normalizeAux Quiver.Path.nil g)

full_name: CategoryTheory.FreeBicategory.normalize
code: /-- The normalization pseudofunctor for the free bicategory on a quiver `B`. -/
def normalize (B : Type u) [Quiver.{v + 1} B] :
    Pseudofunctor (FreeBicategory B) (LocallyDiscrete (Paths B)) 
goal: CategoryTheory.Pseudofunctor (CategoryTheory.FreeBicategory B) (CategoryTheory.LocallyDiscrete (CategoryTheory.Paths B))

full_name: CategoryTheory.FreeBicategory.normalizeUnitIso
code: /-- Auxiliary definition for `normalizeEquiv`. -/
def normalizeUnitIso (a b : FreeBicategory B) :
    𝟭 (a ⟶ b) ≅ (normalize B).mapFunctor a b ⋙ @inclusionPath B _ a b 
goal: CategoryTheory.Functor.id (a ⟶ b) ≅
  ((CategoryTheory.FreeBicategory.normalize B).mapFunctor a b).comp (CategoryTheory.FreeBicategory.inclusionPath a b)

full_name: CategoryTheory.FreeBicategory.normalizeEquiv
code: /-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) 
goal: CategoryTheory.FreeBicategory.Hom a b ≌ CategoryTheory.Discrete (Quiver.Path a b)

full_name: CategoryTheory.FreeBicategory.locally_thin
code: /-- The coherence theorem for bicategories. -/
instance locally_thin {a b : FreeBicategory B} : Quiver.IsThin (a ⟶ b) 
goal: Quiver.IsThin (a ⟶ b)

full_name: CategoryTheory.FreeBicategory.inclusionMapCompAux
code: /-- Auxiliary definition for `inclusion`. -/
def inclusionMapCompAux {a b : B} :
    ∀ {c : B} (f : Path a b) (g : Path b c),
      (preinclusion _).map (⟨f⟩ ≫ ⟨g⟩) ≅ (preinclusion _).map ⟨f⟩ ≫ (preinclusion _).map ⟨g⟩
  
goal: (CategoryTheory.FreeBicategory.preinclusion B).map (CategoryTheory.CategoryStruct.comp { as := f } { as := g }) ≅
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.FreeBicategory.preinclusion B).map { as := f })
    ((CategoryTheory.FreeBicategory.preinclusion B).map { as := g })

full_name: CategoryTheory.FreeBicategory.inclusion
code: /-- The inclusion pseudofunctor from the locally discrete bicategory on the path category into the
free bicategory.
-/
def inclusion (B : Type u) [Quiver.{v + 1} B] :
    Pseudofunctor (LocallyDiscrete (Paths B)) (FreeBicategory B) 
goal: CategoryTheory.Pseudofunctor (CategoryTheory.LocallyDiscrete (CategoryTheory.Paths B)) (CategoryTheory.FreeBicategory B)