Documentation

Mathlib.CategoryTheory.Bicategory.Span.Basic

Bicategories of spans in a category #

In this file, given a category C and two morphism properties Wₗ and Wᵣ in C that are stable under compositions, contain identities and such that for any morphism b : x₃ ⟶ x₄ in Wₗ and any morphism r : x₂ → x₃ in Wᵣ, there exists a pullback square

     t
  x₁ --> x₂
  |      |
l |      | r
  v      v
  x₃ --> x₄
     b

in C such that t satisfies Wₗ and l satisfies Wᵣ, we construct the bicategory of spans in C with left morphism in Wₗ and right morphism in Wᵣ (TODO @robin-carlier).

structure CategoryTheory.Span {C : Type u_1} [Category.{v_1, u_1} C] (Wₗ Wᵣ : MorphismProperty C) (c c' : C) :
Type (max u_1 v_1)

A (Wₗ, Wᵣ)-span from c to c' is the data of an object a : C, together with a morphism a ⟶ c in Wₗ, and a morphism a ⟶ c' in Wᵣ.

  • apex : C

    the apex of the span

  • l : self.apex c

    the left map

  • r : self.apex c'

    the right map

  • wl : Wₗ self.l
  • wr : Wᵣ self.r
Instances For
    structure CategoryTheory.Span.Hom {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} (S₁ S₂ : Span Wₗ Wᵣ c c') :
    Type v_1

    A morphism of spans is a morphism between the apices compatible with the projections.

    Instances For
      @[simp]
      theorem CategoryTheory.Span.Hom.hom_r_assoc {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S₁ S₂ : Span Wₗ Wᵣ c c'} (self : S₁.Hom S₂) {Z : C} (h : c' Z) :
      @[simp]
      theorem CategoryTheory.Span.Hom.hom_l_assoc {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S₁ S₂ : Span Wₗ Wᵣ c c'} (self : S₁.Hom S₂) {Z : C} (h : c Z) :
      @[implicit_reducible]
      instance CategoryTheory.Span.instCategory {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} :
      Equations
      • One or more equations did not get rendered due to their size.
      @[simp]
      theorem CategoryTheory.Span.id_hom {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} (S : Span Wₗ Wᵣ c c') :
      @[simp]
      theorem CategoryTheory.Span.comp_hom {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {X✝ Y✝ Z✝ : Span Wₗ Wᵣ c c'} (φ : X✝.Hom Y✝) (φ' : Y✝.Hom Z✝) :
      theorem CategoryTheory.Span.hom_ext {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S S' : Span Wₗ Wᵣ c c'} {f g : S S'} (h : f.hom = g.hom) :
      f = g
      theorem CategoryTheory.Span.hom_ext_iff {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S S' : Span Wₗ Wᵣ c c'} {f g : S S'} :
      f = g f.hom = g.hom
      def CategoryTheory.Span.mkIso {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S S' : Span Wₗ Wᵣ c c'} (e : S.apex S'.apex) (hₗ : CategoryStruct.comp e.hom S'.l = S.l := by cat_disch) (hᵣ : CategoryStruct.comp e.hom S'.r = S.r := by cat_disch) :
      S S'

      Construct an isomorphism of spans from an isomorphism between the apices that is compatible with the projections.

      Equations
      Instances For
        @[simp]
        theorem CategoryTheory.Span.mkIso_inv_hom {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S S' : Span Wₗ Wᵣ c c'} (e : S.apex S'.apex) (hₗ : CategoryStruct.comp e.hom S'.l = S.l := by cat_disch) (hᵣ : CategoryStruct.comp e.hom S'.r = S.r := by cat_disch) :
        (mkIso e hₗ hᵣ).inv.hom = e.inv
        @[simp]
        theorem CategoryTheory.Span.mkIso_hom_hom {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} {c c' : C} {S S' : Span Wₗ Wᵣ c c'} (e : S.apex S'.apex) (hₗ : CategoryStruct.comp e.hom S'.l = S.l := by cat_disch) (hᵣ : CategoryStruct.comp e.hom S'.r = S.r := by cat_disch) :
        (mkIso e hₗ hᵣ).hom.hom = e.hom
        instance CategoryTheory.Span.instHasPullbackRL {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.HasPullbacksAgainst Wᵣ] {c c' c'' : C} (S₁ : Span Wₗ Wᵣ c c') (S₂ : Span Wₗ Wᵣ c' c'') :
        def CategoryTheory.Span.id {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.ContainsIdentities] [Wᵣ.ContainsIdentities] (c : C) :
        Span Wₗ Wᵣ c c

        The identity span, where both legs are identity morphisms.

        Equations
        Instances For
          @[simp]
          @[simp]
          theorem CategoryTheory.Span.id_apex {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.ContainsIdentities] [Wᵣ.ContainsIdentities] (c : C) :
          (id c).apex = c
          @[simp]
          noncomputable def CategoryTheory.Span.comp {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.HasPullbacksAgainst Wᵣ] [Wₗ.IsStableUnderBaseChangeAgainst Wᵣ] [Wᵣ.IsStableUnderBaseChangeAgainst Wₗ] [Wₗ.IsStableUnderComposition] [Wᵣ.IsStableUnderComposition] {c c' c'' : C} (S₁ : Span Wₗ Wᵣ c c') (S₂ : Span Wₗ Wᵣ c' c'') :
          Span Wₗ Wᵣ c c''

          The composition of two spans: if the relevant pullback exists and if the morphism properties are stable under the relevant base change, it is given by the total span

               P
              /  \
             /    \
            X₁     X₂
           /  \   /  \
          c     c'    c''
          

          where the top diamond is a pullback square

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem CategoryTheory.Span.comp_apex {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.HasPullbacksAgainst Wᵣ] [Wₗ.IsStableUnderBaseChangeAgainst Wᵣ] [Wᵣ.IsStableUnderBaseChangeAgainst Wₗ] [Wₗ.IsStableUnderComposition] [Wᵣ.IsStableUnderComposition] {c c' c'' : C} (S₁ : Span Wₗ Wᵣ c c') (S₂ : Span Wₗ Wᵣ c' c'') :
            (S₁.comp S₂).apex = Limits.pullback S₁.r S₂.l
            @[simp]
            theorem CategoryTheory.Span.comp_r {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.HasPullbacksAgainst Wᵣ] [Wₗ.IsStableUnderBaseChangeAgainst Wᵣ] [Wᵣ.IsStableUnderBaseChangeAgainst Wₗ] [Wₗ.IsStableUnderComposition] [Wᵣ.IsStableUnderComposition] {c c' c'' : C} (S₁ : Span Wₗ Wᵣ c c') (S₂ : Span Wₗ Wᵣ c' c'') :
            (S₁.comp S₂).r = CategoryStruct.comp (Limits.pullback.snd S₁.r S₂.l) S₂.r
            @[simp]
            theorem CategoryTheory.Span.comp_l {C : Type u_1} [Category.{v_1, u_1} C] {Wₗ Wᵣ : MorphismProperty C} [Wₗ.HasPullbacksAgainst Wᵣ] [Wₗ.IsStableUnderBaseChangeAgainst Wᵣ] [Wᵣ.IsStableUnderBaseChangeAgainst Wₗ] [Wₗ.IsStableUnderComposition] [Wᵣ.IsStableUnderComposition] {c c' c'' : C} (S₁ : Span Wₗ Wᵣ c c') (S₂ : Span Wₗ Wᵣ c' c'') :
            (S₁.comp S₂).l = CategoryStruct.comp (Limits.pullback.fst S₁.r S₂.l) S₁.l