{-# OPTIONS --safe #-}
module Cubical.Foundations.Structure where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
private
variable
ℓ ℓ' ℓ'' : Level
S : Type ℓ → Type ℓ'
TypeWithStr : (ℓ : Level) (S : Type ℓ → Type ℓ') → Type (ℓ-max (ℓ-suc ℓ) ℓ')
TypeWithStr ℓ S = Σ[ X ∈ Type ℓ ] S X
typ : TypeWithStr ℓ S → Type ℓ
typ = fst
str : (A : TypeWithStr ℓ S) → S (typ A)
str = snd
⟨_⟩ : TypeWithStr ℓ S → Type ℓ
⟨_⟩ = typ
instance
mkTypeWithStr : ∀ {ℓ} {S : Type ℓ → Type ℓ'} {X} → {{S X}} → TypeWithStr ℓ S
mkTypeWithStr {{i}} = _ , i
StrEquiv : (S : Type ℓ → Type ℓ'') (ℓ' : Level) → Type (ℓ-max (ℓ-suc (ℓ-max ℓ ℓ')) ℓ'')
StrEquiv {ℓ} S ℓ' = (A B : TypeWithStr ℓ S) → typ A ≃ typ B → Type ℓ'
EquivAction : (S : Type ℓ → Type ℓ'') → Type (ℓ-max (ℓ-suc ℓ) ℓ'')
EquivAction {ℓ} S = {X Y : Type ℓ} → X ≃ Y → S X ≃ S Y
EquivAction→StrEquiv : {S : Type ℓ → Type ℓ''}
→ EquivAction S → StrEquiv S ℓ''
EquivAction→StrEquiv α (X , s) (Y , t) e = equivFun (α e) s ≡ t