{-

  - UARel given by a universe and equivalences
  - SubstRel and DUARel for the element family over the universe

-}
{-# OPTIONS --no-exact-split --safe #-}
module Cubical.Displayed.Universe where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence

open import Cubical.Displayed.Base
open import Cubical.Displayed.Subst

private
  variable
    ℓA ℓ≅A ℓB ℓ≅B ℓP : Level

𝒮-Univ :    UARel (Type ) 
𝒮-Univ  .UARel._≅_ = _≃_
𝒮-Univ  .UARel.ua _ _ = isoToEquiv (invIso univalenceIso)

𝒮ˢ-El :    SubstRel (𝒮-Univ )  X  X)
𝒮ˢ-El  .SubstRel.act e = e
𝒮ˢ-El  .SubstRel.uaˢ e a = uaβ e a

𝒮ᴰ-El :    DUARel (𝒮-Univ )  X  X) 
𝒮ᴰ-El  .DUARel._≅ᴰ⟨_⟩_  a e a' = e .fst a  a'
𝒮ᴰ-El  .DUARel.uaᴰ a e a' = invEquiv (ua-ungluePath-Equiv e)