{-# OPTIONS --safe --cubical-compatible --guardedness --exact-split --double-check #-}
module ALMA.SecondPass.ContCatEquivLemmas where
open import Agda.Builtin.Equality using (_≡_; refl)
open import Agda.Builtin.Sigma using (_,_)
open import Relation.Binary.PropositionalEquality.Core using (subst)
open import Data.Product.Base using (proj₂)
open import Data.Container.Core using (shape)
open import Categories.Category.Core using (Category)
open import Categories.Functor.Core using (Functor)
open import Categories.NaturalTransformation.Core using (NaturalTransformation)
open import ALMA.Cosmos.ContCategory using (ContCat)
open import ALMA.Cosmos.ContCategoryLemmas using (shape-eq-from-≈sr; ShapeOf; PosOf)
open import ALMA.Cosmos.ContCatEquiv using (ShapeCat)
open import ALMA.SecondPass.Unfolding using (Unfolding)
open import ALMA.SecondPass.MorphismObject using (MorphismObject)
onPos-subst-comm :
∀ {o h e o′ ℓ′ e′ s p u v}
{C : Category o h e} {D : Category o′ ℓ′ e′}
{FC : Functor C (ContCat s p)} {FD : Functor D (ContCat s p)}
{X : Set u} {Y : Set v}
{UF : Unfolding FC X} {UG : Unfolding FD Y}
{S : Functor (ShapeCat C FC) (ShapeCat D FD)}
{shapeTrans : ∀ {A} {s : ShapeOf FC A}
→ PosOf FC s
→ ShapeOf FD (Functor.₀ (Unfolding.unfoldFunctor UG)
(Functor.₀ S (A , s)))}
(MO : MorphismObject UF UG S shapeTrans)
{A : Category.Obj C}
{s₁ s₂ : ShapeOf FC A}
(eq : s₁ ≡ s₂)
(p : PosOf FC s₁)
→ MorphismObject.onPos MO (subst (PosOf FC) eq p)
≡ subst (λ s → PosOf FD (proj₂ (Functor.₀ S (A , s))))
eq
(MorphismObject.onPos MO p)
onPos-subst-comm MO refl p = refl
nat-shape-eq : ∀ {o h e s p}
{C : Category o h e}
{F G : Functor C (ContCat s p)}
{η : NaturalTransformation F G}
{A B : Category.Obj C} (f : Category._⇒_ C A B) (s : ShapeOf F A)
→ shape (NaturalTransformation.η η B) (shape (Functor.F₁ F f) s)
≡ shape (Functor.F₁ G f) (shape (NaturalTransformation.η η A) s)
nat-shape-eq {η = η} f s = shape-eq-from-≈sr (NaturalTransformation.commute η f) s