module Setoid.Lift where

open import Prelude

open import Setoid.Definition
open import Setoid.Display
open import Setoid.Universes

----------------------------------------------------------------------
-- Lifting from a universe to a higher one
----------------------------------------------------------------------
Lfts :
  {m n : }
  (_ : n  m)
   -----------
   𝒰 m  𝒰 n 

 Lfts ≥refl  = id
 Lfts (≥step p)  = Lft   Lfts p 
cng (Lfts ≥refl) _ _ e = e
cng (Lfts (≥step p)) = cng (Lfts p)

Lftsℰ𝓁 :
  {m n : }
  (p : n  m)
   -----------------
  ℰ𝓁 m  ℰ𝓁 n * Lfts p

Lftsℰ𝓁 ≥refl = refl
Lftsℰ𝓁 (≥step p) = Lftsℰ𝓁 p

LftsInj :
  {m n : }
  (p : n  m)
  {A B : U m}
  (_ : 𝒰 n   Lfts p  A ~  Lfts p  B)
   -----------------------------------
  𝒰 m  A ~ B

LftsInj ≥refl e = e
LftsInj (≥step p) e = LftsInj p e