{-# OPTIONS --safe #-}
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Transport
open import Cubical.Data.Sigma
open import Cubical.Categories.Category.Base
open import Cubical.Categories.Constructions.TotalCategory.Base
open import Cubical.Categories.Displayed.Base
module Cubical.Categories.Displayed.Reasoning
{ℓC ℓ'C ℓCᴰ ℓ'Cᴰ : Level}
{C : Category ℓC ℓ'C}
(Cᴰ : Categoryᴰ C ℓCᴰ ℓ'Cᴰ)
where
open Categoryᴰ Cᴰ
private module C = Category C
open Category hiding (_∘_)
open Category (∫C Cᴰ) public
≡in : {a b : C.ob} {f g : C [ a , b ]}
{aᴰ : ob[ a ]} {bᴰ : ob[ b ]}
{fᴰ : Hom[ f ][ aᴰ , bᴰ ]}
{gᴰ : Hom[ g ][ aᴰ , bᴰ ]}
{p : f ≡ g}
→ (fᴰ ≡[ p ] gᴰ)
→ (f , fᴰ) ≡ (g , gᴰ)
≡in e = ΣPathP (_ , e)
≡out : {a b : C.ob} {f g : C [ a , b ]}
{aᴰ : ob[ a ]} {bᴰ : ob[ b ]}
{fᴰ : Hom[ f ][ aᴰ , bᴰ ]}
{gᴰ : Hom[ g ][ aᴰ , bᴰ ]}
→ (e : (f , fᴰ) ≡ (g , gᴰ))
→ (fᴰ ≡[ fst (PathPΣ e) ] gᴰ)
≡out e = snd (PathPΣ e)
reind : {a b : C.ob} {f g : C [ a , b ]} (p : f ≡ g)
{aᴰ : ob[ a ]} {bᴰ : ob[ b ]}
→ Hom[ f ][ aᴰ , bᴰ ] → Hom[ g ][ aᴰ , bᴰ ]
reind p = subst Hom[_][ _ , _ ] p
reind-filler : {a b : C.ob} {f g : C [ a , b ]} (p : f ≡ g)
{aᴰ : ob[ a ]} {bᴰ : ob[ b ]}
(fᴰ : Hom[ f ][ aᴰ , bᴰ ])
→ (f , fᴰ) ≡ (g , reind p fᴰ)
reind-filler p fᴰ = ΣPathP (p , subst-filler Hom[_][ _ , _ ] p fᴰ)
rectify : {a b : C.ob} {f g : C [ a , b ]} {p p' : f ≡ g}
{aᴰ : ob[ a ]} {bᴰ : ob[ b ]}
{fᴰ : Hom[ f ][ aᴰ , bᴰ ]}
{gᴰ : Hom[ g ][ aᴰ , bᴰ ]}
→ fᴰ ≡[ p ] gᴰ → fᴰ ≡[ p' ] gᴰ
rectify {fᴰ = fᴰ} {gᴰ = gᴰ} = subst (fᴰ ≡[_] gᴰ) (C.isSetHom _ _ _ _)