Theory ConcreteBicategory
section "Concrete Bicategories"
text ‹
The locale ‹concrete_bicategory› defined in this section provides a uniform way to construct
a bicategory from extrinsically specified data comprising: a set of ‹Obj› of ``objects'',
a ``hom-category'' ‹Hom A B› for each pair of objects ‹A› and ‹B›, an ``identity arrow''
‹Id A ∈ Hom A A› for each object ‹A›, ``horizontal composition'' functors
‹Comp C B A : Hom B C × Hom A B → Hom A C› indexed by triples of objects,
together with unit and associativity isomorphisms; the latter subject to naturality and
coherence conditions.
We show that the bicategory produced by the construction relates to the given data in the
expected fashion: the objects of the bicategory are in bijective correspondence with the
given set ‹Obj›, the hom-categories of the bicategory are isomorphic to the given
categories ‹Hom A B›, the horizontal composition of the bicategory agrees with the given
compositions ‹Comp C B A›, and the unit and associativity 2-cells of the bicategory are
directly defined in terms of the given unit and associativity isomorphisms.
›
theory ConcreteBicategory
imports Bicategory.Bicategory
begin
locale concrete_bicategory =
fixes Obj :: "'o set"
and Hom :: "'o ⇒ 'o ⇒ 'a comp"
and Id :: "'o ⇒ 'a"
and Comp :: "'o ⇒ 'o ⇒ 'o ⇒ 'a ⇒ 'a ⇒ 'a"
and Unit :: "'o ⇒ 'a"
and Assoc :: "'o ⇒ 'o ⇒ 'o ⇒ 'o ⇒ 'a ⇒ 'a ⇒ 'a ⇒ 'a"
assumes category_Hom: "⟦ A ∈ Obj; B ∈ Obj ⟧ ⟹ category (Hom A B)"
and binary_functor_Comp:
"⟦ A ∈ Obj; B ∈ Obj; C ∈ Obj ⟧
⟹ binary_functor (Hom B C) (Hom A B) (Hom A C) (λ(f, g). Comp C B A f g)"
and ide_Id: "A ∈ Obj ⟹ partial_composition.ide (Hom A A) (Id A)"
and Unit_in_hom:
"A ∈ Obj ⟹
partial_composition.in_hom (Hom A A) (Unit A) (Comp A A A (Id A) (Id A)) (Id A)"
and iso_Unit: "A ∈ Obj ⟹ category.iso (Hom A A) (Unit A)"
and natural_isomorphism_Assoc:
"⟦ A ∈ Obj; B ∈ Obj; C ∈ Obj; D ∈ Obj ⟧
⟹ natural_isomorphism
(product_category.comp
(Hom C D) (product_category.comp (Hom B C) (Hom A B))) (Hom A D)
(λ(f, g, h). Comp D B A (Comp D C B f g) h)
(λ(f, g, h). Comp D C A f (Comp C B A g h))
(λ(f, g, h). Assoc D C B A f g h)"
and left_unit_Id:
"⋀A B. ⟦ A ∈ Obj; B ∈ Obj ⟧
⟹ fully_faithful_functor (Hom A B) (Hom A B)
(λf. if partial_composition.arr (Hom A B) f
then Comp B B A (Id B) f
else partial_magma.null (Hom A B))"
and right_unit_Id:
"⋀A B. ⟦ A ∈ Obj; B ∈ Obj ⟧
⟹ fully_faithful_functor (Hom A B) (Hom A B)
(λf. if partial_composition.arr (Hom A B) f
then Comp B A A f (Id A)
else partial_magma.null (Hom A B))"
and pentagon:
"⋀A B C D E f g h k.
⟦ A ∈ Obj; B ∈ Obj; C ∈ Obj; D ∈ Obj; E ∈ Obj;
partial_composition.ide (Hom D E) f; partial_composition.ide (Hom C D) g;
partial_composition.ide (Hom B C) h; partial_composition.ide (Hom A B) k ⟧ ⟹
Hom A E (Comp E D A f (Assoc D C B A g h k))
(Hom A E (Assoc E D B A f (Comp D C B g h) k)
(Comp E B A (Assoc E D C B f g h) k)) =
Hom A E (Assoc E D C A f g (Comp C B A h k))
(Assoc E C B A (Comp E D C f g) h k)"
begin
text ‹
We first construct the vertical category.
Arrows are terms of the form ‹MkCell A B μ›, where ‹A ∈ Obj›, ‹B ∈ Obj›, and where ‹μ›
is an arrow of ‹Hom A B›.
Composition requires agreement of the ``source'' ‹A› and ``target'' ‹B› components,
and is then defined in terms of composition within ‹Hom A B›.
›