The universal property of pullbacks

module foundation.universal-property-pullbacks where
Imports
open import foundation-core.universal-property-pullbacks public

open import foundation.equivalences

open import foundation-core.cones-over-cospans
open import foundation-core.contractible-types
open import foundation-core.dependent-pair-types
open import foundation-core.identity-types
open import foundation-core.propositions
open import foundation-core.subtype-identity-principle
open import foundation-core.universe-levels

Idea

The universal property of pullbacks describes the optimal way to complete a diagram of the form

         B
         |
         |
         V
A -----> X

to a square

C -----> B
|        |
|        |
V        V
A -----> X

Properties

The universal property is a property

module _
  {l1 l2 l3 l4 l5 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
  (f : A  X) (g : B  X) {C : UU l4} (c : cone f g C)
  where

  abstract
    is-prop-universal-property-pullback :
      is-prop (universal-property-pullback l5 f g c)
    is-prop-universal-property-pullback =
      is-prop-Π  C'  is-property-is-equiv (cone-map f g c))

  map-universal-property-pullback :
    ({l : Level}  universal-property-pullback l f g c) 
    {C' : UU l5} (c' : cone f g C')  C'  C
  map-universal-property-pullback up-c {C'} c' =
    map-inv-is-equiv (up-c C') c'

  eq-map-universal-property-pullback :
    (up-c : {l : Level}  universal-property-pullback l f g c) 
    {C' : UU l5} (c' : cone f g C') 
    cone-map f g c (map-universal-property-pullback up-c c')  c'
  eq-map-universal-property-pullback up-c {C'} c' =
    issec-map-inv-is-equiv (up-c C') c'

The homotopy of cones obtained from the universal property of pullbacks

module _
  {l1 l2 l3 l4 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
  (f : A  X) (g : B  X) {C : UU l4}
  where

  htpy-cone-map-universal-property-pullback :
    (c : cone f g C) (up : {l : Level}  universal-property-pullback l f g c) 
    {l5 : Level} {C' : UU l5} (c' : cone f g C') 
    htpy-cone f g
      ( cone-map f g c (map-universal-property-pullback f g c up c'))
      ( c')
  htpy-cone-map-universal-property-pullback c up c' =
    htpy-eq-cone f g
      ( cone-map f g c (map-universal-property-pullback f g c up c'))
      ( c')
      ( eq-map-universal-property-pullback f g c up c')

Uniquely uniqueness of pullbacks

module _
  {l1 l2 l3 l4 l5 : Level} {A : UU l1} {B : UU l2} {X : UU l3}
  (f : A  X) (g : B  X) {C : UU l4} {C' : UU l5}
  where

  abstract
    uniquely-unique-pullback :
      ( c' : cone f g C') (c : cone f g C) 
      ( up-c' : {l : Level}  universal-property-pullback l f g c') 
      ( up-c : {l : Level}  universal-property-pullback l f g c) 
      is-contr
        ( Σ (C'  C)  e  htpy-cone f g (cone-map f g c (map-equiv e)) c'))
    uniquely-unique-pullback c' c up-c' up-c =
      is-contr-total-Eq-subtype
        ( uniqueness-universal-property-pullback f g c up-c C' c')
        ( is-property-is-equiv)
        ( map-universal-property-pullback f g c up-c c')
        ( htpy-cone-map-universal-property-pullback f g c up-c c')
        ( is-equiv-up-pullback-up-pullback c c'
          ( map-universal-property-pullback f g c up-c c')
          ( htpy-cone-map-universal-property-pullback f g c up-c c')
          up-c up-c')