module Cat.Displayed.TwoSided where

Two-sided fibrationsπŸ”—

One useful perspective on cartesian fibrations and cocartesian fibrations is that they are (co)presheaves of categories. This raises a natural question: what is the appropriate generalization of profunctors?

A displayed category is a two-sided fibration when it satisfies the following 3 conditions:

  1. We are given an operation assigning cartesian lifts to each and

  2. Similarly, to each and we are equipped with a cocartesian lift

  3. For every diagram of the form below with cocartesian and cartesian, is cartesian if and only if is cocartesian.

  record Two-sided-fibration : Type (oa βŠ” β„“a βŠ” ob βŠ” β„“b βŠ” oe βŠ” β„“e) where
    no-eta-equality
    field
      cart-lift
        : βˆ€ {a₁ aβ‚‚ : A.Ob} {b : B.Ob}
        β†’ (u : A.Hom a₁ aβ‚‚)
        β†’ (y' : Ob[ aβ‚‚ , b ])
        β†’ Cartesian-lift E (u , B.id) y'
      cocart-lift
        : βˆ€ {a : A.Ob} {b₁ bβ‚‚ : B.Ob}
        β†’ (v : B.Hom b₁ bβ‚‚)
        β†’ (x' : Ob[ a , b₁ ])
        β†’ Cocartesian-lift E (A.id , v) x'
      cart-beck-chevalley
        : βˆ€ {a₁ aβ‚‚ : A.Ob} {b₁ bβ‚‚ : B.Ob}
        β†’ {u : A.Hom a₁ aβ‚‚} {v : B.Hom b₁ bβ‚‚}
        β†’ right-beck-chevalley E
            (A.id , v) (u , B.id) (u , B.id) (A.id , v)
            (sym A.id-comm ,β‚š B.id-comm)
      cocart-beck-chevalley
        : βˆ€ {a₁ aβ‚‚ : A.Ob} {b₁ bβ‚‚ : B.Ob}
        β†’ {u : A.Hom a₁ aβ‚‚} {v : B.Hom b₁ bβ‚‚}
        β†’ left-beck-chevalley E
            (A.id , v) (u , B.id) (u , B.id) (A.id , v)
            (sym A.id-comm ,β‚š B.id-comm)

This definition is rather opaque, so let’s break it down. The first two conditions ensure that we have 2 functorial actions on each of the fibre categories the first acts contravariantly in the second covariantly in These are analogs to the actions and of a profunctor The final condition serves to ensure that the base change and cobase change functors and preserve cocartesian and cartesian morphisms, resp.